ceph-backport.sh: implement --milestones feature and more-careful vetting#30879
Merged
smithfarm merged 13 commits intoceph:masterfrom Oct 30, 2019
Merged
ceph-backport.sh: implement --milestones feature and more-careful vetting#30879smithfarm merged 13 commits intoceph:masterfrom
smithfarm merged 13 commits intoceph:masterfrom
Conversation
f7c5efa to
2e3453a
Compare
Contributor
Author
|
@theanalyst @yuriw This PR implements |
2e3453a to
5f73870
Compare
Contributor
|
@smithfarm defer to @theanalyst |
5f73870 to
e9e3be1
Compare
b4c1f00 to
61728fc
Compare
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 <ncutler@suse.com>
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 <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
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 <ncutler@suse.com>
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 <ncutler@suse.com>
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 <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Two of the variables used were not declared as local. Signed-off-by: Nathan Cutler <ncutler@suse.com>
92d9258 to
e65a105
Compare
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
99f1a8a to
c9e40c3
Compare
And really stop after cherry-pick phase. Signed-off-by: Nathan Cutler <ncutler@suse.com>
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