-
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
Conversation
🚨 Breaking API change detected: Added (2)
Modified (3)
|
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.
LGTM, besides a question about the licence. You can either merge without this licence change, or wait for Paulr's answer here!
Thanks for doing this change 👍
.github/workflows/bump.yml
Outdated
push: | ||
branches: | ||
- main |
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 into main
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:
There's only:
- one
Lint
job (the second check--> Linter OPENAPI
is a created in theLint
job by the super-linter gh action) - only one
Check API diff
job.
The description of the push target in the GH action workflow file:
on:
push:
- main
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 single Check & 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.
Co-authored-by: Paul B. <[email protected]>
Thanks for the changes 🙏 |
Got rid of the
{ data: {} }
wrapper on resources (request and response), but left it for collections.Also added a license, and added GET and DELETE for booking resources.