Skip to content
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

backporting: Add support for forked cilium repositories #15008

Merged
merged 4 commits into from
Feb 18, 2021

Conversation

gandro
Copy link
Member

@gandro gandro commented Feb 17, 2021

It adds support for creating backport PRs from Cilium forks. Because
the names of remotes in forked repositories are not standardized, the
submit-backport script is changed such that it accepts two branch
arguments: The upstream remote and the user (fork) remote.

The upstream remote is detected using the existing get_remote helper,
while the user (fork) remote is guessed by checking for a remote
matching github.com/<user>/cilium.

This patchset is based on initial work by @qmonnet.

@gandro gandro added release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.8 labels Feb 17, 2021
@gandro gandro requested a review from qmonnet February 17, 2021 14:03
@gandro gandro requested review from a team as code owners February 17, 2021 14:03
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Feb 17, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.5 Feb 17, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.8.7 Feb 17, 2021
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks great, thanks a lot for making it work!

A few nits below.

contrib/backporting/common.sh Outdated Show resolved Hide resolved
contrib/backporting/start-backport Outdated Show resolved Hide resolved
contrib/backporting/submit-backport Outdated Show resolved Hide resolved
contrib/backporting/submit-backport Show resolved Hide resolved
Copy link
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Nice!

Documentation/contributing/release/backports.rst Outdated Show resolved Hide resolved
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.7.14 Feb 17, 2021
@gandro gandro force-pushed the pr/gandro/fix-remote-in-start-backport branch from 39259a9 to ed69f1a Compare February 17, 2021 14:51
@gandro gandro requested a review from qmonnet February 17, 2021 14:51
@gandro
Copy link
Member Author

gandro commented Feb 17, 2021

Addressed feedback. Once code reviews are in and the lints are green this can be merged without a full CI run.

Previously, the script assumed `origin` would point to the upstream
branch. For users with forked repositories this is not necessarily true,
therefore this commit auto-detects the remote name based on the git
remote url.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
This commit adds a optional positional argument to `get_remote` to allow
obtaining the remote of Cilium forks in other organizations than the
default `cilium` one.

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro force-pushed the pr/gandro/fix-remote-in-start-backport branch from ed69f1a to 170cb7a Compare February 17, 2021 14:53
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks all good! Just one more question below.

contrib/backporting/start-backport Show resolved Hide resolved
gandro and others added 2 commits February 17, 2021 16:48
This adds support for pushing backport PRs from Cilium forks. Because
the names of remotes in forked repositories are not standardized, the
`submit-backport` script is changed such that it accepts two branch
arguments: The upstream remote and the user (fork) remote.

The upstream remote is detected using the existing `get_remote` helper,
while the user (fork) remote is guessed by checking for a remote
matching `github.com/<user>/cilium`.

Co-authored-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
Co-authored-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro force-pushed the pr/gandro/fix-remote-in-start-backport branch from 170cb7a to 9d7b64c Compare February 17, 2021 15:58
@gandro
Copy link
Member Author

gandro commented Feb 17, 2021

I have pushed a simplified version of submit-backport which only makes the fork remote configurable, while the upstream remote is always auto-detected to be consistent with the other scripts. PTAL. It worked successfully to create the latest v1.7 backport PR.

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Thanks again

@joestringer joestringer added this to Needs backport from master in 1.8.8 Feb 17, 2021
@joestringer joestringer removed this from Needs backport from master in 1.8.7 Feb 17, 2021
@gandro gandro added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 18, 2021
@aanm aanm merged commit 388e7aa into cilium:master Feb 18, 2021
1.10.0 automation moved this from In progress to Done Feb 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.5 Feb 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.5 Feb 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.7 in 1.7.14 Feb 19, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.7 to Backport done to v1.7 in 1.7.14 Feb 22, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.5 Feb 22, 2021
@tklauser tklauser moved this from Needs backport from master to Backport done to v1.8 in 1.8.8 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
1.7.14
Backport done to v1.7
1.8.8
Backport done to v1.8
1.9.5
Backport done to v1.9
Development

Successfully merging this pull request may close these issues.

None yet

6 participants