mongodb: vendor chart via git subtree (alternative to #2420)#2423
Closed
delthas wants to merge 17 commits into
Closed
mongodb: vendor chart via git subtree (alternative to #2420)#2423delthas wants to merge 17 commits into
delthas wants to merge 17 commits into
Conversation
Required because `git subtree add` cannot run against an existing prefix. The next commit will re-introduce the chart at the same prefix as a `git subtree add --squash` of upstream bitnami/charts at tag mongodb-sharded/9.4.4. Issue: ZENKO-5281
… commit d2eb70018d git-subtree-dir: solution-base/mongodb/charts/mongodb-sharded git-subtree-split: d2eb70018dc4de99fb5c7074265830307470367b
…base/mongodb/charts/mongodb-sharded'
The bitnami packager bundles `bitnami/common` inline under `charts/common/` in the OCI-published chart, but the git source tree does not include it. `helm dependency build` resolves it from oci://registry-1.docker.io/bitnamicharts/common per the `Chart.lock`-pinned version, and we extract the resulting tarball to a directory so `solution-base/build.sh`'s `helm template` invocation finds it as a sub-chart at `charts/common/`. Issue: ZENKO-5281
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
20db1d3 to
a2f47ce
Compare
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-configsvr-service-file.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/update-default-values.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-exporter-configuration.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-configsvr-service.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-add-pv-selector.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-sharded-fix-podmonitor.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongos-dep-sts.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/replicaset-entrypoint-configmap.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/statefulset-permissions.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/redirect-logs-to-stdout.patch. Issue: ZENKO-5281
Migrated from solution-base/mongodb/patches/mongodb-exporter-disable-collect-all.patch. Issue: ZENKO-5281
All local modifications previously expressed as .patch files in this directory have been migrated to individual git commits applied on top of the `git subtree merge` of upstream `bitnami/mongodb-sharded/9.4.4`. Future upstream merges will produce real three-way merge conflicts against those commits, instead of silent `patch` failures. Issue: ZENKO-5281
Replace the old `helm fetch` + `make patch` flow with `git subtree`- based vendoring of the bitnami/charts GitHub repository: * `solution-base/mongodb/Makefile` — adds the standard subtree machinery (`create-remote`, `fetch-remote`, `update-vendor-branch`, `vendor-sync`) mirroring `solution-base/images/Makefile`. The single maintainer-facing command is `make -C solution-base/mongodb vendor-sync`. `deps` is split out so a fresh clone with a stale `charts/common-*.tgz` can be re-resolved without re-running the ~4-minute subtree split. * `solution-base/mongodb/how_to_upgrade.md` — rewritten to describe the new flow: bump `CHART_VERSION`, run `make vendor-sync`, resolve any three-way merge conflicts as ordinary git conflicts, and keep local tweaks as follow-up commits. * `.github/workflows/end2end.yaml` — remove the `check-mongo-patches` job. Its purpose (verify `make fetch && make patch` produces no drift) no longer applies; there is no `make patch` to verify. Local modifications are now ordinary commits with their own review history, and upstream-vs-local conflicts surface during `git subtree merge` directly. * `.github/copilot-instructions.md` — point the "Chart upgrade path" row at the new flow. Issue: ZENKO-5281
a2f47ce to
9fed52a
Compare
Contributor
Author
|
Closing — the subtree implementation has been force-pushed onto #2420, which keeps the original review history. The branch this PR points at will be deleted shortly. |
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.
Draft — alternative implementation of ZENKO-5281; the team will pick this or #2420 and close the other.
Summary
Switch
solution-base/mongodb/Makefilefromhelm fetchagainstcharts.bitnami.comto vendoring the chart sources from thebitnami/chartsGitHub repository viagit subtree, mirroring the pattern that ZENKO-5110 already established for vendored Bitnami images insolution-base/images/Makefile. All 11 local modifications previously expressed as.patchfiles now live as ordinary git commits on top of the subtree merge.Why this exists alongside #2420
The first PR for ZENKO-5281 (#2420) implemented the same goal via
curl | tarof the GitHub release tarball. PR reviewer @francoisferrand suggestedgit subtreeinstead, both to match thesolution-base/images/precedent and to make future upstream merges produce real three-way merge conflicts rather than silentpatchoverwrites. This PR is that alternative; we'll compare locally and merge whichever the team prefers.What changes
solution-base/mongodb/Makefile— full rewrite. New targetscreate-remote,fetch-remote,update-vendor-branch,vendor-sync,deps. The single maintainer command ismake -C solution-base/mongodb vendor-sync(~4 minutes — fetchesbitnami/chartshistory, runsgit subtree split, merges as squash, re-resolvescommon).solution-base/mongodb/charts/mongodb-sharded/— re-introduced as agit subtree --squashof upstream tagmongodb-sharded/9.4.4. Thecommonlibrary chart is resolved viahelm dependency buildand extracted intocharts/common/sosolution-base/build.sh'shelm templatefinds it as a sub-chart.solution-base/mongodb/patches/deleted entirely.solution-base/mongodb/how_to_upgrade.mdrewritten to describe the new flow..github/workflows/end2end.yaml—check-mongo-patchesjob removed (it verifiedmake fetch + make patchproduced no drift; with patches gone there is nothing to verify, and conflicts now surface as ordinary git merge conflicts duringmake vendor-sync)..github/copilot-instructions.md— the Chart upgrade-path row now points atMakefile+make vendor-syncinstead ofpatches/+make patch.What does NOT change
CHART_VERSIONbump +make vendor-syncwhose merge brings in upstream'spgrep -xliveness probe fix.solution-base/deps.yamlis untouched — image references are independent and addressed under ZENKO-5110.solution-base/build.shis untouched — it expectscharts/common/as an extracted directory, which the new Makefile preserves.Verification
helm templateagainst this branch and against mongodb: vendor chart via git subtree from bitnami/charts #2420's branch produce identical manifests (modulo helm-generated random Secret values per invocation).make -C solution-base/mongodb vendor-syncis idempotent againstmongodb-sharded/9.4.4: re-running on a clean tree produces no diff.Costs
make vendor-syncis a ~4-minute coffee break (subtree split walks 36 599 upstream commits)..gitgrowth of ~41 MB in the maintainer's clone from the synthesized subdir commits; not pushed to origin.bitnami-chartsremote needs to be configured (Makefile does this automatically on first run).Issue: ZENKO-5281