Repository navigation
fix(maintenance): an unready ServicePrincipal is not a schedule, and the CronJob is removed (operator#583) - #584
Merged
Conversation
…nJob is removed (operator#583) - reconcile_catalog splits the Some arm on status.ready: unready writes MaintenanceReady=False reason=RunnerNotReady with the principal's own condition text, and applies no CronJob. - The missing- and unready-principal arms delete maint-<catalog> (its Jobs go with it through owner references). - delete_ignoring_not_found is pub(crate); two tests cover the arms.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
What
reconcile_catalogincrates/stardelt-operator/src/maintenance.rshas three arms on the pipelineprincipal instead of two:
False NoRunner(unchanged)maint-<catalog>deletedstatus.ready: falseFalse RunnerNotReady, message from the principal's own non-True condition (ClientNotSetUp: …) or the missingsp-<principal>Secretmaint-<catalog>deletedTrue Scheduled(unchanged)delete_ignoring_not_found(controller.rs) is nowpub(crate)so the controller's 404-tolerantdelete is reused; the Jobs of
maint-<catalog>go with the CronJob through owner references.Patch applied exactly as the ticket supplies it (
git apply 583.patch, extracted from the issue body).Tests
maintenance::tests::an_unready_pipeline_principal_writes_runner_not_ready_and_removes_the_job— asserts
DELETE …/cronjobs/maint-mobility, no CronJob PATCH, status carriesRunnerNotReadyandClientNotSetUpand noScheduled.a_missing_pipeline_principal_writes_no_runner_and_removes_the_job— asserts the same DELETEand no CronJob PATCH (was: assertion that
/cronjobs/never appears)."status":{"ready":true}.Verify
Mutation checks (each reverted afterwards):
Remaining
No CRD change, no chart change, no live cluster change: the image is rolled out separately.
Refs #583