fix: align session expiration behavior across API and SDK - #460
Conversation
Signed-off-by: Zhou Zihang <z@mcac.cc>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Zhou Zihang <z@mcac.cc>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
==========================================
+ Coverage 59.98% 60.13% +0.14%
==========================================
Files 36 36
Lines 3589 3615 +26
==========================================
+ Hits 2153 2174 +21
- Misses 1216 1220 +4
- Partials 220 221 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Zhou Zihang <z@mcac.cc>
Signed-off-by: Zhou Zihang <z@mcac.cc>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Aligns the session expiration contract across the Router, Workload Manager, and Python SDK:
SESSION_NOT_FOUNDonly when the stored session is missing;ttlas a maximum lifetime capped byspec.maxSessionDuration, independent of the idlespec.sessionTimeout;SessionNotFoundErrorand clears stale session IDs without implicit recreation or retry.Application-level 404 responses remain ordinary HTTP errors.
Which issue(s) this PR fixes:
Fixes #459
Special notes for your reviewer:
ttlis expressed in seconds. Omitting it preserves the workload CR/default lifetime.Validated with Go unit tests and vet for the changed packages, 26 Python SDK tests, Ruff, and diff checks. Prepared with AI assistance and manually reviewed and validated.
Does this PR introduce a user-facing change?: