fix: reject Dial during AfterLeaseHook to prevent wrong exporter state#605
fix: reject Dial during AfterLeaseHook to prevent wrong exporter state#605raballew wants to merge 4 commits intojumpstarter-dev:mainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This failed one E2E test : https://github.com/jumpstarter-dev/jumpstarter/actions/runs/24551070433/job/71782144002?pr=605#step:10:317 Hooks E2E Tests Group G: Lease Timeout G3: lease timeout shortly after beforeLease hook exits cleanly [hooks]
|
When hooks are enabled and a second lease is waiting, the controller allowed Dial requests during AfterLeaseHook status from the previous lease. This caused the client to connect before the exporter created a new session, resulting in "Connection to exporter lost" and the exporter getting stuck in LeaseReady. Remove AfterLeaseHook from the allowed statuses in checkExporterStatusForDriverCalls so that Dial returns FAILED_PRECONDITION during cleanup. The client retry loop already handles this error code and will succeed once the exporter transitions to LeaseReady for the new lease. Closes jumpstarter-dev#241 Generated-By: Forge/20260416_202053_681470_afe27e54_i241 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ent methods close_connection and reconnect now acquire _osip_lock and set _osip_client to None after stopping, so _ensure_client creates a fresh instance on the next call. Moved start() to the Connection Management section. Restored 644 file mode on driver.py. Generated-By: Forge/20260416_202053_681470_afe27e54_i241 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoids asyncio InvalidStateError during concurrent stream cleanup by checking context.done() before writing GOAWAY frame. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1e0adaa to
9989663
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
AfterLeaseHookfrom allowed statuses incheckExporterStatusForDriverCallsso Dial returns FAILED_PRECONDITION during cleanup, preventing clients from connecting before the exporter creates a new sessionCloses #241
Test plan
make pkg-test-jumpstarter-driver-someip🤖 Generated with Claude Code