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

TRIVIAL: Update release instructions #5215

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Dec 6, 2024

High Level Overview of Change

Updates CONTRIBUTING.md documentation to introduce a new workflow that avoids code freezes. Also adds a few helpful scripts that can be used in by maintainers in branch management, and a CI job to check that code is consistent across the three main branches: master, release, and develop

Context of Change

The current workflow can be confusing. This new workflow is a little more complicated, but has simpler basic rules:

  • No code freezes in develop.
  • Push up. develop to release to master.
  • The branches proceed independently when needed.
  • Reverse merge down. master to release to develop.

The changes are in two commits:

  • The first is a straightforward move of one chunk of CONTRIBUTING text from the middle of the file to the end.
  • The second introduces all the changes.

This is intended to make the changes easier to review. The PR will be squashed into one commit when merged to develop. The second commit message should be used when merging.

Type of Change

  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

Test Plan

No code changes, so nothing to test there.
One new CI job. Ensure it passes.

Future Tasks

@ximinez ximinez marked this pull request as draft December 6, 2024 17:16
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.0%. Comparing base (eac3abd) to head (044a0a7).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5215     +/-   ##
=========================================
- Coverage     78.0%   78.0%   -0.0%     
=========================================
  Files          789     789             
  Lines        66951   66951             
  Branches      8107    8110      +3     
=========================================
- Hits         52216   52210      -6     
- Misses       14735   14741      +6     

see 2 files with indirect coverage changes

Impacted file tree graph

@ximinez ximinez force-pushed the pr/merging branch 3 times, most recently from 1095a4e to 6f81185 Compare December 7, 2024 00:17
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@ximinez ximinez mentioned this pull request Dec 17, 2024
1 task
@ximinez ximinez force-pushed the pr/merging branch 10 times, most recently from c682b12 to 272591c Compare December 20, 2024 00:21
@ximinez ximinez force-pushed the pr/merging branch 2 times, most recently from 1b39de7 to a0ba0a3 Compare January 9, 2025 22:03
Copy link
Collaborator

@bthomee bthomee left a comment

Choose a reason for hiding this comment

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

This is looking great so far. I do want us to see if we can automate the many commands required to make a (beta) release (candidate), for instance by putting together a GitHub release bot or an interactive API script that does the heavy lifting and waits for any manual steps to complete.

CONTRIBUTING.md Outdated Show resolved Hide resolved
@ximinez ximinez mentioned this pull request Jan 16, 2025
5 tasks
@ximinez ximinez changed the title DRAFT: Update release instructions Update release instructions Jan 16, 2025
@ximinez ximinez marked this pull request as ready for review January 16, 2025 23:41
@ximinez ximinez requested a review from bthomee January 16, 2025 23:41
* Has more steps, but allows merges to develop to continue when a
  beta / RC is pending, increasing developer velocity.
* Add a CI job to check that no reverse merges have been missed.
* Add some useful scripts in bin/git:
  * Set up upstreams as expected for safer pushes
  * Squash a bunch of branches
  * Set the version number
Comment on lines 4 to 12
# TODO: Remove the next line before merging
pull_request:
push:
branches:
# Only check that the branches are up to date when updating the
# relevant branches.
# TODO: Uncomment the next lines before merging
# - develop
# - release
Copy link
Collaborator

Choose a reason for hiding this comment

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

Friendly reminder to address these TODOs 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wanted to ensure there was at least one run showing that the job worked.

.github/workflows/missing-commits.yml Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Outdated
Comment on lines 449 to 450
Some pull requests need to be pushed to `develop` as more than one
commit. There are multiple ways to accomplish this. If the author
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you have any guidelines for when squash and merge isn't possible and pushing as more than one commit is necessary? Is it fair to assume that the squash and merge button will be disabled when such a situation arises?

If it is not intuitive to know when pushing as more than one commit (or following another approach) is required, it would be worthwhile to add in which cases it has to be done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The default is squash and merge. The author can request to do separate commits if they think it's worth it. Some examples are where file layout is restructured, or if the commits are changing truly independent things such that they could be separate PRs, but they're pulled together in one PR under a common theme or issue.

I'l rewrite this section to reflect that.

CONTRIBUTING.md Outdated
Comment on lines 463 to 464
**Never use the "Create a merge commit" or "Rebase and merge" Github UI
functions!**
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be disabled at the repo-level, in Settings -> General and scroll down to Pull Requests, see screenshot.
Screenshot 2025-01-21 at 9 07 06 AM

Disabling the "Create a merge commit" or "Rebase and merge" at the repo-level seems compatible with these instructions, since releases are never done via the UI - thoughts?

Note that these settings currently cannot be configured at a branch-level, although GitHub is finally working on it and it's already available in Preview, see here. If configuring these settings at the repo-level isn't acceptable, do you know if Preview is enabled for this repo, what the consequences are for enabling it, and if it's then worthwhile setting up repository rules for the develop branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are disabled in that section. I'll reword this.

CONTRIBUTING.md Outdated Show resolved Hide resolved
ximinez and others added 2 commits January 21, 2025 18:08
Co-authored-by: Bart <bthomee@users.noreply.github.com>
* Clean up missing-commits.yml. TODOs, and reword the error message.
* Some rewording in CONTRIBUTING around code reviewers and merging
@ximinez ximinez changed the title Update release instructions TRIVIAL: Update release instructions Jan 22, 2025
@ximinez
Copy link
Collaborator Author

ximinez commented Jan 22, 2025

Marking this as "Trivial" because it has no effect on the rippled binary or other code, and so only needs one review, unless there are objections.

@ximinez
Copy link
Collaborator Author

ximinez commented Jan 22, 2025

Proposed commit message:

Update branch management and merge / release processes  (#5215)

* Has more steps, but allows merges to develop to continue when a
  beta / RC is pending, increasing developer velocity.
* Add a CI job to check that no reverse merges have been missed.
* Add some useful scripts in bin/git:
  * Set up upstreams as expected for safer pushes
  * Squash a bunch of branches
  * Set the version number

@ximinez ximinez added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Reviewed labels Jan 22, 2025
@bthomee bthomee merged commit e1e67b2 into XRPLF:develop Jan 23, 2025
21 checks passed
@ximinez ximinez deleted the pr/merging branch January 23, 2025 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Reviewed Trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants