RFC: Figuring out how to smooth out the autorelease pipeline #86
Replies: 5 comments 6 replies
-
This seems to be a non-issue (!!) because fast-forward merges happen (meaning the two branches end up being at literally the same commit), since they share the same commits/base, which I think will stay true as long as we merge the |
Beta Was this translation helpful? Give feedback.
-
I disagree with your premise here that there's no value in automating changesets. Some people will end up not reading the CONTRIBUTING document. I think it's best if we make the process as seamless as possible, so that even if people didn't read that document, they likely ended up doing everything right anyway, in order to reduce maintenance burden as much as possible. Obviously at the current popularity of this repo, it's not a big deal, but at the end of the day our goal with this tooling is to make maintainer's lives easier, and if it's a common trope for people to not read the CONTRIBUTING document (which it already appears to be, even at this volume), we should account for that in our tooling. I don't really see Git Hooks as "shenanigans" either. I'm happy to write a hook that asks the user if the commit they are making is a change to the CLI, and ask for a patch note if they say yes. If that saves us from asking for (I do see your point in how "the tooling should work" vs. "git hooks shenanigans", but I'm sure we can get this right so it does work on commit) |
Beta Was this translation helpful? Give feedback.
-
I've also kind of just threw my hands up and said "develop and main are fine too", given that it seems common for everyone around here, and I just want the branch names to be intuitive. In other words, I just really don't want to keep I do think one is marginally better, but the real nit I have is with the |
Beta Was this translation helpful? Give feedback.
-
Branch names
Changesets
Merging the release branch back into the defualt branch
|
Beta Was this translation helpful? Give feedback.
-
For the historical purpose of highlighting what was decided, we went back to following the regular Git flow, and abandon branching strategies for pre-releases altogether. As @sammoore pointed out during our conversation, and being something that I massively overlooked, because pushes to the
It was decided that this flow led to a more healthy contribution experience, and easier reasoning behind the publish pipeline as of now, with margin to revisit this later as our needs expand. Thanks to everyone involved in this discussion 🚀 |
Beta Was this translation helpful? Give feedback.
-
@sammoore @danstepanov Centralizing this under a discussion because, depending on the ramifications, this could span across several issues and/or PR's.
I think we're getting some things mixed in terms of what part of the flow is responsible for what, so first of all, let me make sure we're all working in the same page:
This is our current situation:
beta
is the default branch.main
is the release branch (the one that will release new versions under thelatest
tag on NPM, the default).There are GitHub Actions that run on
push
triggers on bothbeta
andmain
:beta
, regardless if by a PR, or commit, will:beta
release is needed.beta
tag on NPM.main
, regardless if by PR or commit, will:latest
release is needed.main
.@changeset/action
are smart enough to figure out that the merge was from a PR created by itself, and determine that, this time, it's time to publish the package.main
are cleaned, and the version is bumped accordingly onpackage.json
. A new release cycle begins. This is where merging back tobeta
is highly recommended, as it will cleanup stale changesets.What has been proposed to improve this:
Recent conversations around the topic of autorelease here seems to circle around two aspects:
"We should rename the branches something that makes more sense"
I agree. From the outside contributor's perspective, having
beta
as the main branch is extremely confusing. @sammoore has came up with going back tomain
as the default branch, andrelease
for the locked branch where releases happen."We should automate the creation of changesets"
We could. I personally don't see the value. The addition of a changeset is the declaration of an intent to add/change the module behavior. Any attempt to automate that will involve fairly complicated CI and/or Git hooks shenanigans, and, most importantly, destroy the historical reference to the original commit that issued the changes.
As I've stated before, I believe the correct course of action here is making sure that:
CONTRIBUTING.md
and pull request templates."Merging the release branch back into the default branch breaks linear commit history"
While I do agree, I don't see a way around it that doesn't involve introducing even more complexity to the current workflow. The fact is that stale changesets needs to be cleaned out of the default branch after a release. I'm open to other ideas on how to make that happen.
Beta Was this translation helpful? Give feedback.
All reactions