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
🗣[Discussion] branching and release strategy #613
Comments
(Also, in theory, release branch creation could be fully automated if PRs were labeled with the kind of semver change they'd induce) |
🤗 I like the "merge as soon as something feels ready". One question: Is there a good way to find all the PRs that are on /cc @shawnbot Might be something for Primer CSS as well? |
Absolutely; in fact, if we label our PRs with appropriate semver tags, we could automate the entirety of the creation of the release branch, the PR, and the changelog. |
I'm personally a huge fan of this as well, and would love to help figure out how to automate certain aspects of this workflow because it would make releasing so much easier. I would also be down to test this out on another repo like stylelint-config-primer where there's less "risk" than in Components or CSS. |
I love the idea of automating more of the release process 😍 This plan looks good to me. We just have to make sure that we're consistent about our release workflow across all of our libraries or I can see people getting confused. |
I've looked into using |
@shawnbot We used semantic-release pretty extensively on the Electron satellite packages and it worked pretty well. Since it requires semantic commit messages, maybe it's something we could explore doing next? If folks don't have any objections, I'd like to give this a shot starting tomorrow. Assuming no objections, I'll do the following tomorrow:
|
Correct me if I'm missing something, but the basic idea is essentially the same as having a named release branch but instead of predetermining a version number we keep that version number ambiguous until we decide to merge the branch into master? I like the idea of having a persistent branch name that doesn't change to pull from, and think that will be helpful, but I think before we make this change we need to first put into place some of those automation features - without the automations in place I think this will make managing releases in the meantime pretty tedious for a few reasons:
Couple of questions!: If the idea is that we'd be releasing more often, I'm curious how we will know it's time to make a release branch off of |
I agree, automation around this would be nice, and I'd be happy to get this in place before we make any changes. Personally, I think the best situation is that we start using semantic PR titles/merge commit messages and just let the automation fully build the changelog. I've been on other teams at GitHub where this has worked pretty well.
I'm not sure I personally agree with this; I guess it depends on whether you see the issue tracker as a tool for users of the package or for the developers of the package. I think of a closed issue as "this has been merged to the default branch and I don't need to think about working on it any more," while the release tracking PRs keep track of which of those are yet to be released. Another problem is that if you have a PR that claims to fix an issue (e.g.
I guess there are a few ways to handle it; if the changes aren't dependent on each other, then the "major changes" features could be merged to the default branch and then just cherry-pick which ones we want to release into the release PR somehow. This does make the automation trickier, and sometimes people will work on a minor/patch level change that accidentally depends on the major change which breaks this workflow. We could also just leave major version changing PRs open until we're ready to prep them for release. I've written up two or three ideas about how the automation could work, but each of them runs into issues based on the way |
I wouldn't consider the release candidate versioning a blocker for this. We would still get canary releases, and with a new process in place we can update |
Yeah that's a good point. Automation could also manage the version number in |
Closing now that we have changesets 🎉 |
Currently, we target feature PRs in
primer/components
against the current release branch, and merging that release branch intomaster
triggers a package publish. This particular workflow introduces a few areas of friction:git branch -a | grep origin/release-
or visit the GitHub UI and check the PRs). If the branch doesn’t exist because a release was recently merged, you need to cut one frommaster
, but since the release branch needs to have the appropriate version number in its name, you need to plan ahead for which PRs you’re going to include in the branch.master
) before the issue is automatically closed. [Edit: I just noticed that indirectly merging a PR intomaster
doesn't actually close any issues tagged as being fixed by the PR, so this problem is worse than I thought]I’d like to suggest the following change:
develop
(or similar) based offmaster
Doing so would result in the following:
develop
always contains the latest changes, any new feature branch could confidently be cut from it and merged into it without much thought (solves issue 1 above)develop
branch by default; as soon as a feature PR is merged, its associated issue will be closed (solves issue 3 above)primer/publish
asmaster
remains the branch that triggers releasesWith this strategy, when we're ready to cut a release, we can cut a very short-lived release branch off
develop
targetingmaster
, choosing its name and version based on the commits that will be merged. This can be merged/released as soon as we're confident that the release is solid (which should be relatively easy since it's a copy of the tip ofdevelop
).Interested in hearing folk's thoughts! @primer/ds-core
The text was updated successfully, but these errors were encountered: