Skip to content

Fix rotate CLI skipping endpoints due to list mutation during iteration#71

Merged
gijzelaerr merged 1 commit into
mainfrom
spotify/fix-rotate-endpoint-skip
Jul 7, 2026
Merged

Fix rotate CLI skipping endpoints due to list mutation during iteration#71
gijzelaerr merged 1 commit into
mainfrom
spotify/fix-rotate-endpoint-skip

Conversation

@gijzelaerr

Copy link
Copy Markdown
Member

old_cert.endpoints is a live SQLAlchemy relationship. When request_rotation reassigns endpoint.certificate = new_cert, the endpoint is removed from the collection mid-iteration, causing one endpoint to be skipped per rotation call.

Wrap in list() to snapshot the collection before iterating.

`old_cert.endpoints` is a live SQLAlchemy relationship. When
`request_rotation` reassigns `endpoint.certificate = new_cert`, the
endpoint is removed from the collection mid-iteration, causing one
endpoint to be skipped per rotation call.

Wrap in `list()` to snapshot the collection before iterating.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28855530653

Coverage remained the same at 59.879%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 992
Covered Lines: 594
Line Coverage: 59.88%
Coverage Strength: 0.6 hits per line

💛 - Coveralls

@gijzelaerr gijzelaerr merged commit 31b26b5 into main Jul 7, 2026
14 checks passed
@gijzelaerr gijzelaerr deleted the spotify/fix-rotate-endpoint-skip branch July 7, 2026 09:29
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.

2 participants