-
Notifications
You must be signed in to change notification settings - Fork 87
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
Changelog checkin test: succeed for release PRs #658
Conversation
Codecov Report
@@ Coverage Diff @@
## master #658 +/- ##
=======================================
Coverage 98.97% 98.97%
=======================================
Files 136 136
Lines 4697 4697
=======================================
Hits 4649 4649
Misses 48 48 Continue to review full report at Codecov.
|
057ccf6
to
7a02848
Compare
Some proof this change works:
|
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 to me - just one comment
@@ -190,8 +190,15 @@ jobs: | |||
- image: busybox:latest | |||
steps: | |||
- checkout | |||
- run: echo "${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}" | |||
- run: cat docs/source/changelog.rst | grep ":pr:\`${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}\`" | |||
- run: | # debugging info |
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.
Was this left intentionally?
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.
Yeah, helpful to have if stuff goes wrong. The comment isn't super necessary but I figured it can't hurt
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 agree! Just wanted to make sure
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.
Just a question to make sure I understand but otherwise LGTM! 🛥️
.circleci/config.yml
Outdated
- run: echo "${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}" | ||
- run: cat docs/source/changelog.rst | grep ":pr:\`${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}\`" | ||
- run: | # debugging info | ||
echo $(sed '/^\*\*v/q' docs/source/changelog.rst | grep -iE ":pr:" | wc -l) |
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.
Oo just so I understand properly, is this just printing for our sake? Not functionally necessary?
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.
Yeah, just for debug if anything goes wrong later
… release' section is empty of entries with PR refs, mark check as successful
48573cf
to
b91450f
Compare
@dsherry does this work for the first PR someone makes on a new release? it seems like if the person forgot to add a PR line it wouldn't error in that case since there would be no lines in the future changes |
@kmax12 good point, that is true! I guess that's not ideal. The first PR to merge after a release PR goes in will likely be one which was queued up beforehand, meaning the check would have been red. But why make our process more error-prone. Your saying that made me realize: a more foolproof alternative would be to check the |
.circleci/config.yml
Outdated
echo "${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}" | ||
- run: | | ||
# for release PRs: if the "future release" segment of the changelog contains no PR refs (sed/grep/wc returns no lines), mark as successful | ||
if [[ "${CIRCLE_BRANCH}" =~ "^release_v[0-9\.]+" ]]; then |
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.
Ok @jeremyliweishih @angela97lin : RE @kmax12 suggestion I updated this impl to require release branches to be of the form release_vX.X.X
(the regex is a bit looser than that but I think that's fine). LMK if you see any issues with that and I can do an update in another PR.
.circleci/config.yml
Outdated
- run: echo "${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}" | ||
- run: cat docs/source/changelog.rst | grep ":pr:\`${CIRCLE_PULL_REQUEST##https://github.com/FeatureLabs/evalml/pull/}\`" | ||
- run: | # debugging info | ||
[[ "${CIRCLE_BRANCH}" =~ "^release_v[0-9\.]+" ]] && echo This is not a release PR || echo This is a release PR |
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.
Used control operators to make this easy to read
727f995
to
81c6197
Compare
Aw man, took 35min, but, got it now 😂 turns out circleci uses |
Random but I'm pleased to note this worked for the 0.9.0 release! |
Fixes #542
Workaround for changelog checkin test for release PRs: If the 'future release' section is empty of entries with PR refs, mark check as successful
We don't need to update our release process after this PR. But we won't need to do a force-merge next time :)