Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Amber reviewStatus: Complete |
b482dbf to
42b8946
Compare
467cde1 to
6c90c62
Compare
deploy/base/{api-server,control-plane,platform} were left behind by the
platform/applications split (openshift-online#355). No kustomization referenced them, and
they had drifted from the live copies in base/applications and
base/platform-resources, yet update-openshell still named one as the
source of truth for image pins.
- delete the three orphan directories (kustomize build output is
byte-identical for base, kind, openshift, ibm, hub, gitops/*)
- repoint stale deploy/base/{controller,api-server}.yaml references
- add scripts/check_deploy_orphans.py, wired into make check
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seeding the traversal with every kustomization.yaml let a dead subtree that ships its own kustomization pass. Roots are now kustomizations outside deploy/base plus deploy/base/kustomization.yaml; nested base kustomizations count only when a reachable parent references them. Add unit tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
332c326 to
4366278
Compare
There was a problem hiding this comment.
Verdict
This remains a clean, well-scoped deploy-tree cleanup: the orphaned deploy/base/{api-server,control-plane,platform} manifests are removed, every doc/comment/spec/script reference is repointed to the surviving deploy/base/applications/api-server.yaml and deploy/base/platform-resources/controller.yaml, and a check-deploy-orphans guard is wired into make check. I land at COMMENT only to surface a cross-PR coordination issue that needs a maintainer merge-order decision; the change itself is sound.
Findings
No new findings in this PR.
I re-verified at head 4366278:
python3 scripts/check_deploy_orphans.pyexits 0 (no orphans remain).python3 -m unittest scripts/test_check_deploy_orphans.pypasses all 4 cases, including the self-contained dead-subtree case (exit 1) and the overlay-referenced subtree case (exit 0).deploy/base/kustomization.yamlreferences onlyplatform-resourcesandapplications; the deletedcontrol-plane/,api-server/, andplatform/directories were unreferenced, so the orphan guard confirms they were genuine orphans.- The only surviving textual mention of a deleted path is the intentional changelog note in
skills/tooling/update-openshell/SKILL.mdrecording the prior wrong-path correction; it is not a live reference.
Notes (non-blocking)
- The PR body claims
kustomize buildoutput is byte-identical before/after for all overlays.kustomizeis not available in the review sandbox, so I could not reproduce that assertion; a reviewer withkustomizeshould confirm it. The reference repointing is internally consistent and the orphan check confirms the deleted paths were genuinely unreferenced.
Cross-PR coordination
A separate open pull request (#479, the OpenShell v0.1.2-rhaiv.7 bump) edits deploy/base/control-plane/deployment.yaml - the file this PR deletes - to re-pin GATEWAY_IMAGE / GATEWAY_SUPERVISOR_IMAGE, keeps it in sync with deploy/base/platform-resources/controller.yaml on the premise that the pair must agree, and also edits the same skills/tooling/update-openshell/SKILL.md and several specs/platform/* files. This PR deletes deploy/base/control-plane/deployment.yaml as a redundant orphan, makes platform-resources/controller.yaml the single source of truth, and rewrites the skill to drop the "both must agree" guidance. The two PRs encode opposite assumptions about that manifest, so they need a maintainer decision rather than an automatic merge:
- Decide merge order and confirm
platform-resources/controller.yamlis the single source of truth for the image pins. - Ensure #479's image-pin bump lands in the surviving
deploy/base/platform-resources/controller.yaml, and that the half of #479 targeting the deleteddeploy/base/control-plane/deployment.yamlis dropped rather than silently lost or resurrecting the removed file. If #479 merges after this PR and re-addsdeploy/base/control-plane/deployment.yaml, the newcheck-deploy-orphansguard inmake checkwill flag it as an orphan (it is referenced by no kustomization), so the resurrection surfaces as a failing policy check rather than silently. - Reconcile the conflicting edits to
skills/tooling/update-openshell/SKILL.mdand the sharedspecs/platform/*files: #479 still namescontrol-plane/deployment.yamlas a source-of-truth pin location, while this PR removes those references.
Previous concerns
- [Minor] Orphan guard misses an orphaned subtree that carries its own
kustomization.yaml(discussion) - addressed.main()restricts roots to[k for k in kustomization_files() if BASE not in k.parents or k.parent == BASE], and a nested basekustomization.yamlenters the reachable set only when a reachable parent references its directory (scripts/check_deploy_orphans.py). The companiontest_orphan_subtree_with_own_kustomization_failsasserts exit 1 for a self-contained dead subtree, and I re-confirmed the suite passes (4/4) and the policy exits 1 on that synthetic case. I am not opening a new inline thread for this; see the linked discussion. - [Minor] Stray blank line in the
check-deploy-orphansrecipe (previous review) - addressed.Makefilenow places thepython3 scripts/check_deploy_orphans.pyrecipe directly undercheck-deploy-orphans: test-deploy-orphans-policywith no intervening blank line.
The committer addressed the previous concerns.
Findings Summary (ordered by severity, highest first)
- [Minor] Cross-PR coordination: another open PR re-pins images in the duplicate control-plane manifest this PR deletes and edits the same skill/specs; needs a merge-order and single-source-of-truth decision - Cross-PR coordination
Convention Checklist
| Convention | Result |
|---|---|
| Conventional commit messages | Pass |
| Image references consistent across the stack (single source of truth) | Pass |
| Doc/comment/spec references point to real files | Pass |
make check guard wired in and functional (incl. orphan-subtree case) |
Pass |
| Test changes additive, new guarantees covered by tests | Pass |
| No secrets in logs or responses | Pass |

Summary
deploy/base/{api-server,control-plane,platform}: leftovers from the platform/applications split (refactor(deploy): separate platform and application GitOps packages #355). No kustomization referenced them, and they had drifted from the live copies inbase/applicationsandbase/platform-resources(e.g.sslmode=disable, old health port), yetupdate-openshellstill namedcontrol-plane/deployment.yamlas the image-pin source of truth.deploy/base/controller.yaml/api-server.yamlreferences (comments, skills, specs) to the real files;platform-resources/controller.yamlis now the single source of truth for image pins.scripts/check_deploy_orphans.py(make check-deploy-orphans, part ofmake check) to fail on anydeploy/baseYAML not reachable from a kustomization.Verification
kustomize buildoutput is byte-identical before/after forbase,kind,openshift,ibm,hub,gitops/platform,gitops/applications.hypershell-gitopsconsumes onlydeploy/hub,deploy/gitops/platform,deploy/base/keycloak/themeandgitops-base/components/openshift-dashboard-metrics; none touch the deleted paths.🤖 Generated with Claude Code