Skip to content

Conversation

@carnhofdaki
Copy link
Contributor

See laanwj's comment in #17158
#17158 (comment)

@carnhofdaki
Copy link
Contributor Author

@laanwj So what do you think about adding this note to the documentation?

@laanwj
Copy link
Member

laanwj commented Oct 16, 2019

I think it is a good idea to add information about backporting (when to backport, how to backport) to the documentation, but I'm not sure a disconnected note only saying what not to do is the best way.

@laanwj laanwj added the Docs label Oct 16, 2019
@carnhofdaki
Copy link
Contributor Author

carnhofdaki commented Oct 16, 2019

In this case we could see that the backport was clearly requested, so "when to backport" was easy. "How to backport" was as you commented an automated conflict-free cherry-pick. Which leads me to following idea of text:


Backporting is done whenever the fix needs to be present in a release branch (e.g. a security issue) or on request. If the backport is trivial and can be cherry-picked automatically, just request a "Needs backport" tag for the original issue or PR. If backport needs any conflict resolution, create the PR manually and wait for comments.

The commit message of a backport should additionally contain following two lines in the end:

Github-Pull: #<original issue/PR number>
Rebased-From: <sha checksum of the code already merged into master branch>

What do you think @laanwj ? I am not force-pushing yet and ready to close this PR if needed.

Edit: "add" [a tag] "to" → "request" [a tag] "for"
Edit: Added text from #17159 (comment)
Edit: fixed missing l - "additionally"

@laanwj
Copy link
Member

laanwj commented Oct 16, 2019

Looks good to me, thanks!

Another thing to mention maybe is to only create a backport PR (when necessary) after the original PR was merged into master. This makes sure that the latest version of the code is backported, so makes review easier (no moving target).

@carnhofdaki carnhofdaki force-pushed the cdk/doc-backports branch 2 times, most recently from 0d0afbe to 2d16914 Compare October 16, 2019 15:03
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Concept ACK 2d169144049da82d2db81efc872cb2e2b6eddea5.

Also backport.py script could be mentioned.

@laanwj laanwj requested a review from fanquake October 17, 2019 08:03
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK. Could link to an example PR?

@carnhofdaki
Copy link
Contributor Author

carnhofdaki commented Oct 17, 2019

Also backport.py script could be mentioned.

@hebasto please have a look at 28537b729 and tell me what you think

Edit: I actually removed the redundant header, see e52ac9c36

@carnhofdaki carnhofdaki force-pushed the cdk/doc-backports branch 2 times, most recently from 9e10267 to cb0a440 Compare October 17, 2019 12:36
@promag
Copy link
Contributor

promag commented Oct 18, 2019

I mean adding an example, like #16189.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

I'd re-write the text to be something like:

Security and bug fixes can be backported from master to release branches.
If the backport is non-trivial, it may be appropriate to open an additional PR,
to backport the change, only after the original PR has been merged.
Otherwise, backports will be done in batches by maintainers.

A backport should contain the following metadata in the commit body:

Github-Pull ...

Also, this PR does not need backporting.

@carnhofdaki carnhofdaki force-pushed the cdk/doc-backports branch 2 times, most recently from 03020ea to b69a091 Compare October 20, 2019 06:01
@carnhofdaki
Copy link
Contributor Author

I mean adding an example, like #16189.

@promag Added. Have a look.

@carnhofdaki
Copy link
Contributor Author

I'd re-write the text to be something like:

Security and bug fixes can be backported from master to release branches.
If the backport is non-trivial, it may be appropriate to open an additional PR,
to backport the change, only after the original PR has been merged.
Otherwise, backports will be done in batches by maintainers.

A backport should contain the following metadata in the commit body:

Github-Pull ...

Also, this PR does not need backporting.

@fanquake Text changed. Have a look.

@carnhofdaki carnhofdaki force-pushed the cdk/doc-backports branch 3 times, most recently from 77ef72c to fff6163 Compare October 23, 2019 06:53
@fanquake
Copy link
Member

fanquake commented Jan 5, 2020

This looks ok now. @carnhofdaki can you squash.

@carnhofdaki
Copy link
Contributor Author

@fanquake Sure. Thank you for info.

See laanwj's comment in bitcoin#17158
bitcoin#17158 (comment)

Co-Authored-By: Wladimir J. van der Laan <[email protected]>
Co-Authored-By: Hennadii Stepanov <[email protected]>
Co-Authored-By: João Barbosa <[email protected]>
Co-Authored-By: Michael <[email protected]>
Co-Authored-By: Luke Dashjr <[email protected]>
@maflcko maflcko merged commit b813fbe into bitcoin:master Mar 11, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 11, 2020
2a6bce4 doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in bitcoin#17158
  bitcoin#17158 (comment)

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
@carnhofdaki carnhofdaki deleted the cdk/doc-backports branch May 24, 2020 08:53
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
2a6bce4 doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in bitcoin#17158
  bitcoin#17158 (comment)

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
2a6bce4 doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in bitcoin#17158
  bitcoin#17158 (comment)

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 14, 2021
2a6bce4 doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in bitcoin#17158
  bitcoin#17158 (comment)

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants