Skip to content

fix(envoy-client): release global handle after shutdown - #5848

Open
DevChiniwala wants to merge 2 commits into
rivet-dev:mainfrom
DevChiniwala:fix/envoy-client-release-global-handle
Open

DevChiniwala wants to merge 2 commits into
rivet-dev:mainfrom
DevChiniwala:fix/envoy-client-release-global-handle

Conversation

@DevChiniwala

Copy link
Copy Markdown
  • Release the cached global Envoy handle after shutdown cleanup.
  • Add regression coverage that verifies the callback context is released.

Fixes #5766

Copilot AI balanced review requested due to automatic review settings October 7, 2026 15:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues found

Reviewed commit 49f2fb2.

@DevChiniwala

Copy link
Copy Markdown
Author

The Co review passed with no findings. GitHub has not run the latest-head Rust CI because it requires maintainer approval: Rust CI. Could a maintainer approve that run so the Envoy lifecycle regression can be checked in CI? The cached handle is cleared only if it still belongs to the stopping instance, before the stopped notification is published.

@DevChiniwala

Copy link
Copy Markdown
Author

Updated this branch in 52ca24ac, merging current main (9e01a0ac) and resolving the conflict.

  • Release the matching global handle after ordinary shutdown, before publishing the stopped signal.
  • Preserve upstream's intentional caching of terminal registration errors. A new regression drives the real registration-rejection path and checks that the same handle and error remain cached.
  • The ordinary-shutdown regression still fails on unchanged current upstream, confirming that the callback-retention defect remains relevant.

Validation on the pushed source tree:

  • cargo +1.98.0 test -p rivet-envoy-client --locked: 2 passed; no network connection required.
  • Scoped Rust formatting, locked workspace metadata, and cargo +1.98.0 rustc -p rivet-envoy-client --locked -- -D warnings: passed.
  • Optional Clippy checks remain failing under the workspace's simulation-migration lint policy; comparisons against unchanged upstream with the same regression fixtures reproduce the failures. No lint suppressions or unrelated migrations were added.

Upstream CI results are still pending; previous runs required maintainer approval. The wasm target and JS protocol generation were not exercised by these native checks. The updated code and regression coverage are pushed and available for review.

@RivetAgent

Copy link
Copy Markdown
Contributor

Changes look good; no high-confidence bugs or compliance issues found.

The global-handle cleanup preserves terminal registration errors and checks instance identity before clearing the cache. The new lifecycle tests cover both ordinary shutdown and rejection retention.

No issues found. Checked for bugs and CLAUDE.md compliance; no CLAUDE.md files were present.

Limitations: Tests were not run. GitHub authentication was unavailable, so PR status and prior Claude comments could not be verified.

Copy prompt to fix all
Fix all actionable findings in the latest Ironworks code review on PR rivet-dev/rivet#5848. Inspect every referenced location, address each finding without changing unrelated behavior, run the relevant tests, and summarize what changed.

This branch has not been deployed

No deployments
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.

Native registry process does not exit after registry.shutdown() resolves (GLOBAL_ENVOY retains referenced TSFNs)

3 participants