Repository navigation
Conversation
Automate Helm CLI version bumps across rhdh-must-gather upstream and rhidp/rhdh distgit, including Konflux .tekton prefetch (CGW generic vs vendored gomod). Covers the multi-repo workflow introduced for RHIDP-16046. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Restructure SKILL.md with verification gates, success criteria, and E2E triage pointers from rhdh-must-gather#284. Add references for Helm 4 OCI stdout, Konflux/E2E verification, and CGW flat tarball layout. Script now updates sync/upstream_SHA_rhdh-must-gather and removes stale distgit vendor/helm on the CGW path. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Reflect merged upstream checksum verify (verify-helm-tarball.sh), TARGETPLATFORM arch field-2 notes, and midstream !697 lesson: sync hack/ into distgit and stop excluding it in upstream_repos.yml so Stage 2a COPY does not break after bot sync. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Midstream main already keeps hack/ in sync; the bump skill only needs to copy verify-helm-tarball.sh and document #284 hardening (checksum verify, TARGETPLATFORM field-2, E2E pipefail). Remove ensure_hack_not_excluded and related docs/tests. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Scope components.yaml prefetch to must-gather only, stop copying upstream root Containerfile onto hermetic distgit, regenerate distgit Containerfile from .rhdh/docker (preserving VERSION/MIDSTREAM_REPO), flip Stage 2a/2b bidirectionally, sync whole hack/ and vendor/ (omit helm on CGW), and tighten script guards plus skill prose. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve README conflict with main's catalog-first layout, move rhdh-must-gather-helm-bump under skills/ci/, register it in catalog.json / marketplace / ask-rhdh routes, and satisfy catalog Completion + name-only composition rules. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
CI lint job failed on `ruff format --check` for the new unit test file. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerating from .rhdh/docker/Containerfile was dropping the Brew/Konflux ENV SUMMARY/LABEL block that sync-midstream appends. Keep that footer, and stop flipping upstream Containerfiles on --skip-upstream. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
When regenerating distgit Containerfile from .rhdh/docker, increment LABEL release and the matching konflux.additional-tags version-release suffix (e.g. 2.0-1 → 2.0-2), mirroring sync-midstream.sh. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Match the rhdh-skill convention of Python bundled scripts so the Helm bump workflow is easier to test and maintain than the previous bash implementation, while preserving CGW/vendor sync and Tekton prefetch behavior. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
schultzp2020
left a comment
There was a problem hiding this comment.
The CGW vs vendor split, and editing only must-gather's prefetch, are the right idea. I'd tighten the apply path before this runs against rhidp/rhdh. --check and --skip-upstream can pick different modes, 2.0-10 becomes 2.0-20, and a failed git status looks clean. Tests don't hit those cases. On Windows the new file fails on shebang exec (WinError 193) before rsync is involved.
Comments below are the hunks I'd change. While you're there: don't write upstream_SHA from a dirty HEAD; require hack/check-helm-binary-available.sh and turn a missing bash/rsync into die(); run tests via sys.executable and actually bump --to off the 4.2.3 fixture (the lockfile stubs are no-ops); cover --dry-run, push.yaml, and 2b back to 2a. Same skills/ci/... path is in the script docstring. PR body still names bump-must-gather-helm.sh.
Address review on the apply path: probe upstream for CGW vs vendor on apply, fail git status errors, numeric-boundary release tags, discover rhdh-downstream, gate writes behind /mutation-gate, and run tests via sys.executable with a real --to bump. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
schultzp2020
left a comment
There was a problem hiding this comment.
Thanks. I would wait to merge until you fix the two apply-path comments.
Die on dirty upstream HEAD before distgit/SHA writes, treat probe exit 1 as vendor and any other code as fatal, and document --skip-downstream then --skip-upstream as the apply path. https://redhat.atlassian.net/browse/RHIDP-16046 Generated-by: cursor Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
||
| Piping `helm template … | kubectl apply` fails validation (`apiVersion not set, kind not set`) unless those status lines are stripped. Upstream E2E uses `helm_template_yaml()` in `tests/e2e/lib/test-utils.sh`. | ||
|
|
||
| Must-gather **collection** scripts do not pipe template output to kubectl today. If a future collector adds that pattern, filter pull lines or use `--output-dir` + `kubectl apply -f`. |
There was a problem hiding this comment.
I don't think this will ever happen. The must-gather collection scripts never create resources in the cluster, but only collect data. So seeing a kubectl apply in any of the collectors would be a red flag.
Right now, kubectl apply -f is indeed run as part of the E2E setup phase to deploy the necessary resources.
Thanks. I would wait to merge until you fix the two apply-path comments.
Fixed, please have another look?
There was a problem hiding this comment.
This skill may not be needed anymore. With the rewrite of the must-gather in Golang (RHIDP-16540), it no longer depends on the Helm binary directly, but instead consumes the Helm Go SDK.
There was a problem hiding this comment.
so we don't have to update any of these files with every new RHDH .y or .z update?
| Repo | Path | What changes |
|---|---|---|
redhat-developer/rhdh-must-gather |
repo root | Makefile HELM_VERSION, artifacts.lock.yaml or vendor/helm/, Stage 2a/2b, hack scripts |
gitlab.cee.redhat.com/rhidp/rhdh |
distgit/containers/rhdh-must-gather/ |
Mirror helm-related files; regenerate hermetic Containerfile from .rhdh/docker/Containerfile |
| Same (midstream) | .tekton/rhdh-must-gather-2-{pull,push}.yaml |
prefetch-input (generic vs gomod) |
| Same | .tekton-templates/components.yaml |
must-gather.prefetch_input only |
| Same | sync/upstream_SHA_rhdh-must-gather |
Upstream commit SHA after sync |
There was a problem hiding this comment.
Correct. That was indeed part of the simplification we wanted to achieve with the full rewrite to Go.
Summary
Adds the
rhdh-must-gather-helm-bumpskill (skills/ci/) and bundledscripts/bump-must-gather-helm.pyto propagate a Helm CLI version bump across:redhat-developer/rhdh-must-gatherMakefileHELM_VERSION, CGWartifacts.lock.yamlorvendor/helm/, Stage 2a/2b onContainerfileand.rhdh/docker/Containerfilegitlab.cee.redhat.com/rhidp/rhdhdistgit/containers/rhdh-must-gather/; regenerate the hermetic distgitContainerfile; patch must-gather Tekton prefetch; writesync/upstream_SHA_rhdh-must-gatherThis is the Helm CLI in the must-gather image, not the RHDH Helm chart (
oci://quay.io/rhdh/chart). The script does not commit, push, or open a PR/MR.Catalog: registered under
skills/ci/incatalog.json, marketplace, and/ask-rhdhroutes.https://redhat.atlassian.net/browse/RHIDP-16046
What the script does
Preview (ungated):
--checkprobes CGW and printshelm_version=/mode=cgw|vendor.--dry-runprints the planned writes without touching trees. Approval to preview is not approval to apply.Apply (after
/mutation-gate; upstream and distgit/Tekton as separate operations):hack/check-helm-binary-available.sh(same probe for--checkand apply, including--skip-upstream):hack/update-helm-lockfile.sh→ Konfluxgenericprefetch on distgit root → Stage 2a activehack/update-vendor.sh helm→gomodprefetch onvendor/helm→ Stage 2b activeContainerfile,.rhdh/docker/Containerfile, and the regenerated distgitContainerfile.Makefile,artifacts.lock.yaml, entirehack/,.rhdh/docker/Containerfile, entirevendor/(on CGW, omit/deletevendor/helm; keepwebsocatetc.). Does not copy upstream rootContainerfileonto hermetic distgit.Containerfilefrom.rhdh/docker/Containerfile, preservingRHDH_MUST_GATHER_VERSIONand the Brew/KonfluxENV SUMMARY=/LABELfooter. Incrementsrelease="N"→N+1and thekonflux.additional-tagsversion-releasesuffix with a numeric boundary (2.0-1→2.0-2,2.0-10→2.0-11not2.0-20)..tekton/rhdh-must-gather-2-{pull,push}.yamlandmust-gather.prefetch_inputin.tekton-templates/components.yaml(genericvsgomod). Othercomponents.yamlentries are left untouched.sync/upstream_SHA_rhdh-must-gatherfrom a committed upstream HEAD. Refuses to pin a dirty HEAD (--allow-dirtystill does not write a SHA from uncommitted work).--skip-upstreamsyncs distgit + Tekton + SHA only.--skip-downstreambumps upstream only.Discovery and guards
--parent-dirfinds must-gather (1-must-gather, …) and midstream (4-rhdh,rhdh-downstream,rhidp-rhdh) only when the candidate hasdistgit/containers/rhdh-must-gather(skips a GitHubrhdhclone).hack/check-helm-binary-available.shon upstream; missingbash/rsyncis a hard error.git statusfailures (fatal: not a git repository, etc.) die instead of looking clean.bash,curl,git,rsync.Agent workflow (in
SKILL.md)--toagainst Helm releases.--check+--dry-run(preview)./mutation-gate.git diff+ references/verification.md (unit tests, Konflux, E2E triage including Helm 4 OCI stdout)./mutation-gate(Jira via/rhdh-jira-link).References: install-paths (CGW vs vendor, tarball layout), tekton-prefetch, verification, helm4-notes.
Related upstream work: rhdh-must-gather#284 (CGW binary), rhdh-must-gather#282 (vendored fallback).
Tests
tests/unit/test_must_gather_helm_bump.py(invoked viasys.executable):--tobump off the4.2.3fixture (lockfile/vendor stubs updateHELM_VERSION)vendor/helm, keeps websocat, scopes prefetch to must-gather, updates pull and push PLRs--dry-runwrites nothingrelease="10"/2.0-10→11/2.0-11git status, dirty-HEAD SHA refusal,rhdh-downstreamdiscovery, missing CGW probe script--skip-upstream --checkstill reportsmode=cgwwhen upstream CGW is available (stale distgitvendor/helmdoes not win)Test plan
uv run pytest tests/unit/test_must_gather_helm_bump.pyuv run pytest tests/unit/test_skill_catalog.py--check/--dry-runsmoke test against local must-gather + midstream checkoutsGenerated-by: cursor