Skip to content

Keep GPU bridge test independent of daily cleanup time - #37

Merged
gaochangw merged 1 commit into
mainfrom
studio-next
Sep 14, 2026
Merged

gaochangw merged 1 commit into
mainfrom
studio-next

Conversation

@gaochangw

Copy link
Copy Markdown
Member

The GPU bridge integration test assumed anonymous sessions could be created at any real-world time. During the 23:55–00:00 UTC daily cleanup window, the API correctly returned HTTP 503 and the test failed while indexing access_token.

Use one fixed daytime clock for session and GPU job expiry. Preserve real monotonic timing for polling and lost-lease checks, and assert HTTP 201 before reading a session token. This changes test setup only; production cleanup behavior and the published 2.2.5 artifacts are unchanged.

Validation: tests/integration/test_gpu_bridge.py and tests/integration/test_public_studio.py — 43 passed, including session expiry, disk cleanup, GPU lease loss, replay and cross-tenant isolation.

Observed failure: the post-merge Python 3.11 run at 23:57 UTC in CI 34790882657. The same release commit passed all PR checks before the cleanup window.

@gaochangw gaochangw left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit 75321ca. No actionable findings.

The fixed clock is passed to the tenant manager and scoped to the GPU broker module, so session expiry and GPU job expiry agree without changing the process-wide clock. Monotonic lease timing, asynchronous waits and the existing lost-lease assertions remain real. The patch is restored by pytest after the application shuts down.

Validation: 43 targeted integration tests passed, including the separate test that advances into the cleanup window, rejects new sessions and verifies temporary files are purged. The diff contains only this test fixture adjustment and a clearer session-status assertion; there are no runtime, packaging or deployment changes.

@gaochangw
gaochangw merged commit d7f0837 into main Sep 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant