gateway: fix update_refs crash on untagged transitive entries#858
Merged
Conversation
update_refs crashed with AttributeError when actions.yml contained an entry where the SHA key had no nested value (parses as None in Python). Two such untagged-transitive entries were added in #853 (carabiner-dev install/{ampel-bootstrap,download-and-verify}), which made the update_actions workflow fail on every subsequent dependabot bump touching those keys (e.g. PR #856 bumping carabiner-dev/actions 1.1.7 -> 1.2.0). Initialize the empty dict in place so the expiry update path runs on these entries the same way it does on any other. Generated-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ppkarwasz
approved these changes
May 20, 2026
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
AttributeError: 'NoneType' object has no attribute 'get'inupdate_refswhenactions.ymlhas an entry like<sha>:with no nested value (parses asNone).carabiner-dev/actions/install/ampel-bootstrapandinstall/download-and-verify). Every subsequent dependabot bump touching those keys now fails theupdate_actionsworkflow — see the failing run on action-allowlist-review: bump carabiner-dev/actions from 1.1.7 to 1.2.0 in /.github/actions/for-dependabot-triggered-reviews #856 (1.1.7 → 1.2.0): https://github.com/apache/infrastructure-actions/actions/runs/26071060591/job/76652366856?pr=856.expires_atand the new SHA is added.Test plan
uv run pytest gateway/test_gateway.py(8/8 pass, including newtest_update_refs_none_details)actions.yml(old SHAs gainexpires_at, new v1.2.0 SHAs added).update_actionsjob on PR action-allowlist-review: bump carabiner-dev/actions from 1.1.7 to 1.2.0 in /.github/actions/for-dependabot-triggered-reviews #856 (or wait for the next dependabot bump) to confirm it no longer crashes.