-
Notifications
You must be signed in to change notification settings - Fork 578
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
Risky cherry-pick step in release guide (LTS) #771
Comments
Here's the state of the repo right after doing You can see for example that it changed the |
@targos would you mind providing the workflow you used to diff and check if the patch is correct? I believe this information is pretty relevant to reside in our release tutorial. |
I used VSCode. See the screen recording below. I hope that we can solve the issue without having to ask the releasers to always check the diff though. Screen.Recording.2022-08-16.at.14.53.16.mov |
Cherry-picking is inherently risky, given that we're taking a changeset that comes from a given state and applying that to a (possibly) very different state. That said, I've hit a similar type of problem with my latest (Current) release, so while it might not be exactly the same type of problem, I do wonder if by adding this step in the guide would have avoided (or helped with) your issue here. |
When cherry-picking the release commit for Node.js 16.19.0 to the `main` branch git updated the metadata for the wrong item in `doc/api/test.md`. The incorrectly updated item has been fixed in a subsequent commit (the merge for the 19.3.0 release commit). This commit updates the intended item that should have been updated when the 16.19.0 release commit was merged. Refs: nodejs#45506 (comment) Refs: nodejs/Release#771
Another example: nodejs/node#45863 |
I tried a different diff algorithm for the 16.19.0 cherry-pick (onto nodejs/node@c7946b1 which was the parent commit):
which resulted in this diff for diff --cc doc/api/test.md
index 169c657994,680cd29dd5..0000000000
--- a/doc/api/test.md
+++ b/doc/api/test.md
@@@ -457,7 -319,7 +457,11 @@@ test('spies on an object method', (t) =
## `run([options])`
<!-- YAML
++<<<<<<< HEAD
+added: v18.9.0
++=======
+ added: v16.19.0
++>>>>>>> 2adea16e39... 2022-12-13, Version 16.19.0 'Gallium' (LTS)
-->
* `options` {Object} Configuration options for running tests. The following
@@@ -1050,7 -597,7 +1054,11 @@@ set to `true`
## Class: `TapStream`
<!-- YAML
++<<<<<<< HEAD
+added: v18.9.0
++=======
+ added: v16.19.0
++>>>>>>> 2adea16e39... 2022-12-13, Version 16.19.0 'Gallium' (LTS)
-->
* Extends {ReadableStream} The
I'll open a PR to update the release process docs. Refs: https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt--Xltoptiongt |
Switch to the `patience` git diff algorithm to reduce the likelihood of mismerges when the release commit is cherry-picked to the `main` branch. Refs: nodejs/Release#771 (comment)
|
When cherry-picking the release commit for Node.js 16.19.0 to the `main` branch git updated the metadata for the wrong item in `doc/api/test.md`. Refs: nodejs#45506 (comment) Refs: nodejs/Release#771
When cherry-picking the release commit for Node.js 16.19.0 to the `main` branch git updated the metadata for the wrong item in `doc/api/test.md`. Refs: #45506 (comment) Refs: nodejs/Release#771 PR-URL: #45863 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Switch to the `patience` git diff algorithm to reduce the likelihood of mismerges when the release commit is cherry-picked to the `main` branch. Refs: nodejs/Release#771 (comment) PR-URL: #45864 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Switch to the `patience` git diff algorithm to reduce the likelihood of mismerges when the release commit is cherry-picked to the `main` branch. Refs: nodejs/Release#771 (comment) PR-URL: #45864 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Switch to the `patience` git diff algorithm to reduce the likelihood of mismerges when the release commit is cherry-picked to the `main` branch. Refs: nodejs/Release#771 (comment) PR-URL: #45864 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Closing this issue since we already landed two improvements to the docs that will hopefully avoid this issue again in the future. Feel free to reopen if anyone hits it again or wants to discuss more 😊 |
While promoting the v16.17.0 release today, I checked the diff after cherry-picking the release commit to
main
(to verify I resolved the conflicts correctly) and found out that the cherry-pick can end up modifying the wrong lines!It happened in
test.md
and I think there are two causes:added:
sections always consist of the same 5 identical linesWhat happened is that the cherry-pick modified
added:
lines that are not in a v18.x release yet (so no conflict was generated).I don't know if we can do something about it at the Git level to avoid the mistake.
The text was updated successfully, but these errors were encountered: