Repository navigation
ceph-backport.sh: implement --milestones feature and more-careful vetting - #30879
Merged
smithfarm merged 13 commits intoOct 30, 2019
Merged
Conversation
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
2 times, most recently
from
October 14, 2019 11:05
f7c5efa to
2e3453a
Compare
Contributor
Author
|
@theanalyst @yuriw This PR implements |
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 14, 2019 21:28
2e3453a to
5f73870
Compare
Contributor
|
@smithfarm defer to @theanalyst |
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 21, 2019 19:26
5f73870 to
e9e3be1
Compare
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 21, 2019 20:17
b4c1f00 to
61728fc
Compare
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
2 times, most recently
from
October 22, 2019 10:59
6af5d8c to
92d9258
Compare
Refuse to work on a backport that is * not in "New" or "Need More Info" status * targeting a release that is not among the GitHub active milestones Signed-off-by: Nathan Cutler <[email protected]>
When --milestones is provided, the script will: 1. determine the set of active milestones by querying GitHub API 2. for each active milestone, get all PRs targeting the milestone, regardless of actual milestone setting 3. for each PR targeting an active milestone, check that actual milestone setting matches the base branch 4. if a problem is detected, fix it and "flag" the PR 5. at the end, print a report summarizing any problems that were detected Signed-off-by: Nathan Cutler <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
Before, the script was satisfied if the variable github_token was set to *any* value. With this commit, it is only satisfied if the GitHub API recognizes it as a valid token. Signed-off-by: Nathan Cutler <[email protected]>
When the script is run from outside the git clone, that's a sign that the user may be a new user who has not yet completed setup. Signed-off-by: Nathan Cutler <[email protected]>
It's very common for folks to be logged into their local machine as something other than their GitHub username. When github_user is not set, assume the user has not yet done setup: emit an error and explain how to get setup advice. Signed-off-by: Nathan Cutler <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
Two of the variables used were not declared as local. Signed-off-by: Nathan Cutler <[email protected]>
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 23, 2019 11:00
92d9258 to
e65a105
Compare
Signed-off-by: Nathan Cutler <[email protected]>
Signed-off-by: Nathan Cutler <[email protected]>
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 23, 2019 11:25
99f1a8a to
c9e40c3
Compare
And really stop after cherry-pick phase. Signed-off-by: Nathan Cutler <[email protected]>
smithfarm
force-pushed
the
wip-cbs-check-missing-milestone
branch
from
October 24, 2019 11:52
b5abfb1 to
a333cf4
Compare
theanalyst
reviewed
Oct 29, 2019
| if [ "$tslc_is_ok" ] ; then | ||
| true | ||
| else | ||
| if [ "$tslc" = "in progress" ] ; then |
Member
There was a problem hiding this comment.
There might be cases where someone took up a tracker issue, marked as in-progress and is stale now, how should these cases be handled?
Contributor
Author
There was a problem hiding this comment.
--force option is coming in a follow-up PR
Contributor
Author
There was a problem hiding this comment.
(Currently I'm handling that by manually editing the offending fields of the Backport tracker issue to stop the script from complaining.)
This file contains hidden or 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
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.
This PR implements
ceph-backport.sh --milestoneswhich will find and fix PRs that are missing a milestone (or have the wrong milestone).It also tries to be more careful in several areas:
github_useris not set, do not fall back to$USER(this leads to confusing behavior when the actual GitHub username is something other than$USER)github_tokenis set, do an actual GitHub API call and bail out if GitHub does not recognize the tokenceph:master