Repository navigation
Description
Problem
devops k8s catalog --dry-run prints a helm template line for each chart source, and that line is not the command of the run. _render_dry_run in src/devops_cli/commands/k8s/catalog.py writes the line itself: helm template <application> <chart> --repo <repoURL> --version <version>. The run renders each Application with application_renders of src/devops_cli/k8s/image_pins.py. That function starts helm template <release> <chart> --repo <repoURL> --version <version> --namespace <namespace> --skip-tests --values <file>.
So the plan has no namespace, no --skip-tests and no value file, and it names the Application where the run names the releaseName. For a chart of an OCI registry (#7368), the run starts helm template <release> oci://<repoURL>/<chart>. The plan still prints --repo <repoURL>, which Helm refuses.
Evidence
_render_dry_run(src/devops_cli/commands/k8s/catalog.py:30) builds the argv of the plan fromcollect_catalog_charts._render_app_objects(src/devops_cli/k8s/catalog.py:687) renders withapplication_renders, and_chart_commandofsrc/devops_cli/k8s/image_pins.pybuilds the command of the run.- Helm v4.3.2:
helm template arc gha-runner-scale-set-controller --repo oci://ghcr.io/actions/actions-runner-controller-charts --version 0.15.1exits 1 with "is not a valid chart repository or cannot be reached".
Acceptance criteria
- The dry-run plan of
devops k8s catalognames, for each chart source, the command that the run starts: the same release name, chart reference, version, namespace,--skip-testsand value files. - One function builds the command for the plan and for the run.
- A dry run still makes no request and starts no program.
Source
Source: #7368
Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches found only general Helm clients such as pyhelm3, which run the helm binary against a cluster; none builds a catalog plan from Argo Applications, so the fix stays in the project's own code.
Lacks:
- One builder shared by the plan and the run
- OCI chart references without a --repo flag
- Release name, namespace, skip-tests and value files in the plan
- A dry run that starts no program and makes no request
Proposed design
Problem statement
devops k8s catalog --dry-run prints a helm template line for each chart source, and that line is not the command of the run. The line has no namespace, no --skip-tests and no value file, it names the Application where the run names the release name, and it passes --repo for a chart of an OCI registry. The fix makes one function build the command for the plan and for the run.
Acceptance criteria
Requirement: Plan names the run command
The catalog dry run SHALL print, for each chart source, the helm template command that the run starts.
Scenario: A chart source of an HTTP chart repository
- WHEN A test runs the catalog dry run on an Application with the chart source
repoURL: https://example.com/charts,chart: app,targetRevision: 1.2.3,helm.releaseName: demo-release,helm.valueFiles: [values.yaml]and destination namespacedemo. - THEN The printed argv is
helm template demo-release app --repo https://example.com/charts --version 1.2.3 --namespace demo --skip-tests --values <path of values.yaml>.
Requirement: Plan names an OCI chart by its reference
The catalog dry run MUST name a chart of an OCI registry by the reference oci://<repoURL>/<chart> and MUST NOT pass --repo.
Scenario: A chart source of an OCI registry
- WHEN A test runs the catalog dry run on an Application whose chart source has
repoURL: ghcr.io/example/chartsand no scheme. - THEN The printed argv holds
oci://ghcr.io/example/charts/appand no--repoword.
Requirement: One builder for the plan and the run
One function SHALL build the helm template command for the plan and for the run.
Scenario: The plan command equals the run command
- WHEN A test compares the argv that the catalog dry run prints with the command that
application_rendersyields for the same chart source in a dry run. - THEN The two argvs are equal.
Requirement: The dry run starts nothing
The catalog dry run SHALL start no program and SHALL make no request.
Scenario: No subprocess call
- WHEN A test runs the catalog dry run with
run_subprocessreplaced by a double that records each call. - THEN The double records no call and the command exits 0.
Existing Tool Considered
The alternatives check in the issue body records the verdict none of 2026-11-27, with no tool: the searches found only general Helm clients such as pyhelm3, which run the helm binary against a cluster, and none builds a catalog plan from Argo CD Applications. The block lists what the project needs and lacks. The change stays in the project's own code, and its cost is small: chart_command already builds the run command, so the change adds one field and edits one caller, about 8k tokens and about one hour to build, keep and fix.
Key questions
- Which function builds the
helm templatecommand of a chart source?:_chart_commandatsrc/devops_cli/k8s/image_pins.py:260builds it, andapplication_rendersyields it with each rendered chart._render_dry_runbuilds its own argv today, so the change makes that one builder the source of both commands. [sources: src/devops_cli/k8s/image_pins.py:260, src/devops_cli/k8s/image_pins.py:302, src/devops_cli/commands/k8s/catalog.py:30] - How does the plan read the command of each chart source without a render?: The plan reads the chart commands from a dry run of
collect_image_pins, which callsapplication_renders. TheImagePinsvalue gains the fieldchart_commands, which holds only thehelm templatecommands of chart sources. (best practice) [sources: src/devops_cli/k8s/image_pins.py:302, src/devops_cli/k8s/image_pins.py:337, src/devops_cli/commands/k8s/catalog.py:30, openspec/specs/k8s-service-catalog/spec.md:10]- Chosen: Reuse the planned chart commands of
collect_image_pins. The function that the run calls builds each command, and a dry run starts no program. - Rejected: Add a second builder to
_render_dry_run. Two builders drift again, and that drift is the defect of this issue. - Rejected: Run
helm templatein the dry run. A dry run must start no program and make no request.
- Chosen: Reuse the planned chart commands of
- Does a dry run of
collect_image_pinsstart a program or make a request?: No._render_chartreturns an empty text whenrun_subprocessgives aPlannedProcessResult, and_require_imagesskips its count in a dry run.collect_image_pinsresolves no image, because resolution is a separate function. [sources: src/devops_cli/k8s/image_pins.py, openspec/specs/k8s-image-pins/spec.md] - How does the plan tell a chart command from the other planned commands?:
collect_image_pinsmerges the fetch commands ofSourceTreesintoplanned, so the plan cannot tell ahelm templatecommand from a fetch. A new fieldchart_commandsholds only the chart commands. (best practice) [sources: src/devops_cli/k8s/image_pins.py:302, src/devops_cli/k8s/image_pins.py]- Chosen: Add
chart_commandstoImagePins. The plan reads exactly the chart commands, and no filter guesses the class of a command. - Rejected: Filter
plannedby the first wordhelm. A filter guesses the class of each planned command and breaks on a new planned step.
- Chosen: Add
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 27, 2026
Both fix dry-run output that does not match the actual run command, but #2469 targets deploy-stack while the candidate targets k8s catalog.devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Released in v0.241.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.241.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 00:41 UTC