-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
chore: add a github "action-validator" in CI #28358
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#28343 fixes an issue where I had broken a specific github action workflow in a previous PR without realizing I did. If/when altering the yaml, if the yaml itsefl is valid (we have a check for that) yet the schema is not - either through passing the right data structure or required types, the action just won't run and the PR is still mergeable. The failure gets somewhat burried on the Actions tab (at the bottom of https://github.com/apache/superset/actions) Here I'm hoping that this pre-commit hook will both catch this early, and prevent the PR from being mergeable. Find out more about the hook here: https://github.com/mpalmer/action-validator
Merged
9 tasks
mistercrunch
commented
May 6, 2024
@@ -19,8 +19,8 @@ on: | |||
default: 'false' | |||
description: Whether to force a latest tag on the release | |||
options: | |||
- true | |||
- false | |||
- 'true' |
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.
NOTE: it caught this as an error so I fixed it
eschutho
approved these changes
May 8, 2024
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.
nice!
betodealmeida
approved these changes
May 9, 2024
imancrsrk
pushed a commit
to imancrsrk/superset
that referenced
this pull request
May 10, 2024
jingyi-zhao-01
pushed a commit
to jingyi-zhao-01/superset
that referenced
this pull request
May 16, 2024
EnxDev
pushed a commit
to EnxDev/superset
that referenced
this pull request
May 31, 2024
vinothkumar66
pushed a commit
to vinothkumar66/superset
that referenced
this pull request
Nov 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
#28343 fixes an issue where I had broken a specific github action workflow in a previous PR without realizing I did. If/when altering the yaml, if the yaml itsefl is valid (we have a check for that) yet the schema is not - either through passing the right data structure or required types, the action just won't run and the PR is still mergeable.
NOTE: it's really easy to break a github action (yaml is brittle, and schema enforcement for actions is loose), and it's also really easy to miss the error message about it. The failure gets somewhat buried on the Actions tab (at the bottom of https://github.com/apache/superset/actions), which is super easy to miss.
Originally I tried the pre-commit hook, but bailed on that approach as it requires installing
action-validator
in PATH, which is not super convenient as it's a Rust package. There's a node wrapper we leverage in this action, but didn't want to extend the dev deps beyond python/pip.Find out more about the hook here: https://github.com/mpalmer/action-validator
TESTING
For testing, I reverted the change from #28343, and tested the bash script fails. It did and provided a nice json blob with everything wrong with the schema provided.
SCREENSHOT