Dev 9359 support additional chart operations#61
Merged
Conversation
alourie
approved these changes
Jul 16, 2026
alourie
self-requested a review
July 16, 2026 06:16
Contributor
|
lol, finger slipped, not approved in draft ;-) |
facetoe
force-pushed
the
DEV-9359-support-additional-chart-operations
branch
2 times, most recently
from
July 16, 2026 06:41
c4e8ecc to
b3ea508
Compare
facetoe
commented
Jul 16, 2026
facetoe
force-pushed
the
DEV-9359-support-additional-chart-operations
branch
5 times, most recently
from
July 17, 2026 02:00
0cdc44c to
18c9e72
Compare
This will be used in the workflows for extracting the metadata. Signed-off-by: William Coe <william.coe@zepben.com>
This will be used in the CI workflows for determining what we need to test/package. We assume that git is available on dev/CI machines. Signed-off-by: William Coe <william.coe@zepben.com>
This will be used in CI for linting. Signed-off-by: William Coe <william.coe@zepben.com>
facetoe
force-pushed
the
DEV-9359-support-additional-chart-operations
branch
from
July 17, 2026 03:37
a4e0d08 to
9d98828
Compare
facetoe
marked this pull request as ready for review
July 17, 2026 03:40
facetoe
marked this pull request as draft
July 17, 2026 03:40
facetoe
marked this pull request as ready for review
July 17, 2026 04:56
alourie
reviewed
Jul 17, 2026
alourie
approved these changes
Jul 17, 2026
We have a growing need for more control over how we execute commands. Move to using subprocess.run to support this. We also needed a way to store the results, so create a dataclass CommandResult and update call sites. Signed-off-by: William Coe <william.coe@zepben.com>
Add a command for pushing to GHCR registry. We also implement the same beta workflow as helm-common does, this intended as a drop in replacement. We expect that login has already been executed, and the ~/.config/helm/registry/config.json file already created. Note: it is possible to use .config/containers/auth.json also. They are same structure. Signed-off-by: William Coe <william.coe@zepben.com>
This replaces the ct lint-and-install command. We only install Application charts, and for library ones just lint. Additionally we accept a --chart param for CI to test a specific chart, however omitting this leads to all charts being discovered and tested. This is to support the Makefile invocation as that is what is wanted there. Drop the ct group as we are all in on charts group now. Signed-off-by: William Coe <william.coe@zepben.com>
As we've added tests things have got increasingly messy. We are often mocking execute in various different ways, all of which are brittle to ordering changes etc. To improve this, implement a FakeExecute helper to faciliate prefix based faking of the execute command. This helps readability of the tests, but also removes the ordering requirement that existed with just mocked calls assertions. Another common source of boilerplate/noise, was setting up chart dirs etc. Create some fixtures for these so we don't need to reinvent the wheel all the time. Signed-off-by: William Coe <william.coe@zepben.com>
We want CI to use our same tools, so add a simple command it can exercise to print the path it needs to export to locate them. Signed-off-by: William Coe <william.coe@zepben.com>
This is necessary as otherwise we won't be able to pull commons from our internal repo when building charts. Signed-off-by: William Coe <william.coe@zepben.com>
Path munging is fairly central to the operation of this tool, so centralise it in a single method. This is implemented such that we can operate directly on the output of "chart list-changed", or absolute paths depending on what the caller needs. CI wants the former. Signed-off-by: William Coe <william.coe@zepben.com>
This is forwarded to ct so we can list changes since a specific commit/ref. Signed-off-by: William Coe <william.coe@zepben.com>
In the CI workflows, we need to get the output of the push step to determine the metadata to stamp on release/chart etc. When we dump loads of stdout there this becomes harder and we end up with grep and other shell nasties. Instead, capture stdout and only dump it on failure so we can see what went wrong in the CI logs. Signed-off-by: William Coe <william.coe@zepben.com>
facetoe
force-pushed
the
DEV-9359-support-additional-chart-operations
branch
from
July 20, 2026 23:01
9d98828 to
e74e4bf
Compare
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.
To support building solid and testable CI workflows for our org wide helm efforts, extend the
local-k8s(soon to be renamed) tool with the necessary additional functionality. There are basically two sets of changes here. The first, is a number of new commands added:These are used in the workflows here - zepben/.github#114. The basic idea idea is to write the commands so they can be tested, and also ensure they emit data in a way that is easy to consume in the workflows. We want to avoid bash and grep and all those nasties as much as possible. Instead, we emit structured JSON. In addition to adding these commands, we also renamed the command group from the cryptic
cttochart.The second sets of changes are some improvements to the program and test structure. Mostly refactoring
executeto be more flexible, and return a CommandResult object, and cleaning up the tests with a FakeExecute implementation to reduce the developing coupling on order of cli calls, which is brittle and makes for annoying later refactors.There are a large number of changed files, however each commit is a single, atomic unit. Reviewing commit by commit should hopefully make sense, and not be overwhelming. If however this PR is too large, I can break it up. Just let me know.