-
Notifications
You must be signed in to change notification settings - Fork 50
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
Scheduled AKS and EKS ci doesn't work due to empty version #1119
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6457.
|
I see this was a design decision in #1101
This however is not in sync with our expected scheduled behaviour, where we want to run the workflows for latest + the two supported versions. |
After a quick sync with @mvlassis, we both agreed that default values should only be set in the workflow and not the script. With that in mind, we came up with the two options:
|
I'm not sure I'd like to go with (2), it seems to be adding more maintenance to us. I think I prefer going with a hybrid of (1), but first, I think there are a couple things going on here:
if len(sys.argv) < 1: # <--- this will always be False, as sys.argv[0] is always the name of the script
raise Exception("No bundle versions given as input.") In a $ python3 scripts/gh-actions/parse_versions.py ""
-> if len(sys.argv) < 1:
(Pdb) sys.argv
['scripts/gh-actions/parse_versions.py', '']
(Pdb) len(sys.argv)
2
(Pdb) sys.argv[0]
'scripts/gh-actions/parse_versions.py' We have to change this to either
ProposalI think we can:
So it would look like: # please be mindful the syntax can be slightly wrong
jobs:
preprocess-input:
if: ${{ github.event_name == 'wf dispatch' }} # we should check the actual name
...
generate-bundle-versions-on-sched:
if: ${{ github.event_name == 'schedule' }}
run: |
bundle_versions=$(yq '. | keys' .github/dependencies.yaml -o=json) # this gives you a json array
echo "bundle_versions=$" >> "$GITHUB_OUTPUT"
deploy-ckf-to-aks:
runs-on: ubuntu-22.04
strategy:
matrix:
bundle_version: ${{ fromJSON(jobs.preprocess-input.outputs.processed_bundle_versions) || fromJSON(jobs.generate-bundle-versions-on-sched.outputs.bundle_versions) }} thoughts? |
@DnPlas That is a great suggestion, I will be implementing this (and crediting you :)) |
Bug Description
When scheduled, the workflows do not work because they are given an empty bundle_version.
When scheduled, there are no inputs (as when run from a workflow_dispatch). IIUC, this results in the workflow to call the parse_versions.py script with an input
""
. The script expects no argument in order to fail, thus it doesn't fail and instead outputs bundle_versions=[""].We need to refactor the preprocess script/job in order to account for cases without inputs.
To Reproduce
trigger without any inputs e.g.
pull_request
event or wait for scheduled actionEnvironment
GH runners
Relevant Log Output
Additional Context
No response
The text was updated successfully, but these errors were encountered: