Repository navigation
Write the migration-related settings in a fixed order - #1692
fontaineajulien wants to merge 1 commit into
Conversation
needsMigrationSetting() ranged over a map and returned at the first false setting, so settings.py differed between reconciles: the pulp-server Secret flipped, the pulpcore pods were reprovisioned, and the rollout triggered more reconciles. Iterate over sorted keys and skip false settings instead of stopping. fixes pulp#1691 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fontaineajulien The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @fontaineajulien. Thanks for your PR. I'm waiting for a pulp member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Fixes #1691.
needsMigrationSetting()ranged overMigrationSettingsList(), which is a map, and returned at the firstfalsesetting. Go map order is random, so the same CR produced a differentsettings.pyfrom one reconcile to the next. Depending on the order,REDIRECT_TO_OBJECT_STORAGE = Truewas present or missing, or the two lines swapped places. Each change rewrote the<name>-serverSecret and reprovisioned the pulpcore pods, and the resulting rollout triggered more reconciles, so the loop fed itself.This PR:
sortKeyshelper;continueinstead ofreturnon afalsesetting, so afalsesetting no longer hides the ones after it.Tests: the new
controllers/repo_manager/secret_test.goruns the function 100 times. On the current code both cases fail within a few runs:settings = ""instead ofREDIRECT_TO_OBJECT_STORAGE = True;With the fix, both tests pass.
go test ./...passes, including the envtest suite.