-
Notifications
You must be signed in to change notification settings - Fork 7
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
BREAKING: hoisted resources out of data: #11
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
097854e
BREAKING: hoisted resources out of data:
philsturgeon 0e40871
fix linting errors
philsturgeon fc8cae8
attempt to remove double checks
philsturgeon de463b6
reverted workflows to show it doing double work
philsturgeon a40da94
Switch to CC-BY-SA-4.0
philsturgeon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
why do you remove the workflow from the push on
main
branch. It's still needed when we merge in a PR intomain
branch, to deploy the API document to Bump.sh :)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.
With the current setup it was doing all checks twice, and as well as looking untidy there's a carbon footprint to doing everything twice. If you can help me get this right I'd appreciate it.
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.
It's kind of doing checks twice.
However, running workflows on the HEAD of a pull request is slightly different than running workflows on the HEAD of the target branch (here always
main
).That's because the merged PR can have difference with the head of the PR (if there's changes on the
main
while the PR is being developed)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 don't mean "doing it twice" like once in the PR and once again on main.
I mean it was literally doing it twice on the PR. This happens when you do a first push because both the push event and the pull_request event are triggered, so its literally running all the checks simultaniously twice, once for push and once for pull_request.
This is a documented thing, and its wasting compute resources: https://github.com/orgs/community/discussions/26940
I've reverted the change here, but I would like to not only fix it in this repo, but in the sample Bump.sh workflow in documentation.
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.
Hm 🤔, I can't see any duplicate jobs on the commits of the HEAD of this PR:
bc97140
There's only:
Lint
job (the second check--> Linter OPENAPI
is a created in theLint
job by the super-linter gh action)Check API diff
job.The description of the push target in the GH action workflow file:
Means it will only trigger a workflow on push on the
main
branch (so not on pushed on any other branches, i.e. pull request branches):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 first push will have two lots of checks as you've opened a pull request.
The second push will have only one lot of checks because the pull request is old now.
I'll take a screenshot next time this happens.
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.
There's no reason for a duplicate job with the current workflow definition file, sorry to insist!
Here's a demo with a newly created PR with a single push on that PR branch: #13
There's a single
Lint
workflow and a singleCheck & Deploy API documentation
workflow` running on the repository: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 saw the duplicates. I saw two of everything. I should have taken a screenshot, but I will do next time it happens.