-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce helm-dependency-extra-args
#396
Conversation
c3bca7c
to
24b47f0
Compare
24b47f0
to
09f1778
Compare
@nazarewk thanks for this PR, can you check the ci failures? |
09f1778
to
feb877b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
feb877b
to
b71548c
Compare
@cpanato This time it should pass (i've run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazarewk thanks for the PR
can you generate the docs using the doc-gen? will be good as well to fetch the latest code from main
go build -o ct-bin ./ct/main.go
$ ./ct-bin doc-gen
Generating docs...
Done.
then commit the changes?
thanks!
addresses helm#368 Signed-off-by: Krzysztof Nazarewski <[email protected]>
b71548c
to
8e8e590
Compare
@cpanato docs are generated |
@davidkarlsen can you take a look when you have some free cycle? thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This is a great PR for our CI/CD system. Looking forward to getting it in a released version! |
What this PR does / why we need it:
TLDR; allows passing
--skip-refresh
tohelm dependency build
Default behavior of
helm dependency build
is running equivalent ofhelm repo update
before initiating packaging process.This makes sense for handling a single repository - you always get the latest version even if you forget about running
helm repo update
yourself.Passing
--skip-refresh
turns off the step allowing the user to runhelm repo update
once for the whole pipeline. The default behavior becomes redundant when handling a second chart in the same CI pipeline and becomes extremely wasteful when running build on large number of charts in a single pipeline.ct lint
invokes that default behavior for every single repository it checks, making it unnecessarily wasteful for it's primary use case. Sane default would be recommendingct
users to invokehelm repo update
before runningct lint
, but that would be a breaking change.This PR allows us to still invoke the proper behavior while preserving backwards compatiblity for
ct
users.Which issue this PR fixes: fixes #368
Special notes for your reviewer:
Mocked test
I am not very proficient in mocking or Golang alltogether, but I believe
TestLintYamlValidation
works only by chance and my newTestLintDependencyExtraArgs
contains proper invocation ofMock.On()
.Basically I could not get the
fakeMockLinter.AssertNumberOfCalls(t, "BuildDependenciesWithArgs", 1)
to count occurences at all.Submitted test is what I have determined to work empirically. When I ran the test twice with just a single
.On()
invocation it threw an error, invoking.On()
followed byRepeatability = 1
allows a single call to the mocked method per test.Introducing new method
I am not sure what is the project's external compatibility policy. I've added a fresh method to preserve backwards compatiblity when using
ct
as a library, since the struct is public.