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

feat: ci: automate the new release process #12096

Merged
merged 23 commits into from
Jul 25, 2024
Merged

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Jun 16, 2024

Closes #12163
Closes #12162

Related Issues

#12010

Proposed Changes

  1. Split node and miner releases (node=[lotus], miner=[lotus-miner, lotus-worker]).
  2. Publish a new GitHub release (and create an appropriate tag) of node and/or miner whenever a PR which modified version.go (in a way that adds a version that doesn't have a corresponding tag yet) has been merged to either releases or release/vX.Y.Z branch.
  3. Run the release workflow in a dry/snapshot mode on PRs that modify version.go (if -rc, then base has to be release/vX.Y.Z, if stable ,then base has to be releases).
  4. Run the docker workflow in a dry mode on PRs.

❗ I split homebrew-lotus into 2 formulas (for lotus node - lotus and lotus miner - lotus-miner).

Additional Info

Out of scope for this PR, but worth considering in the future:

  1. [DX Streamline] Use the mkreleaselog generated changelog when creating GitHub Releases #12162
  2. [DX Streamline] Create draft GitHub releases on PRs modifying version.go #12163

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

Copy link

github-actions bot commented Jun 16, 2024

All checks have passed

@BigLep BigLep added this to the DX-Streamline milestone Jun 17, 2024
@BigLep
Copy link
Member

BigLep commented Jun 17, 2024

I think it would be good if this PR also included the accompanying changes to https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md so its clear how this affects the "release engineer". Maybe @rjan90 should take this?

@galargh
Copy link
Contributor Author

galargh commented Jun 21, 2024

I think it would be good if this PR also included the accompanying changes to https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md so its clear how this affects the "release engineer". Maybe @rjan90 should take this?

That's a good idea, I'll propose the changes to that file - I think it'll be good way to do the final verification on our mutual understanding of the new process.

@galargh
Copy link
Contributor Author

galargh commented Jun 21, 2024

I updated the documentation and the accompanying workflows to make sure the automation changes are reflected.

Copy link
Member

@BigLep BigLep left a comment

Choose a reason for hiding this comment

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

It looks good to me from my high level read through. We'll want @rvagg to give the approval here though.

In general, and this may just be me, I would like to see less bash for future maintenance regards. That said, I know there are lots of shell scripts in https://github.com/filecoin-project/lotus/tree/master/scripts and I assume that is the convention within github workflow .yml files. Anyways, no insistence on changing this - I just wanted to make sure that it's intentional when we add more shell scripting given it can tend to be more esoteric and less ergonomic than other languages.

.goreleaser.yaml Outdated Show resolved Hide resolved
cmd/release/README.md Outdated Show resolved Hide resolved
cmd/release/README.md Show resolved Hide resolved
.github/workflows/docker.yml Outdated Show resolved Hide resolved
@rvagg
Copy link
Member

rvagg commented Jun 24, 2024

👍 so far

@BigLep
Copy link
Member

BigLep commented Jul 12, 2024

@galargh : I'll let others chime in here, but a couple of comments or things to be aware of.

  1. FYI that we'll be dropping the "releases" branch soon (after the nv23 upgrade) as part of Revised Lotus Node/Client Versioning #12072

  2. I believe we should maintain the Homebrew functionality given it is the recommended path on Macs: https://lotus.filecoin.io/lotus/install/macos/

@rvagg
Copy link
Member

rvagg commented Jul 15, 2024

#12231

@galargh
Copy link
Contributor Author

galargh commented Jul 15, 2024

  1. FYI that we'll be dropping the "releases" branch soon (after the nv23 upgrade) as part of Revised Lotus Client Versioning #12072

Off the top of my head, getting rid of releases will require:

And that should be about it.

  1. I believe we should maintain the Homebrew functionality given it is the recommended path on Macs: https://lotus.filecoin.io/lotus/install/macos/

OK, we'll set it up this will in the homebrew-lotus repository directly.


I don't think these two are blocking.

@BigLep BigLep requested a review from rvagg July 15, 2024 18:40
@BigLep
Copy link
Member

BigLep commented Jul 15, 2024

I assume this is waiting on final approval from @rvagg . I've re-requested review.

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

👌 this worked well in #12232 to produce https://github.com/filecoin-project/lotus/releases/tag/v1.27.2-rc2

I'm happy with this if @rjan90 is.

@rvagg
Copy link
Member

rvagg commented Jul 17, 2024

Some issues encountered when taking v1.27.2 all the way that will need to be addressed here: #12249 (comment)

@galargh
Copy link
Contributor Author

galargh commented Jul 17, 2024

This required a further merge of release/v1.27.2 into the releases branch to finalise #12250, which is different from RC builds. This is as designed but needs to change for v1.28.0 forward because we are not using the releases branch for that.

This was expected as per #12096 (comment). Updated now in c1d8638

This created miner builds and a miner release: https://github.com/filecoin-project/lotus/releases/tag/untagged-086fb5cb1c887e1c1658, although the release page is mostly empty except for some titles and the build assets. I cancelled the miner release step before it did its thing so we haven't pushed that: https://github.com/filecoin-project/lotus/actions/runs/9972453588/job/27556032962

This was expected, too, since miner/v1.27.1 hasn't been released before and v1.27.1 is the miner version in the releases branch. The notes for miner releases are sourced from changelog.

The release page it posted had two titles and two contributor tables; one taken from the CHANGELOG and one generated. The contributors table that was generated was more correct although the title wasn't an h2 (##), I forgot to redo it. But I edited the release page after the draft was created, but when it did the final release it overwrote my edits so I have to edit it again. It would be good if the draft could be used to get it right before it's pushed to the wild since some people get the original via email or other notification where the edits won't be seen after publish.

Removed secondary title in 55d83f0

The release notes are changelog entry + mkreleaselog output. You no longer have to paste the mkreleaselog output in changelog directly.

Added draft notes preservation in 55d83f0

@rvagg
Copy link
Member

rvagg commented Jul 18, 2024

This was expected, too, since miner/v1.27.1 hasn't been released before and v1.27.1 is the miner version in the releases branch. The notes for miner releases are sourced from changelog.

Oh .. we set the miner version to be something without -dev: 8e7cd7d, we probably should leave it as -dev so we don't get unwanted releases.

@BigLep
Copy link
Member

BigLep commented Jul 22, 2024

@galargh: are the next steps clear here so we can get this merged?

@BigLep
Copy link
Member

BigLep commented Jul 23, 2024

@rvagg : per slack, @galargh believes this is good to go. Will you please merge?

@rvagg
Copy link
Member

rvagg commented Jul 24, 2024

Has conflicts that need resolving. @galargh I'm happy for you to squash merge this once you're done with the conflicts.

@galargh
Copy link
Contributor Author

galargh commented Jul 24, 2024

I don't see any outstanding conflicts. Is it with some other branch than the target (master)? Let me know, happy to update as needed.

@rvagg
Copy link
Member

rvagg commented Jul 25, 2024

hm, no, I'm sure there were conflicts when I posted that message! Looks good to go now.

@rvagg rvagg merged commit a6fd2eb into master Jul 25, 2024
84 checks passed
@rvagg rvagg deleted the ipdx/release-automation branch July 25, 2024 06:59
@galargh
Copy link
Contributor Author

galargh commented Jul 25, 2024

Might have been some glitch with GitHub UI; thank you for merging, let me know if there are any issues with it and I'll jump straight on it.

@rvagg rvagg mentioned this pull request Jul 29, 2024
ribasushi pushed a commit to ribasushi/ci-abusing-lotus-fork that referenced this pull request Aug 20, 2024
Co-authored-by: Phi-rjan <orjan.roren@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: ☑️ Done (Archive)
4 participants