Skip to content

embeddedci 4.0.5: release the pod lease when the process exits - #150

Merged
wardviaene merged 1 commit into
mainfrom
pod-lease-release-at-exit
Nov 24, 2026
Merged

wardviaene merged 1 commit into
mainfrom
pod-lease-release-at-exit

Conversation

@wardviaene

Copy link
Copy Markdown
Member

A script that ends without close() left the pod's own lease held for the full TTL (120 s), so every other client got BP0025 meanwhile.

  • pod_lease.release_all_at_exit, registered with atexit on the first lease taken, releases every lease still in the registry. Joined leases (BENCHPOD_LEASE) are skipped.
  • It is best effort and bounded: about 1 s per lease (connect and reply), errors swallowed.
  • SIGTERM: when it still has its default action and we are on the main thread, a handler releases and then re-raises SIGTERM with the default action (same exit status). An application's own handler is never replaced.
  • Cloud lease (lease.py) has the same gap but is not changed: its release is an HTTP call with a token provider, which is not safe to run in an exit hook without more work.
  • Tests: release of an active lease, skip of a joined one, a dead transport. packages/embeddedci suite: 1562 passed, 217 skipped.
  • Version 4.0.5, CHANGELOG entry.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit 27aa308 into main Nov 24, 2026
12 checks passed
@wardviaene
wardviaene deleted the pod-lease-release-at-exit branch November 24, 2026 23:48
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