-
Notifications
You must be signed in to change notification settings - Fork 108
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
style(ci): lint and standardize the actions structure #3940
Conversation
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.
I have some questions about this PR:
- How can we be sure we've made all these changes consistently? Did you use search and replace, or make each change manually?
- Is there an automated linter for the formatting rules you're using, or an automated formatter to apply the rules?
This PR changes job conditions and job names, which has previously caused CI to fail or skip tests. So I've marked it as "do not merge", until we decide how risky it is. (We're currently working on some urgent NU5 and lightwalletd changes.)
I used https://marketplace.visualstudio.com/items?itemName=cschleiden.vscode-github-actions to ensure the conditions were kept as we expected, and https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml to lint based on GitHub Action's json schema https://json.schemastore.org/github-workflow.json (mostly automatic) The manual changes requested to comply were:
Changes after revision:
|
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.
This seems like a potentially risky fix, that's isn't needed right now.
So I'd like to wait until after the high-priority NU5 updates are merged, and the NU5 testnet reactivation release is tagged.
@teor2345 @dconnolly I'd like to prioritize this PR, as it will help me identify common errors in other PRs, including parsing errors that won't be correctly parsed by GH (I added an action to lint other actions and verify shell errors) |
That makes sense. Did you need it to go in before we tag the NU5 testnet rollback version? (We're currently waiting for the Here's what I think this PR does: No behaviour change:
Behaviour change:
Unsure:
Do any of these changes need to merge sooner? If we need some changes sooner, we could reduce the risk by splitting it into multiple PRs. Or by testing a Rust PR immediately after it merges, and reverting if it causes problems. |
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.
Can we make sure actionlint
runs at least any time any .github/workflows/*
file is changed? I'm so happy to have a GH workflow linter!
@teor2345 this is ready. The shellcheck can be validated later, those shell commands have been like that for a while, I don't think those recommendations are completely valid for the specific use case. I fixed the |
I checked each shellcheck warning. Some could be fixed, but none of them seem to be causing problems right now. They will be ok as long as the names don't contain special characters. (And we control those names.) Some of them might need to be ignored. |
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.
Looks good, thanks for your patience with this!
Merge queue: sync past mandatory checkpoint:
https://github.com/ZcashFoundation/zebra/runs/5963991145?check_suite_focus=true#step:9:115 |
@Mergifyio update |
✅ Branch has been successfully updated |
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.
The "Test full validation sync from cached state" job logs this warning:
Warning: The "create_credentials_file" option is true, but the current GitHub workspace is empty. Did you forget to use "actions/checkout" before this step? If you do not intend to share authentication with future steps in this job, set "create_credentials_file" to false.
https://github.com/ZcashFoundation/zebra/runs/5964749623?check_suite_focus=true#step:4:71
Yeah, I have that warning pending. I don't want to do checkout if it's not needed, but this is working without using checkout, but I'm not sure it will still work if I remove the |
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.
I'm still seeing these container name errors:
the full validation sync fails with the wrong image name
Merge queue: sync past mandatory checkpoint:
Error: No such container: klt-sync-checkpoint-4078-merge-97382fe-qxsz
https://github.com/ZcashFoundation/zebra/runs/5963991145?check_suite_focus=true#step:9:115
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.
Thanks, looks good!
Motivation
When making changes that affected multiple actions, not having an standardized file made global replacements difficult, and sometimes it left unwanted code unchanged.
Designs
Solution
Review
@dconnolly can also review this