-
Notifications
You must be signed in to change notification settings - Fork 457
Review the release process #1984
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
Comments
As part of this, it would also be nice if we could check if it is possible to enforce a certain commit type to a certain branch via GitHub. More specifically, I would like to see that PRs can only be merged to master via a merge commit. |
Another addition: If we still have a (much smaller) release script after this issue, we should add a check in it for changes in the database migrations. It should check between the last release and the current if there were changes in the migrations, and remind us to run the updates on the database. |
Looking into lerna docs, doing some thought experiments and some practical experiments at github.com/kuzdogan/sourcify here's what I propose below. While thinking about the release process it's useful to think about two aspects of the release:
Prior to both proposals we do one final release with the current script setup and then move forward with one of them: Automated proposal
See https://github.com/kuzdogan/sourcify/releases for examples This proposal relies on using conventional commits.
One concern with this setup is it's fully automatic in versioning and at times it might not result in our intended versions. For example if in a commit or a PR named The other problem is lerna batch pushes the git tags, this will resurrect the CircleCI problem of sometimes not detecting the new git tags. This wouldn't be an issue for packages if we publish after versioning locally, but it's a problem for versioned containers built on the CI. Here we can move container builds to Github Jobs to work around this. Semi-automated alternativeThe other alternative is we choose package versions ourselves via lerna (above it was derived from
Separate questionOne question independent from the proposal choice is if we want to maintain |
I'm in favor of trying the "Automated proposal" for some time. Is it going to be very difficult to rollback to our current release process if we are unsatisfied? |
No we can always go back to any way to release, even manual if needed. We are essentially doing the same things |
Some questions about this to make sure I understood everything correctly. So, in general, lerna does detect which packages a commit changes, correct? If we only modify files inside server directory, only server receives a version bump? On the other side, if a commit modifies two packages, would we have the same changelog message for two packages? I also saw there is a scope feature in conventional commits. Would it help using this for working around this problem?
How sure are you about this? When was the last time that this was a problem? If it's long ago I think it's worth to try again if CircleCI still has a problem with it. I generally like the idea of using conventional commits. I only think we then need to be stricter about processes. Squashed merge commits might be a problem for conventional commits. What if one PR wants to introduce a feature in two packages? Or introduce two changelog entries for the same package? I think we should just move to usual merge commits. Also, I think we should enforce the merging strategy via GitHub settings. I see some PRs merged with a different strategy than squashing recently. This is also an opportunity to start having a cleaner commit history inside PRs. We can have a CI check that makes sure our commits follow the conventional commit format. Enforcing to squash any fixup commits inside PRs could also make sense before merging. |
I think in general, before merging a PR, we can rebase e reorganize the history as we like. |
Yes
Also yes see https://github.com/kuzdogan/sourcify/releases
I don't think scopes are === npm packages. Seems this is not possible It might be worth digging a little more as this would resolve the main issue with this approach.
I think last time was over a year ago when we last wrote the release script. It might be and hopefully be resolved. Otherwise we can move that part to Github actions easily as I said.
AFAIK there are also other tooling that prevents pushing non-conforming commit messages. I can have a look. But I don't know if we want ALL commits to conform I think in general we need to be mindful when we are merging something and then it should be alright? |
But also, if conventional commits will bring more overhead to organizing commits etc. it's not favorable. By doing the tagging and publishing on staging we get rid of some parts of the script that is prone to errors. Then we can semi-automate to write changelogs manually and release. My feeling now more is that conventional commits are designed for non-monorepos and it get's quite tricky with a monorepo with different packages |
What we could also do is writing changelog entries inside the PR of the change. You would gather these at the top of the changelog as unreleased until they are released finally. I worked like that in past. I think our current approach of writing the entries during release is error prone and it is easy to forget something. So, we wouldn't need conventional commits to solve that. |
Currently the release process and the script (scripts/release/main.sh) is cumbersome with many steps and really prone to errors. If anything goes wrong, the script breaks and it's really difficult to start over.
Following our call today, I'll be having a look at the release process:
The text was updated successfully, but these errors were encountered: