Skip to content

Fix Helm linting: treat rendered manifests as temporary#1299

Open
hazdl wants to merge 1 commit into
mainfrom
fix/helm-lint
Open

Fix Helm linting: treat rendered manifests as temporary#1299
hazdl wants to merge 1 commit into
mainfrom
fix/helm-lint

Conversation

@hazdl
Copy link
Copy Markdown

@hazdl hazdl commented May 13, 2026

Fix Helm linting so that rendered templates in /tmp/argo-lint are treated as internal artifacts and excluded from lint results.

}

pub trait Linter {
// The lint function takes path, rather than manifest. This is not ideal as it requires a tmp file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you removed this comment?

This comment and link to the still unfixed bug in Argo CLI is important context.

///
/// This indirection allows unit tests to inject a fake Helm implementation
/// and avoids requiring the `helm` binary to be installed when running tests.
pub type HelmToManifestFn =
Copy link
Copy Markdown
Collaborator

@davehadley davehadley May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR includes a major refactor of the way that helm testing is done, and a bug fix.

The testing changes seem to be unnecessary for the bug fix?

Please consider splitting these into separate PRs.

.filter_map(Result::ok)
.map(|entry| entry.path())
// FILTER: skip Helm-generated temp files
.filter(|path| !is_generated_helm_file(path))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused.

If you filter out these generated files here,

When do these files generated from helm templates get linted?

@davehadley
Copy link
Copy Markdown
Collaborator

To pass CI you need to change your commits to follow conventional commit (see: https://www.conventionalcommits.org/en/v1.0.0/ and the repo git commit history for examples).

You also need to run cargo fmt.

And it looks like there is a build error in the tests.

The CI / lint_workflows can be ignored for now. That's been fixed by #1305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants