You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2026/05/15 21:23:26 UTC

[PR] fix(lifecycle): post-refactor cleanup (gating, Helm RBAC, docs) [superset-kubernetes-operator]

villebro opened a new pull request, #58:
URL: https://github.com/apache/superset-kubernetes-operator/pull/58

   ## Summary
   
   Polish pass on the recent refactor (PRs #55–#57). Fixes two user-blocking bugs surfaced after the CRD collapse and Job-based lifecycle pipeline:
   
   - Helm-installed operators couldn't run lifecycle tasks because the chart's `managerRules` was missing `batch/jobs` — the kustomize RBAC had drifted from the Helm template.
   - The minimal `Superset` CR in `docs/getting-started.md` failed CRD validation because `spec.image` was omitted (it's required).
   
   Also closes a Supervised-upgrade gating bug where `LastLifecycleImage` never advanced when no task would actually run (lifecycle disabled, or every task disabled), so users got stuck in `AwaitingApproval` indefinitely after bumping the image tag. Related: the upgrade approval annotation was being cleared *before* status was persisted in `finalizeLifecycle`, so a status patch failure would re-gate the next reconcile.
   
   The rest of the change set is targeted polish: stale doc references (lifecycle tasks now run as Jobs, not bare Pods), an unused-`Idle`-phase removal, a typo fix (`Supervsied` → `Supervised`), explicit operator precedence, and a few `omitempty` API-status cleanups.
   
   ## Details
   
   **Behavior fixes**
   - `internal/controller/lifecycle.go`: extracted `settleLifecycle` helper used by all three completion paths (lifecycle-disabled, no-tasks, post-task finalize). Each path now advances `Status.LastLifecycleImage`. New user-facing message `"No lifecycle tasks configured"` for the no-tasks path.
   - `internal/controller/lifecycle.go` + `superset_controller.go`: moved upgrade approval annotation clearing into a separate helper called from the parent reconciler *after* the post-lifecycle status patch. Eliminates the race where a status-patch failure would strand the cleared annotation.
   - `internal/controller/schedule.go`: `validateSchedules` only sets `ScheduleValid=True` when at least one schedule is actually configured; removes the stale condition when the schedule is unset.
   
   **Helm**
   - `charts/superset-operator/templates/_helpers.tpl`: added `batch/jobs` rule and aligned `pods` verbs with the kustomize source of truth.
   
   **API**
   - `api/v1alpha1/superset_types.go`: `omitempty` + `// +optional` on `ComponentRefStatus.Ready` and `.Ref`; corrected misleading comments on `MaintenancePageSpec.PodTemplate` ("nested within deployment template" — it isn't) and `CeleryBeatComponentSpec` (the spec exposes no replicas field).
   - Regenerated CRD YAML and `docs/reference/api-reference.md`.
   
   **Docs**
   - `docs/getting-started.md`: added required `spec.image`.
   - `docs/user-guide/lifecycle.md`: fixed maintenance custom-image example (`podTemplate` is a sibling of `deploymentTemplate`, not nested); Pod→Job terminology audit.
   - `docs/user-guide/configuration.md`: per-component `sqlaEngineOptions` override location is `lifecycle`, not `init`.
   - `docs/architecture/internals.md`: task workload type `bare Pod` → `Job`; added missing Clone and Rotate rows.
   
   **Tests**
   - `internal/controller/lifecycle_settle_test.go`: 5 tests covering the gating fix and annotation race.
   - `internal/controller/schedule_test.go`: 3 tests covering `ScheduleValid` condition behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(lifecycle): post-refactor cleanup (gating, Helm RBAC, docs) [superset-kubernetes-operator]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #58:
URL: https://github.com/apache/superset-kubernetes-operator/pull/58#issuecomment-4463866619

   ## [Codecov](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `76.31579%` with `9 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 77.74%. Comparing base ([`d3d307e`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/d3d307e0111d825b47c928e1051fcdec2a484389?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1e05417`](https://app.codecov.io/gh/apache/superset-kubernetes-operator/commit/1e05417c33c97608751a64aa47313ec567f6c563?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [internal/controller/lifecycle.go](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?src=pr&el=tree&filepath=internal%2Fcontroller%2Flifecycle.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZXJuYWwvY29udHJvbGxlci9saWZlY3ljbGUuZ28=) | 70.83% | [3 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [internal/controller/superset\_controller.go](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?src=pr&el=tree&filepath=internal%2Fcontroller%2Fsuperset_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW50ZXJuYWwvY29udHJvbGxlci9zdXBlcnNldF9jb250cm9sbGVyLmdv) | 0.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset-kubernetes-operator/pull/58?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(lifecycle): post-refactor cleanup (gating, Helm RBAC, docs) [superset-kubernetes-operator]

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #58:
URL: https://github.com/apache/superset-kubernetes-operator/pull/58


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org