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

chore: add infrastructure to patch latest version #2497

Merged
merged 6 commits into from
Jun 23, 2024

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Jun 12, 2024

This PR adds infrastructure to patch the last release. Given that this workflow releases commits that are not on master, we'll have to manually apply those commits' changes to master if the released code doesn't already exist on it.

Besides the release of the package itself, the documentation also gets updated when this scenario occurs.

closes #2245

@nedsalk nedsalk added the chore Issue is a chore label Jun 12, 2024
@nedsalk nedsalk self-assigned this Jun 12, 2024
@nedsalk nedsalk force-pushed the ns/chore/patch-latest-release-infra branch from ba71acb to 8ad5fcb Compare June 12, 2024 14:16
@nedsalk nedsalk marked this pull request as ready for review June 12, 2024 14:38
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Should we document the process as we did for patching old releases?

fuels-ts/CONTRIBUTING.md

Lines 240 to 248 in 269197f

# Patching old releases
The following example is for releasing a patch for `v0.69.0` -> `v0.69.1`.
- Checkout the release commit via its tag and create a release branch based on it (`git checkout -b release/0.69.0 v0.69.0 && git push --set-upstream origin release/0.69.0`)
- Create PRs with base set to that release branch
- When the PR is merged, a changeset PR is created
- When the changeset PR is merged into the release branch, the next patch version is released and the commit is tagged (e.g. `v0.69.1`)
- After release, delete the release branch from GitHub

@nedsalk nedsalk requested a review from arboleya June 12, 2024 17:49
@arboleya arboleya added this to the 0.x mainnet milestone Jun 12, 2024
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@nedsalk nedsalk requested a review from arboleya June 14, 2024 13:55
@nedsalk nedsalk marked this pull request as draft June 17, 2024 12:27
@nedsalk nedsalk force-pushed the ns/chore/patch-latest-release-infra branch from 75b22c1 to 134c330 Compare June 17, 2024 13:01
@nedsalk nedsalk marked this pull request as ready for review June 17, 2024 13:06
Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

Out of curiosity, how do we test these type of release workflows?

@nedsalk
Copy link
Contributor Author

nedsalk commented Jun 18, 2024

@petertonysmith94 The actual full workflow would be tested in the trenches after we merge it into master and release a new version of master. We'd then run this workflow on that release/v0.xx.x branch by doing a simple, non-breaking change and verifying that everything works as expected. 😅
However, I tested all the added logic in the CI in isolation, e.g. #2529 for PR creation and running the bash scripts in the CI on mock data to verify that there's no failure in them.

Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

@nedsalk thanks for explaining, super valuable insight - got to love some trenches testing 😆

It looks good me 🚀

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
80.96%(+0%) 72.55%(+0%) 77.98%(+0%) 81.01%(+0%)
Changed Files:

Coverage values did not change👌.

Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

Firstly, thanks for addressing this final piece on our release process.

Having said that, I couldn't properly validate it. I mean no offense, but the changes in this PR are too convoluted and unreadable (hard to follow). If we add the fact that it is purely text (CI/YAML), the job becomes even more challenging. It is like validating code on a piece of paper.

I know others have approved it, but I wonder if they could accurately explain it back to you.

I'll go ahead and approve it as is so you can validate it yourself in practical terms. I suggest doing that in isolation at the beginning of your day so you can see it through and make any extra fixes on the spot if necessary.

@nedsalk
Copy link
Contributor Author

nedsalk commented Jun 23, 2024

@arboleya you're right that these scripts aren't the most readable code. I have created #2581 where we can evolve the discussion and hopefully come to a better CI workflow codebase.

@nedsalk nedsalk merged commit 0790f9c into master Jun 23, 2024
20 checks passed
@nedsalk nedsalk deleted the ns/chore/patch-latest-release-infra branch June 23, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a way to patch the last release
6 participants