Skip to content

ceph-backport.sh: implement interactive setup routine and new options#31366

Merged
smithfarm merged 3 commits intoceph:masterfrom
smithfarm:wip-cbs-4
Nov 5, 2019
Merged

ceph-backport.sh: implement interactive setup routine and new options#31366
smithfarm merged 3 commits intoceph:masterfrom
smithfarm:wip-cbs-4

Conversation

@smithfarm
Copy link
Contributor

@smithfarm smithfarm commented Nov 4, 2019

This commit implements several new features:

  • a --cherry-pick-only option
  • a --force option
  • an --existing-pr option
  • an interactive setup routine

The --cherry-pick-only option can be used to test whether a backport cherry-picks cleanly, for example. This is the same as the --prepare functionality that was provided by an earlier version of the script, and --prepare is re-introduced as a synonym for --cherry-pick-only.

The --force option can be used to make the script less careful (less "cowardly"). For example, if the script refuses to do a backport because the backport tracker issue is assigned to someone else, the script will "cowardly" refuse to continue. Use --force to override. Be aware that --force will also blow away an existing wip branch - the script asks for user confirmation in this case.

The new --existing-pr option can be used to specify the number (ID) of an existing backport PR that addresses the backport tracker issue given via the positional argument.

The new "interactive setup routine" should make the setup process much simpler for the user. If there is a setup issue, the script produces a report and starts the interactive setup routine, which prompts the user for the needed information.

Also, the script no longer requires the user to explicitly provide values for github_user and redmine_user_id. Instead, it divines the correct values from the GitHub token and the Redmine key, respectively.

Finally, the existing ~/bin/backport_common.sh file is deprecated in favor of two files:

    ~/.github_token
    ~/.redmine_key

(The latter is already used by Sage's build-integration-branch tool and it didn't make sense to have two different configuration files for a single purpose.)

Signed-off-by: Nathan Cutler ncutler@suse.com

@jan--f
Copy link
Contributor

jan--f commented Nov 4, 2019

I added #31367 using these edits.

One comment: Iiuc ~/bin/backport_common.sh is removed before ~/.github_token is created (same for ~/redmine_key). As the creation of the latter might fail it might be better to hold off on removing ~/bin/backport_common.sh.

Copy link
Contributor

@tspmelo tspmelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

This commit implements several new features:

* a --cherry-pick-only option
* a --force option
* an --existing-pr option
* an interactive setup routine

The --cherry-pick-only option can be used to test whether a backport
cherry-picks cleanly, for example. This is the same as the --prepare
functionality that was provided by an earlier version of the script, and
--prepare is re-introduced as a synonym for --cherry-pick-only.

The --force option can be used to make the script less careful (less
"cowardly"). For example, if the script refuses to do a backport because the
backport tracker issue is assigned to someone else, the script will "cowardly"
refuse to continue. Use --force to override. Be aware that --force will also
blow away an existing wip branch - the script asks for user confirmation in this
case.

The new --existing-pr option can be used to specify the number (ID) of an
existing backport PR that addresses the backport tracker issue given via the
positional argument.

The new "interactive setup routine" should make the setup process much simpler
for the user. If there is a setup issue, the script produces a report and starts
the interactive setup routine, which prompts the user for the needed
information.

Also, the script no longer requires the user to explicitly provide values for
github_user and redmine_user_id. Instead, it divines the correct values from the
GitHub token and the Redmine key, respectively.

Finally, the existing ~/bin/backport_common.sh file is deprecated in favor of
two files:

    ~/.github_token
    ~/.redmine_key

(The latter is already used by Sage's build-integration-branch tool and it
didn't make sense to have two different configuration files for a single
purpose.)

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@smithfarm smithfarm merged commit b205cf9 into ceph:master Nov 5, 2019
@smithfarm smithfarm deleted the wip-cbs-4 branch November 5, 2019 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants