Repository navigation
fix(runnerhub): reap a Runner's session bindings in every tenant on enroll (RIG-4296) - #1606
Merged
trunk-io[bot] merged 3 commits intoOct 4, 2026
Merged
Conversation
|
😎 Merged successfully - details. |
|
Compass engineering docs preview: https://compass-comms-rig-4296-enrol.compass-eng-docs.pages.dev Deployed from |
rigel-mintaka
marked this pull request as ready for review
October 4, 2026 13:52
mattwilkinsonn
approved these changes
Oct 4, 2026
…RIG-4296) When the durable sweep faults, enroll archives the RAM snapshot of the Runner's sessions. It ran those archives under the enroll ctx, which has no tenant. Each archive now resolves the session's tenant through runnerSessionCtx; the failed sweep left the rows, so the lookup still works. Main already reaps every tenant under the system role (RIG-2872), so this change covers only the fallback path. A pgtest pins each swept session archiving under its own tenant, the bootstrap tenant included. Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-comms/rig-4296-enroll-reap-all-tenants
branch
from
October 4, 2026 16:38
db51705 to
2398338
Compare
… check into the cross-tenant test (RIG-4296) Co-authored-by: Matt Wilkinson <matt@rigel.build>
mattwilkinsonn
approved these changes
Oct 4, 2026
trunk-io
Bot
deleted the
compass-comms/rig-4296-enroll-reap-all-tenants
branch
October 4, 2026 20:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the durable enroll sweep fails,
Hub.enrollfalls back to the in-RAM snapshot of the Runner's sessions and archives each one. It ran those archives under the enroll ctx, which has no tenant. So a non-bootstrap session readSessionMaxEntrySeq = 0under the bootstrap tenant's RLS and was silently not archived.Main already reaps every tenant under
store.WithSystemRoleand archives each swept row under its own tenant (RIG-2872, #1509). After the rebase this PR keeps only the fallback fix:runnerSessionCtx(the failed sweep leaves the rows). If the store doesn't answer, the archive runs unscoped as before. A session id bound in several tenants (ErrConflict) is skipped, asdropLostSessiondoes.Tests:
TestEnrollReapFaultArchivesUnderSessionTenant: a faulted sweep archivessess-1under its tenant. It fails on the old code (tenant"").TestEnrollReapFaultSkipsAmbiguousSessionArchive(synctest): an ambiguous id is not archived. Removing theokcheck fails it.TestEnrollReapsSessionBindingAcrossTenants(pgtest) also asserts that tenant B's archive runs under tenant B.Spec-impact: none
Refs RIG-4296
Co-authored-by: Matt Wilkinson matt@rigel.build