-
Notifications
You must be signed in to change notification settings - Fork 693
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
Smarter rebase on-top of github target logic #3617
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3617 +/- ##
========================================
Coverage 85.04% 85.04%
========================================
Files 37 37
Lines 2367 2367
Branches 260 260
========================================
Hits 2013 2013
Misses 290 290
Partials 64 64 Continue to review full report at Codecov.
|
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.
@msheiny Logic looks good to me! Testing locally showed a proper rebase.
However, we still have a dangling commit that was testing-only. That should be removed, then we're good to merge.
This will hopefully resolve issues pertaining to PRs that target non-develop branches and fail in particular ways (not to mention its not an accurate test) when rebased against develop
I was hitting super annoying issues involving embedded quotations. It seems acceptable to skip that lint check on this particular file
b6298df
to
01b9031
Compare
@conorsch i rebased and removed that dangling branch 👍 .. waiting for tests to pass 🤞 |
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.
We recently (#3617) modified the CI rebase logic to accommodate more than just the develop branch. That's good! However, the new logic assumed that the env var `CIRCLE_PULL_REQUEST` would be defined. Turns out it's only defined on PRs, which makes sense, but not during CI runs against a base branch such as "develop". Modified the rebase script to execute the main block if-and-only-if `CIRCLE_PULL_REQUEST` is set. Additionally, sprinkled in some more error checking bash settings at the top of the file, to make future debugging sessions more straightforward (`set -u` in particular makes mistakes like this quite clear). Closes #3639.
Ready for review
Fixes #2942
Changes proposed in this pull request:
develop
How should the reviewer test this PR?
Start by populating the following env vars:
CIRCLE_PULL_REQUEST
CIRCLE_BRANCH
- Keep in mind that this looks like a full URL alahttps://github.com/freedomofpress/securedrop/pull/3556
. You might ask, why didnt @msheiny useCIRCLE_PR_NUMBER
to just grab the number like @redshiftzero suggested!!? Well unfortunately that env var only applies to forked PRs.Okay now run ..
devops/scripts/rebase-ci.sh
. Make sure stuff doesnt explode. If you have dangling git changes you should get errors about a rebase.Any special considerations for deployment? Consider both:
Only affects CI. I did take note to look at the parameters from a forked PR on the github API and I'm convinced it'll work fine famous last words
Caveat -- One particular bit I am concerned about is Github API limits... its 60 per hour per host. Now I think we are safe here because we are executing on multiple builders which should change IP addresses.. but something to watch out for.