chore: update e2e safe-synthesizer tests - #691
Conversation
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
crookedstorm
left a comment
There was a problem hiding this comment.
LGTM (not that you need my approval in this folder)
|
📝 WalkthroughWalkthroughThe Safe Synthesizer E2E module now validates REST health, fileset transfers, job lifecycle operations, cancellation, PII replacement, and full workflow artifacts. GPU/Kubernetes workflows remain opt-in, with dynamic model-fileset setup and fixture-managed cleanup. ChangesSafe Synthesizer E2E suite
Sequence Diagram(s)sequenceDiagram
participant SmokeTest
participant FilesAPI
participant SafeSynthesizerAPI
SmokeTest->>FilesAPI: Upload generated CSV
FilesAPI-->>SmokeTest: Return fileset data source
SmokeTest->>SafeSynthesizerAPI: Create and inspect job
SmokeTest->>SafeSynthesizerAPI: Cancel job
SafeSynthesizerAPI-->>SmokeTest: Return terminal status
SmokeTest->>SafeSynthesizerAPI: Delete job
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
e2e/test_safe_synthesizer.py (1)
338-355: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winAdd a timeout to the
subprocess.runcall.No
timeout=set. A hang insetup_model_filesets.py(e.g. stuck network call) can block this module-scoped fixture indefinitely; pytest's own test-level timeout is not guaranteed to reliably terminate a blocked subprocess or run fixture teardown when it fires.🔧 Proposed fix
result = subprocess.run( [ "uv", "run", "--project", str(platform_root), "python", str(script), "--files-api-url", str(sdk.base_url).rstrip("/"), "--workspace", "default", ], cwd=platform_root, + timeout=300, check=False, capture_output=True, text=True, )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@e2e/test_safe_synthesizer.py` around lines 338 - 355, Add a finite timeout to the subprocess.run invocation in the module-scoped fixture using the existing setup_model_filesets flow, and handle subprocess.TimeoutExpired consistently so the fixture fails promptly with useful captured-output context instead of hanging indefinitely.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@e2e/test_safe_synthesizer.py`:
- Around line 204-213: Update _cancel_nss_job to treat HTTP 409 responses as a
successful best-effort cleanup outcome, alongside the existing 404 handling, so
cleanup does not assert or mask the original test failure. Preserve the current
200 response parsing and assertion behavior for other unexpected status codes.
---
Outside diff comments:
In `@e2e/test_safe_synthesizer.py`:
- Around line 338-355: Add a finite timeout to the subprocess.run invocation in
the module-scoped fixture using the existing setup_model_filesets flow, and
handle subprocess.TimeoutExpired consistently so the fixture fails promptly with
useful captured-output context instead of hanging indefinitely.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 64eb6309-b74b-4440-8249-df3c2a517cbc
📒 Files selected for processing (1)
e2e/test_safe_synthesizer.py
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
tylersbray
left a comment
There was a problem hiding this comment.
Adding one more non-blocking approval modulo those hopefully easy feedback items, thanks.
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@e2e/test_safe_synthesizer.py`:
- Around line 389-393: Update the model fileset setup in the relevant test
fixture or helper to register models in the configured workspace from the
workspace fixture instead of hardcoding `"default"` in the `--workspace`
argument. Keep the existing workspace behavior for default runs while ensuring
jobs using non-default workspace values resolve their model filesets.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 14e0c970-8c85-4752-be7e-660d32270b88
📒 Files selected for processing (1)
e2e/test_safe_synthesizer.py
Summary by CodeRabbit