-
Notifications
You must be signed in to change notification settings - Fork 269
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
Refactor lint-test.yaml GHA Workflow to use a matrix for test job generation; Add nginx.enabled
and hpa.enabled
tests
#598
Conversation
How about starting to use a matrix for all these test? Currently the jobs all are almost the same, except for the chart configuration. This would make it a lot easier to add new tests and it's also more maintainable. |
I'm not against it, but we'd have to do a bunch of conditionals for the actual install step like this one: - name: Run chart-testing (install with nginx.enabled)
id: install
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} \
--helm-extra-set-args "--set=image.flavor=fpm --set=nginx.enabled=true" I think we would be able to do something like |
But those arguments would just be part of the matrix |
oooooooo! Smart! Ok, yeah, I'll get something together in a bit and ping you again to take a look :) |
nginx.enabled
on all PRsnginx.enabled
on all PRs
nginx.enabled
on all PRsnginx.enabled
test
141f874
to
6bf385e
Compare
@provokateurin ok, now you can give it a look. I found the files tab of the PR hard to look at, so it might make more sense to check the file directly? links to import bits: helm/.github/workflows/lint-test.yaml Lines 59 to 79 in e3e14de
helm/.github/workflows/lint-test.yaml Lines 111 to 119 in e3e14de
|
We could merge this, then I can rebase the hpa PR and add its test the same way, so that way we can get some immediate testing of it all? |
oh wait, you'd need to change the required tests again to be |
8d85fc9
to
17f6a62
Compare
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.
Awesome, seems to work ❤️
Please remove the test commit and then I will change the settings to allow this to be merged
61c10dd
to
82589b7
Compare
Maybe also squash the commits, then the history is a bit cleaner |
I hope this works now, maybe I have to adjust the settings to require the individual jobs. |
Ok, I made it all one commit, however, I just noticed something off 🤔 All the jobs generated on my last commit test commit have weird names: for instance the postgres job here is called: The actual args didn't template here either 😞 : |
Yeah that is automatic from the matrix, nothing we can do about |
Alright I have to require all matrix tests individually |
Some more testing of this PR would be nice:
|
|
I think invalid changes you can just force by breaking the yaml syntax, then the tests should definitely fail |
I can try that, but it might be caught by the lint before it gets to actually running the other jobs 🤔 We'll try after valid changes though 🫡 |
Or you can change the image tag to some version that doesn't exist, then the lint will pass but the tests won't |
ok, lit, the no changes is completely valid, finally! I will push up a test commit that should be valid for the second wave of tests :) |
They all failed on creating the kind cluster? 🤔 could this be because we changed the |
Yeah, it could be that this doesn't work on the self-hosted runners. Just change the tests back to the previous runs-on and we should be good. |
Looks like it works with a valid change 👍 (bump chart version and remove an empty commented line in I will now to try to make an invalid change, by changing the |
nginx.enabled
testnginx.enabled
and hpa.enabled
tests
We should set |
Okay, so for invalid change, the first test failed expectedly: However, unexpectedly, the rest were canceled 🤷 I guess they were all gonna fail the same way anyway, but I would have expected the other jobs to start, unless they were canceled by a maintainer or member? Do we want to do further testing of this, or would you say we're good to go on testing for now? |
oh, I didn't refresh the page before posting again 🤦 but the answer to your request is yes, I can do that! |
Looks like they all failed appropriately :) I'll remove the test changes now |
Perfect! One more squash please :) |
…ing jobs for each test case Co-authored-by: Kate <[email protected]> Signed-off-by: jessebot <[email protected]>
cc41eb9
to
150a285
Compare
I have made this all one commit again and made sure to keep your coauthor line in the commit message :) Thanks again for all your help here! |
Send it! |
Description of the change
strategy.matrix
nginx.enabled=true
andimage.flavor=fpm
both sethpa.enabled=true
setBenefits
New tests are easier to add :)
Now if anyone would like to change a config file or other template that seems like it could affect users that use the
nginx.enabled
parameter, this PR will do the bare minimum testing for that.Possible drawbacks
None that I can think of, but I'm also open to feedback :)
Applicable issues
Not sure if we have any issues related to this 🤔 This is just something we've talked about several times.
Checklist
Chart.yaml
according to semver.