Repository navigation
An update continues its own version, and permission holds name only what is newly allowed - #969
Merged
Merged
Conversation
…hat is newly allowed A scheduled update held for a person (it changes permissions) left no update "running", so the next hourly check prepared the same release again and marked the waiting one superseded by its own version, every hour, and it never applied. A change set CloudFormation took longer than the running limit to make was refused the same way. - begin: a second start for the same version (the hourly check, an admin's press, a waiting press) continues the prepared change set (same_version_open, continue_open). An admin's press with their OK for permission changes lets that change set apply. A newer release still replaces an older one that hasn't run. - Permission changes are compared as grants (who, action, resource, condition) across every role, policy and resource policy of a part together (grant_difference). Only a grant no running one covers, or a deny or boundary the new release drops, holds an update, and the hold says what becomes newly allowed. A statement moved between a role's policies, a different order, a log group's ARN with or without ":*", an added condition or a removed action applies by itself. NotAction, NotResource and NotPrincipal statements, and anything that can't be compared, still count whenever they differ. The release notes (iam_diff.py) use the same comparison. - The hourly check: a refused start writes its row and the check goes on (reminders, the digest); the second refusal in a row of the same version emails the admins once (the update notice), and the status route returns it as auto_refused. - Tests: hourly ticks and 5-minute polls against a slow change set end applied with one change set and nothing superseded; a held update is never prepared again and applies on the admin's OK; widening, narrowing, equivalent and new-ARN cases for the grant comparison. Incident case xs.
…let ? cover * in a grant - begin's refusals (written to history as not_started) raise StartRefused. The hourly check counts and emails only those; a wait (ReleaseNotReady, another update still being prepared or running) writes nothing, sends nothing, and leaves the count as it is. - Grant coverage compares pattern with pattern (_pattern_covers): a ? in the running grant covers one character or a ?, never a *; only a * covers a * in the new grant. Used for actions and resources, so the release notes (iam_diff.py) follow it too. - Tests: waits never counted or emailed, a wait between refusals, begin marking only its recorded refusals; ?, * and mixed patterns, a running ? against a new *, and the release notes path.
coderhelm
Bot
dismissed
their stale review
December 5, 2026 02:33
Superseded by CoderHelm's latest review
Contributor
|
💚 Post-merge health check passed: the deploy of
|
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.
Summary
A scheduled update held for a person (it changes permissions) was prepared again by the next hourly check, and the update waiting was marked superseded by an update to its own version, every hour, so it never applied. The holds also counted policy edits that allow nothing new. Now a second start for the same version continues the prepared change set, permission changes are compared as what they allow, and an hourly check that can't start its update says so once.
Changes
beginlooks for a prepared update to the same version first (same_version_open) and continues it (continue_open) instead of preparing a new one. The hourly check changes nothing on it and reports that it waits, with the hold. An admin's press makes it theirs, and with their OK for permission changes the same change set applies. One prepared without the deploy role the install has now, or whose change set can no longer run, is prepared again. A newer release still replaces an older one that hasn't run.grant_differencereads every role, policy and resource policy of a part as grants (who, action, resource, condition) on both sides. Only a grant no running one covers, or a deny or permissions boundary the new release drops, holds an update. A statement moved between policies of the same role (CDK overflow policies), a different order, a log group's ARN written with or without:*, an added condition, fewer condition values, or a removed action or resource applies by itself.NotAction,NotResource,NotPrincipal, a policy written as text, and anything that can't be resolved count whenever they differ. The hold says what becomes newly allowed, for example:newly allows sqs:GetQueueAttributes, sqs:GetQueueUrl, sqs:SendMessage on TicketQueue for the AWS service events.amazonaws.com when aws:SourceArn is MonthTurnSchedule. Lambda permissions, function URLs and other IAM types keep the comparison they had.iam_diff.pyuses the same comparison, so the notes list the same changes an install would hold for.failed), andGET /api/system/versionreturns it asauto_refused. A held update already emails once ("needs your OK") and shows its hold on Settings, System.docs/self-host/updates.md(what counts as a permission change, same-version updates, the email). Incident casexs_update_continues_its_own_version.Verification
python3 -m unittest discover -s lambda/tests: 664 tests pass. New:test_updater_same_version.pyreplays hourly checks and 5-minute polls against a change set CloudFormation takes hours to make, and one held for a person; each ends applied with one change set and no superseded row. On the previous handler the held replay made a change set every hour and the slow one was refused.test_updater_grants.pycovers widening (held, named), narrowing (applied), reorder and equivalent rewrites including an overflow move and a log group's two ARNs (applied), a new resource ARN (held), a dropped deny or boundary (held), and the scheduled path end to end.python3 -m unittest discover -s .github/scripts: 222 pass.iam_diff.py diffrun on two published releases' native templates: the log group rewrite is no longer listed; the queue policy's new sender is, in the words above.check_workflows.py,brand_spelling.py,domain_examples.pypass. The new incident case isrustfmt --checkclean and its string checks were run against the handler; the fullincidents::suite runs in CI.