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

Release v1.70.0 #11843

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Release v1.70.0 #11843

merged 3 commits into from
Jan 21, 2025

Conversation

shivaspeaks
Copy link
Member

No description provided.

@shivaspeaks
Copy link
Member Author

There are usually 3 commits in every grpc java Release. See this

Update README etc to reference 1.xx.x
Bump version to 1.xx.x
Bump version to 1.xx.x-SNAPSHOT

But in this PR, I don't see Update README etc... commit. But the changes of README are there. What went wrong? I did everything right this time by following RELEASING.md.

@shivaspeaks
Copy link
Member Author

Just understanding the reason,
Why should we NOT click the merge button on this PR? And why is it told to push using terminal?

@ejona86
Copy link
Member

ejona86 commented Jan 21, 2025

The "Release v1.70.0" has the README.md change, which is wrong. From the instructions, after updating the README you should have made a commit:

# Bump documented gRPC versions.
# Also update protoc version to match protobuf version in gradle/libs.versions.toml.
${EDITOR:-nano -w} README.md

git commit -a -m "Update README etc to reference $MAJOR.$MINOR.$PATCH"

Why don't hit the github merge button: In the instructions, we create the tag as soon as we create the release commit:

git commit -a -m "Bump version to $MAJOR.$MINOR.$PATCH"
git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH"

Then, on the command line we do:

git checkout v$MAJOR.$MINOR.x
git merge --ff-only release-v$MAJOR.$MINOR.$PATCH
git push upstream v$MAJOR.$MINOR.x
git push upstream v$MAJOR.$MINOR.$PATCH

This process guarantees that no commits have been made to the branch while you were doing the release. The --ff-only never makes a merge commit, so if v$MAJOR.$MINOR.x had extra commits in it from when you updated the README/bumped versions, then it will fail. And similarly git push upstream v$MAJOR.$MINOR.x will fail if the branch on github has changes. If there have been changes, then that "git tag" above is out-of-date and has to be re-created.

Reasons we don't use github to merge:

  1. You must use "rebase and merge" when using the github merge button, as "squash and merge" will combine everything into one commit and that means we lose the release commit. Given how often people use "squash and merge" (I apparently am the only one that uses "rebase and merge"), if you click the github button, it will probably be in the wrong setting and you'd need to change it. And for your next PR, you'll need to change it back to "squash and merge."
  2. The button on Github always rewrites the commit. That means that the tag (v$MAJOR.$MINOR.$PATCH) could only be created after the "rebase and merge." That's not too much of a problem, but would need to rework the instructions to fetch the changes and then tag the correct commit
  3. The release process predates the github "squash and merge" and "rebase and merge" button. Back in the day, it only allowed you to "create a merge commit," so we'd actually always merge from the command line.

So (1) is the only real issue. (2) means you "can't just do it your own way while using the same instructions;" the instructions would need to change. (1) is a "you have to be careful" and it seems equally hard to remember to not merge as to change the merge setting, but changing the merge setting also might mess up your next PR. So (3) is "how we got here" and (1) is why we haven't changed it.

@shivaspeaks
Copy link
Member Author

after updating the README you should have made a commit

Yes, you're right. After looking at the log of my commands I can see that I missed to run this command after updating README.md git commit -a -m "Update README etc to reference $MAJOR.$MINOR.$PATCH"

What do we do now? The tag is also used.

@ejona86
Copy link
Member

ejona86 commented Jan 21, 2025

I'd delete things and start over:

git tag -d v$MAJOR.$MINOR.$PATCH   # Delete the tag
git branch -D release-v$MAJOR.$MINOR.$PATCH  # Delete your branch

# Start again at step 3

Given how often there's been issues as of recent, we should maybe consider postponing the tag creation until the changes are merged so that it is easier to clean up when mistakes are made.

@ejona86
Copy link
Member

ejona86 commented Jan 21, 2025

(Note: you don't have to delete this PR. Just go through the steps again and when you push it'll be updated. You can totally delete your local branch and keep the remote branch for this PR alive.)

@shivaspeaks shivaspeaks merged commit 5d55fc1 into grpc:v1.70.x Jan 21, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants