diff --git a/.github/workflows/create-release-issue.yml b/.github/workflows/create-release-issue.yml
new file mode 100644
index 00000000000..ba9ea1decb6
--- /dev/null
+++ b/.github/workflows/create-release-issue.yml
@@ -0,0 +1,70 @@
+name: Create Release Issue
+
+on:
+ workflow_dispatch:
+ inputs:
+ type:
+ description: "What's the type of the release?"
+ required: true
+ type: choice
+ options:
+ - node
+ - miner
+ - both
+ tag:
+ description: "What's the tag of the release? (e.g., 1.30.1)"
+ required: true
+ level:
+ description: "What's the level of the release?"
+ required: true
+ default: 'warning'
+ type: choice
+ options:
+ - major
+ - minor
+ - patch
+ network-upgrade:
+ description: "What's the version of the network upgrade this release is related to? (e.g. 25)"
+ required: false
+ discussion-link:
+ description: "What's a link to the GitHub Discussions topic for the network upgrade?"
+ required: false
+ changelog-link:
+ description: "What's a link to the Lotus CHANGELOG entry for the network upgrade?"
+ required: false
+ rc1-date:
+ description: "What's the expected shipping date for RC1?"
+ required: false
+ stable-date:
+ description: "What's the expected shipping date for the stable release?"
+ required: false
+
+defaults:
+ run:
+ shell: bash
+
+permissions:
+ contents: read
+ issues: write
+
+jobs:
+ create-issue:
+ name: Create Release Issue
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/install-go
+ - env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: |
+ go run cmd/release/main.go create-issue \
+ --create-on-github true \
+ --type "${{ github.event.inputs.type }}" \
+ --tag "${{ github.event.inputs.tag }}" \
+ --level "${{ github.event.inputs.level }}" \
+ --network-upgrade "${{ github.event.inputs.network-upgrade }}" \
+ --discussion-link "${{ github.event.inputs.discussion-link }}" \
+ --changelog-link "${{ github.event.inputs.changelog-link }}" \
+ --rc1-date "${{ github.event.inputs.rc1-date }}" \
+ --stable-date "${{ github.event.inputs.stable-date }}" \
+ --repo "filecoin-project/lotus"
diff --git a/cmd/release/README.md b/cmd/release/README.md
index 92b55507608..92be1c62114 100644
--- a/cmd/release/README.md
+++ b/cmd/release/README.md
@@ -1,10 +1,11 @@
# Lotus Release Tool
-The Lotus Release Tool is a CLI (Command Line Interface) utility designed to facilitate interactions with the Lotus Node and Miner metadata. This tool allows users to retrieve version information in either JSON or text format. The Lotus Release Tool was developed as a part of the [2024Q2 release process automation initiative](https://github.com/filecoin-project/lotus/issues/12010) and is used in the GitHub Actions workflows related to the release process.
+The Lotus Release Tool is a CLI (Command Line Interface) utility designed to facilitate interactions with the Lotus Node and Miner metadata. This tool allows users to retrieve version information in either JSON or text format. The Lotus Release Tool was initially developed as a part of the [2024Q2 release process automation initiative](https://github.com/filecoin-project/lotus/issues/12010) and is used in the GitHub Actions workflows related to the release process.
## Features
- List all projects with their expected version information.
+- Create a new release issue from a template.
- Output logs in JSON or text format.
## Installation
@@ -26,17 +27,26 @@ The `release` tool provides several commands and options to interact with the Lo
```sh
./release list-projects
```
+- **Create Issue**: Create a new release issue from a template.
+ ```sh
+ ./release create-issue
+ ```
-### Options
+### Global Options
- **--json**: Format output as JSON.
```sh
- ./release --json list-projects
+ ./release --json
```
-## Example
+## Examples
List Lotus Node and Lotus Miner version information with JSON formatted output:
```sh
./release --json list-projects
```
+
+Create a new release issue from a template:
+```sh
+./release create-issue --type node --tag 1.30.1 --level patch --network-upgrade --discussion-link https://github.com/filecoin-project/lotus/discussions/12010 --changelog-link https://github.com/filecoin-project/lotus/blob/v1.30.1/CHANGELOG.md --rc1-date 2023-04-01 --rc1-precision day --rc1-confidence confirmed --stable-date 2023-05-01 --stable-precision week --stable-confidence estimated
+```
diff --git a/cmd/release/main.go b/cmd/release/main.go
index 4040de4d977..2b2cdfdc8b0 100644
--- a/cmd/release/main.go
+++ b/cmd/release/main.go
@@ -1,11 +1,21 @@
package main
import (
+ "bytes"
+ "context"
"encoding/json"
+ "fmt"
+ "html/template"
+ "net/url"
"os"
"os/exec"
+ "regexp"
+ "strconv"
"strings"
+ masterminds "github.com/Masterminds/semver/v3"
+ "github.com/Masterminds/sprig/v3"
+ "github.com/google/go-github/v66/github"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"golang.org/x/mod/semver"
@@ -124,6 +134,8 @@ func getProject(name, version string) project {
}
}
+const releaseDateStringPattern = `^(Week of )?\d{4}-\d{2}-\d{2}( \(estimate\))?$`
+
func main() {
app := &cli.App{
Name: "release",
@@ -163,6 +175,238 @@ func main() {
return nil
},
},
+ {
+ Name: "create-issue",
+ Usage: "Create a new release issue from the template",
+ Flags: []cli.Flag{
+ &cli.BoolFlag{
+ Name: "create-on-github",
+ Usage: "Whether to create the issue on github rather than print the issue content. $GITHUB_TOKEN must be set.",
+ Value: false,
+ },
+ &cli.StringFlag{
+ Name: "type",
+ Usage: "What's the type of the release? (Options: node, miner, both)",
+ Value: "both",
+ Required: true,
+ },
+ &cli.StringFlag{
+ Name: "tag",
+ Usage: "What's the tag of the release? (e.g., 1.30.1)",
+ Required: true,
+ },
+ &cli.StringFlag{
+ Name: "level",
+ Usage: "What's the level of the release? (Options: major, minor, patch)",
+ Value: "patch",
+ Required: true,
+ },
+ &cli.StringFlag{
+ Name: "network-upgrade",
+ Usage: "What's the version of the network upgrade this release is related to? (e.g., 25)",
+ Required: false,
+ },
+ &cli.StringFlag{
+ Name: "discussion-link",
+ Usage: "What's a link to the GitHub Discussions topic for the network upgrade?",
+ Required: false,
+ },
+ &cli.StringFlag{
+ Name: "changelog-link",
+ Usage: "What's a link to the Lotus CHANGELOG entry for the network upgrade?",
+ Required: false,
+ },
+ &cli.StringFlag{
+ Name: "rc1-date",
+ Usage: fmt.Sprintf("What's the expected shipping date for RC1? (Pattern: '%s'))", releaseDateStringPattern),
+ Value: "TBD",
+ Required: false,
+ },
+ &cli.StringFlag{
+ Name: "stable-date",
+ Usage: fmt.Sprintf("What's the expected shipping date for the stable release? (Pattern: '%s'))", releaseDateStringPattern),
+ Value: "TBD",
+ Required: false,
+ },
+ &cli.StringFlag{
+ Name: "repo",
+ Usage: "Which full repository name (i.e., OWNER/REPOSITORY) to create the issue under.",
+ Value: "filecoin-project/lotus",
+ Required: false,
+ },
+ },
+ Action: func(c *cli.Context) error {
+ // Read and validate the flag values
+ createOnGitHub := c.Bool("create-on-github")
+
+ releaseType := c.String("type")
+ switch releaseType {
+ case "node":
+ releaseType = "Node"
+ case "miner":
+ releaseType = "Miner"
+ case "both":
+ releaseType = "Node and Miner"
+ default:
+ return fmt.Errorf("invalid value for the 'type' flag. Allowed values are 'node', 'miner', and 'both'")
+ }
+
+ releaseTag := c.String("tag")
+ releaseVersion, err := masterminds.StrictNewVersion(releaseTag)
+ if err != nil {
+ return fmt.Errorf("invalid value for the 'tag' flag. Must be a valid semantic version (e.g. 1.30.1)")
+ }
+
+ releaseLevel := c.String("level")
+ if releaseLevel != "major" && releaseLevel != "minor" && releaseLevel != "patch" {
+ return fmt.Errorf("invalid value for the 'level' flag. Allowed values are 'major', 'minor', and 'patch'")
+ }
+
+ networkUpgrade := c.String("network-upgrade")
+ discussionLink := c.String("discussion-link")
+ if networkUpgrade != "" {
+ _, err := strconv.ParseUint(networkUpgrade, 10, 64)
+ if err != nil {
+ return fmt.Errorf("invalid value for the 'network-upgrade' flag. Must be a valid uint (e.g. 23)")
+ }
+ if discussionLink != "" {
+ _, err := url.ParseRequestURI(discussionLink)
+ if err != nil {
+ return fmt.Errorf("invalid value for the 'discussion-link' flag. Must be a valid URL")
+ }
+ }
+ }
+
+ changelogLink := c.String("changelog-link")
+ if changelogLink != "" {
+ _, err := url.ParseRequestURI(changelogLink)
+ if err != nil {
+ return fmt.Errorf("invalid value for the 'changelog-link' flag. Must be a valid URL")
+ }
+ }
+
+ rc1Date := c.String("rc1-date")
+ releaseDateStringRegexp := regexp.MustCompile(releaseDateStringPattern)
+ if rc1Date != "TBD" {
+ matches := releaseDateStringRegexp.FindStringSubmatch(rc1Date)
+ if matches == nil {
+ return fmt.Errorf("rc1-date must be of form %s", releaseDateStringPattern)
+ }
+ }
+
+ stableDate := c.String("stable-date")
+ if stableDate != "TBD" {
+ matches := releaseDateStringRegexp.FindStringSubmatch(stableDate)
+ if matches == nil {
+ return fmt.Errorf("stable-date must be of form %s", releaseDateStringPattern)
+ }
+ }
+
+ repoFullName := c.String("repo")
+ repoRegexp := regexp.MustCompile(`^([^/]+)/([^/]+)$`)
+ matches := repoRegexp.FindStringSubmatch(repoFullName)
+ if matches == nil {
+ return fmt.Errorf("invalid repository name format. Must be 'owner/repo'")
+ }
+ repoOwner := matches[1]
+ repoName := matches[2]
+
+ // Prepare template data
+ data := map[string]any{
+ "CreateOnGitHub": createOnGitHub,
+ "Type": releaseType,
+ "Tag": releaseVersion.String(),
+ "NextTag": releaseVersion.IncPatch().String(),
+ "Level": releaseLevel,
+ "NetworkUpgrade": networkUpgrade,
+ "NetworkUpgradeDiscussionLink": discussionLink,
+ "NetworkUpgradeChangelogEntryLink": changelogLink,
+ "RC1DateString": rc1Date,
+ "StableDateString": stableDate,
+ }
+
+ // Render the issue template
+ issueTemplate, err := os.ReadFile("documentation/misc/RELEASE_ISSUE_TEMPLATE.md")
+ if err != nil {
+ return fmt.Errorf("failed to read issue template: %w", err)
+ }
+ // Sprig used for String contains and Lists
+ tmpl, err := template.New("issue").Funcs(sprig.FuncMap()).Parse(string(issueTemplate))
+ if err != nil {
+ return fmt.Errorf("failed to parse issue template: %w", err)
+ }
+ var issueBodyBuffer bytes.Buffer
+ err = tmpl.Execute(&issueBodyBuffer, data)
+ if err != nil {
+ return fmt.Errorf("failed to execute issue template: %w", err)
+ }
+
+ // Prepare issue creation options
+ issueTitle := fmt.Sprintf("Lotus %s v%s Release", releaseType, releaseTag)
+ issueBody := issueBodyBuffer.String()
+
+ // Remove duplicate newlines before headers and list items since the templating leaves a lot extra newlines around.
+ // Extra newlines are present because go formatting control statements done within HTML comments rather than using {{- -}}.
+ // HTML comments are used instead so that the template file parses as clean markdown on its own.
+ // In addition, HTML comments were also required within "ranges" in the template.
+ // Using HTML comments everywhere keeps things consistent.
+ re := regexp.MustCompile(`\n\n+([^#*\[\|])`)
+ issueBody = re.ReplaceAllString(issueBody, "\n$1")
+
+ if !createOnGitHub {
+ // Create the URL-encoded parameters
+ params := url.Values{}
+ params.Add("title", issueTitle)
+ params.Add("body", issueBody)
+ params.Add("labels", "tpm")
+
+ // Construct the URL
+ issueURL := fmt.Sprintf("https://github.com/%s/issues/new?%s", repoFullName, params.Encode())
+
+ debugFormat := `
+Issue Details:
+=============
+Title: %s
+
+Body:
+-----
+%s
+
+URL to create issue:
+-------------------
+%s
+`
+ _, _ = fmt.Fprintf(c.App.Writer, debugFormat, issueTitle, issueBody, issueURL)
+ } else {
+ // Set up the GitHub client
+ client := github.NewClient(nil).WithAuthToken(os.Getenv("GITHUB_TOKEN"))
+
+ // Check if the issue already exists
+ issues, _, err := client.Search.Issues(context.Background(), fmt.Sprintf("%s in:title state:open repo:%s is:issue", issueTitle, repoFullName), &github.SearchOptions{})
+ if err != nil {
+ return fmt.Errorf("failed to list issues: %w", err)
+ }
+ if issues.GetTotal() > 0 {
+ return fmt.Errorf("issue already exists: %s", issues.Issues[0].GetHTMLURL())
+ }
+
+ // Create the issue
+ issue, _, err := client.Issues.Create(context.Background(), repoOwner, repoName, &github.IssueRequest{
+ Title: &issueTitle,
+ Body: &issueBody,
+ Labels: &[]string{
+ "tpm",
+ },
+ })
+ if err != nil {
+ return fmt.Errorf("failed to create issue: %w", err)
+ }
+ _, _ = fmt.Fprintf(c.App.Writer, "Issue created: %s", issue.GetHTMLURL())
+ }
+
+ return nil
+ },
+ },
},
}
diff --git a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md
index 67faea3a951..75cb5032fa4 100644
--- a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md
+++ b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md
@@ -1,110 +1,140 @@
-# Lotus Node|Miner X.Y.Z Release
-
[//]: # (Below are non-visible steps intended for the issue creator)
[//]: # (βοΈ Complete the steps below as part of creating a release issue and mark them complete with an X or β when done.)
-[//]: # ([ ] Start an issue with title "[WIP] Lotus Node|Miner vX.Y.Z Release" and adjust the title for whether it's a Node or Miner release.)
+
+[//]: # ([ ] Start an issue with title "Lotus {{.Type}} v{{.Tag}} Release" and adjust the title for whether it's a Node or Miner release.)
[//]: # ([ ] Copy in the content of https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md)
-[//]: # ([ ] Find/Replace "X.Y.\(Z+1\)" with the actual values e.g., v1.30.1)
-[//]: # ([ ] Find/Replace "X.Y.Z" with the actual values)
-[//]: # ([ ] If this isn't a release tied to a network upgrade, remove all items with "\(network upgrade\)")
-[//]: # ([ ] If this is a patch release, remove all items with "\(minor release\)")
-[//]: # ([ ] If this is a minor release, remove all items with "\(patch release\)")
-[//]: # ([ ] Copy/paste the "Release Checklist > rcX" section to "Release Checklist > Stable \(non-RC\) Release" and apply the "diff" called out there.)
-[//]: # ([ ] Find/Replace "rcX" with "rc1")
+[//]: # ([ ] Find all the "go templating" "control" logic that is in \{\{ \}\} blocks and mimic the logic manually.)
[//]: # ([ ] Adjust the "Meta" section values)
[//]: # ([ ] Apply the `tpm` label to the issue)
[//]: # ([ ] Create the issue)
+
+
[//]: # ([ ] Pin the issue on GitHub)
-## πΆβπ« Meta
-* Scope: Node|Miner MINOR|PATCH
-* Is this linked with a network upgrade, and thus mandatory? Yes|No
-* (network upgrade) Related network upgrade version: nvXX
- * (network upgrade) Scope, dates, and epochs:
- * (network upgrade) Lotus changelog with Lotus specifics:
+# πΆβπ« Meta
+* Type: {{.Type}}
+* Level: {{.Level}}
+* Related network upgrade version: n/anv{{.NetworkUpgrade}}
+ * Scope, dates, and epochs: {{.NetworkUpgradeDiscussionLink}}
+ * Lotus changelog with Lotus specifics: {{.NetworkUpgradeChangelogEntryLink}}
+
-## π’ Estimated shipping date
+# π’ Estimated shipping date
[//]: # (If/when we know an exact date, remove the "week of".)
[//]: # (If a date week is an estimate, annotate with "estimate".)
-| Candidate | Date | Release URL |
-|-----------|------|-------------|
-| RC1 | Week of YYYY-MM-DD | |
-| Stable (non-RC) | Week of YYYY-MM-DD (estimate) | |
+| Candidate | Expected Release Date | Release URL |
+|-----------|-----------------------|-------------|
+| RC1 | {{.RC1DateString}} | |
+| Stable (non-RC) | {{.StableDateString}} | |
-## πͺ’ Dependencies for releases
+# πͺ’ Dependencies for releases
> [!NOTE]
-> 1. This is the set of changes that need to make it in for a given RC. This is effectively the set of changes to cherry-pick from master.
-> 2. They can be checked as done once they land in `master`.
+> 1. This is the set of changes that need to make it in for a given RC. This is effectively the set of changes to cherry-pick from master.
+> 2. They can be checked as done once they land in `master`.
> 3. They are presented here for quick reference, but backporting is tracked in each `Release Checklist`.
-[//]: # (Copy/paste this for each RC, and increment "X")
-### rcX
-- [ ] To Be Added
-
-### Stable (non-RC)
+
+
+
+## {{$rc}}
- [ ] To Be Added
-## β Release Checklist
+
+# β Release Checklist
-### Before RC1
-- [ ] (network upgrade) Make sure all [Lotus dependencies are updated to the correct versions for the network upgrade](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/Update_Dependencies_Lotus.md)
+## β¬ οΈ Before RC1
+
+- [ ] Make sure all [Lotus dependencies are updated to the correct versions for the network upgrade](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/Update_Dependencies_Lotus.md)
- Link to Lotus PR:
-- [ ] Open PR against [RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md) with title `docs(release): vX.Y.Z release template improvements` for improving future releases.
+
+- [ ] Open PR against [RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md) with title `docs(release): v{{.Tag}} release template improvements` for improving future releases.
- Link to PR:
- There likely aren't any changes at this point, but this can be opened with a small whitespace change so the PR is open and we can more easily hold the standard of making improvements incrementally since improvements are usually better done by collecting changes/notes along the way rather than just thinking about it at the end.
- This will get merged in a `Post Release` step.
-- [ ] (patch release) Fork a new branch (`release/vX.Y.Z` or `release/miner/vX.Y.Z`) from the last stable `release/vX.Y.x` or `release/miner/vX.Y.x` and make any further release-related changes to this branch.
-- [ ] (minor release) Fork a new branch (`release/vX.Y.Z` or `release/miner/vX.Y.Z`) from `master` and make any further release-related changes to this branch.
+
+
+- [ ] Fork a new `release/v{{.Tag}}` branch from the last stable `release/vX.Y.x` and make any further release-related changes to this branch.
+
+
+- [ ] Fork a new `release/miner/v{{.Tag}}` branch from the last stable `release/miner/vX.Y.x` and make any further release-related changes to this branch.
+
+
+
+
+- [ ] Fork a new `release/v{{.Tag}}` branch from `master` and make any further release-related changes to this branch.
+
+
+- [ ] Fork a new `release/miner/v{{.Tag}}` branch from `master` and make any further release-related changes to this branch.
+
+
+
- `master` branch Version string updates
- - Skip this set of steps if you are patching a previous minor release.
- - [ ] bump the version(s) in `build/version.go` to `vX.Y.(Z+1)-dev`.
- - Ensure to update the appropriate version string based on whether you are creating a node release (`NodeBuildVersion`), a miner release (`MinerBuildVersion`), or both.
+ - [ ] bump the version(s) in `build/version.go` to `v{{.NextTag}}-dev`.
+
+ - Ensure to update `NodeBuildVersion`
+
+
+ - Ensure to update `MinerBuildVersion`
+
- [ ] Run `make gen && make docsgen-cli` before committing changes.
- [ ] Update the CHANGELOG
- - [ ] Change the `UNRELEASED` section header to `UNRELEASED vX.Y.Z`
- - [ ] Set the `UNRELEASED vX.Y.Z` section's content to be "_See https://github.com/filecoin-project/lotus/blob/release/vX.Y.Z/CHANGELOG.md_"
+ - [ ] Change the `UNRELEASED` section header to `UNRELEASED v{{.Tag}}`
+ - [ ] Set the `UNRELEASED v{{.Tag}}` section's content to be "_See https://github.com/filecoin-project/lotus/blob/release/v{{.Tag}}/CHANGELOG.md_"
- [ ] Add a new `UNRELEASED` header to top.
- - [ ] Create a PR with title `build: update Lotus Node|Miner version to vX.Y.(Z+1)-dev in master`
- - Link to PR:
+ - [ ] Create a PR with title `build: update Lotus {{.Type}} version to v{{.NextTag}}-dev in master`
+ - Link to PR:
- [ ] Merge PR
+
-### RCs
+## ποΈ RCs
-[//]: # (Copy/paste this whole "rcX" section for each additional RC, and increment "X")
-#### rcX
+
+
+
+
+
+### {{$rc}}
> [!IMPORTANT]
-> These PRs should be done in and target the `release/vX.Y.Z` or `release/miner/vX.Y.Z` branch.
+> These PRs should be done in and target the `release/v{{$.Tag}}` or `release/miner/v{{$.Tag}}` branch.
-**Backport PR**
-
-[//]: # (For RC1 there likely isn't any backporting to do and thus no PR which reduces the steps.)
-[//]: # (We do need all these steps for RC2 onwards though.)
-[//]: # (If steps are removed for the RC1 checklist, they need to be preserved for future RCs/stable.)
-[//]: # (For RC1 we still need to make sure the tracked items land though.)
+#### Backport PR for {{$rc}}
- [ ] All explicitly tracked items from `Dependencies for releases` have landed
-- [ ] Backported [everything with the "backport" label](https://github.com/filecoin-project/lotus/issues?q=label%3Arelease%2Fbackport+)
+
+- [ ] Backported [everything with the "backport" label](https://github.com/filecoin-project/lotus/issues?q=label%3Arelease%2Fbackport+)
- [ ] Removed the "backport" label from all backported PRs (no ["backport" issues](https://github.com/filecoin-project/lotus/issues?q=label%3Arelease%2Fbackport+))
-- [ ] Create a PR with title `build: backport changes for node|miner vX.Y.Z-rcX`
- - Link to PR:
-- [ ] Merge PR
-
-**Release PR**
-
-- [ ] Update the version string(s) in `build/version.go` to one ending with '-rcX'.
- - Ensure to update the appropriate version string based on whether you are creating a node release (`NodeBuildVersion`), a miner release (`MinerBuildVersion`), or both.
+- [ ] Create a PR with title `build: backport changes for {{$.Type}} v{{$.Tag}}{{$tagSuffix}}`
+ - Link to PR:
+- [ ] Merge PR
+
+
+#### Release PR for {{$rc}}
+
+- [ ] Update the version string(s) in `build/version.go` to one {{if contains "rc" $rc}}ending with '-{{$rc}}'{{else}}**NOT* ending with 'rcX'{{end}}.
+
+ - Ensure to update `NodeBuildVersion`
+
+
+ - Ensure to update `MinerBuildVersion`
+
- [ ] Run `make gen && make docsgen-cli` to generate documentation
-- [ ] Create a draft PR with title `build: release Lotus node|miner vX.Y.Z-rcX`
- - Link to PR:
+- [ ] Create a draft PR with title `build: release Lotus {{$.Type}} v{{$.Tag}}{{$tagSuffix}}`
+ - Link to PR:
- Opening a PR will trigger a CI run that will build assets, create a draft GitHub release, and attach the assets.
- [ ] Changelog prep
- [ ] Go to the [releases page](https://github.com/filecoin-project/lotus/releases) and copy the auto-generated release notes into the CHANGELOG
- [ ] Perform editorial review (e.g., callout breaking changes, new features, FIPs, actor bundles)
+
+
- [ ] (network upgrade) Specify whether the Calibration or Mainnet upgrade epoch has been specified or not yet.
- Example where these weren't specified yet: [PR #12169](https://github.com/filecoin-project/lotus/pull/12169)
+
+ - [ ] (network upgrade) Ensure the Mainnet upgrade epoch is specified.
+
+
- [ ] Ensure no missing content when spot checking git history
- - Example command looking at git commits: `git log --oneline --graph vA.B.C..`, where A.B.C correspond to the previous release.
+ - Example command looking at git commits: `git log --oneline --graph vA.B.C..`, where A.B.C correspond to the previous release.
- Example GitHub UI search looking at merged PRs into master: https://github.com/filecoin-project/lotus/pulls?q=is%3Apr+base%3Amaster+merged%3A%3EYYYY-MM-DD
- Example `gh` cli command looking at merged PRs into master and sorted by title to group similar areas (where `YYYY-MM-DD` is the start search date): `gh pr list --repo filecoin-project/lotus --search "base:master merged:>YYYY-MM-DD" --json number,mergedAt,author,title | jq -r '.[] | [.number, .mergedAt, .author.login, .title] | @tsv' | sort -k4`
- [ ] Update the PR with the commit(s) made to the CHANGELOG
@@ -113,41 +143,25 @@
- Merging the PR will trigger a CI run that will build assets, attach the assets to the GitHub release, publish the GitHub release, and create the corresponding git tag.
- [ ] Update `π’ Estimated shipping date` table
- [ ] Comment on this issue announcing the RC
- - Link to issue comment:
+ - Link to issue comment:
-**Testing**
+#### Testing for {{$rc}}
> [!NOTE]
> Link to any special steps for testing releases beyond ensuring CI is green. Steps can be inlined here or tracked elsewhere.
-### Stable (non-RC) Release
+
-[//]: # (This "NOTE" below with the "diff" to apply to the "rcX copy/pasted content" is here to avoid the duplication in the template itself.)
-[//]: # (This is done as a visible NOTE rather than a comment to make sure it's clear what needs to be added to this section.)
-[//]: # (These comments ^^^ can be removed once the NOTE steps below are completed.)
-> [!NOTE]
-> 1οΈβ£ Copy/paste in the `rcX` section above to below this `[!Note]`
->
-> 2οΈβ£ make these changes:
-> 1. Release PR > Update the version string...
-> * Update the version string in `build/version.go` to one **NOT** ending with '-rcX'
-> 2. Release PR > Changelog prep...
-> * Add "(network upgrade) Ensure the Mainnet upgrade epoch is specified."
-> 3. Release PR > Create a draft PR...
-> * Create a PR with title `build: release Lotus node|miner vX.Y.Z`
->
-> 3οΈβ£ Remove this `[!Note]` and the related invisible comments.
-
-### Post-Release
-
-- [ ] Open a PR against `master` cherry-picking the CHANGELOG commits from the `release/vX.Y.Z` branch. Title it `chore(release): cherry-pick vX.Y.Z changelog back to master`
- - Link to PR:
- - Assuming we followed [the process of merging changes into `master` first before backporting to the release branch](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#branch-and-tag-strategy), the only changes should be CHANGELOG updates.
+## β‘ Post-Release
+
+- [ ] Open a PR against `master` cherry-picking the CHANGELOG commits from the `release/v{{.Tag}}` branch. Title it `chore(release): cherry-pick v{{.Tag}} changelog back to master`
+ - Link to PR:
+ - Assuming we followed [the process of merging changes into `master` first before backporting to the release branch](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#branch-and-tag-strategy), the only changes should be CHANGELOG updates.
- [ ] Finish updating/merging the [RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md) PR from `Before RC1` with any improvements determined from this latest release iteration.
-## β€οΈ Contributors
+# β€οΈ Contributors
See the final release notes!
-## βοΈ Do you have questions?
+# βοΈ Do you have questions?
Leave a comment in this ticket!
diff --git a/go.mod b/go.mod
index c25df224d20..d359feac57d 100644
--- a/go.mod
+++ b/go.mod
@@ -19,6 +19,8 @@ require (
github.com/GeertJohan/go.rice v1.0.3
github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee
github.com/Kubuxu/imtui v0.0.0-20210401140320-41663d68d0fa
+ github.com/Masterminds/semver/v3 v3.3.1
+ github.com/Masterminds/sprig/v3 v3.3.0
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921
github.com/cheggaaa/pb/v3 v3.1.5
@@ -70,6 +72,7 @@ require (
github.com/go-openapi/spec v0.19.11
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
+ github.com/google/go-github/v66 v66.0.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
@@ -167,8 +170,10 @@ require (
)
require (
+ dario.cat/mergo v1.0.1 // indirect
github.com/GeertJohan/go.incremental v1.0.0 // indirect
github.com/Jorropo/jsync v1.0.1 // indirect
+ github.com/Masterminds/goutils v1.1.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
@@ -218,10 +223,12 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
+ github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
+ github.com/huandu/xstrings v1.5.0 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/iancoleman/orderedmap v0.1.0 // indirect
github.com/ipfs/go-blockservice v0.5.2 // indirect
@@ -269,6 +276,8 @@ require (
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
+ github.com/mitchellh/copystructure v1.2.0 // indirect
+ github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
@@ -311,7 +320,9 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v2.18.12+incompatible // indirect
+ github.com/shopspring/decimal v1.4.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
+ github.com/spf13/cast v1.7.0 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.0.1 // indirect
diff --git a/go.sum b/go.sum
index 804e730c9e9..d0be376ab39 100644
--- a/go.sum
+++ b/go.sum
@@ -34,6 +34,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg=
contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ=
+dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
+dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
@@ -62,7 +64,13 @@ github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETF
github.com/Kubuxu/imtui v0.0.0-20210401140320-41663d68d0fa h1:1PPxEyGdIGVkX/kqMvLJ95a1dGS1Sz7tpNEgehEYYt0=
github.com/Kubuxu/imtui v0.0.0-20210401140320-41663d68d0fa/go.mod h1:WUmMvh9wMtqj1Xhf1hf3kp9RvL+y6odtdYxpyZjb90U=
github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic=
+github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
+github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
+github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
+github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
+github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
+github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -474,7 +482,11 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
+github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M=
+github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
+github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
+github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
@@ -541,6 +553,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
+github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc=
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
@@ -937,9 +951,13 @@ github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
+github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
+github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
+github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
@@ -1174,6 +1192,8 @@ github.com/sercand/kuberesolver/v4 v4.0.0/go.mod h1:F4RGyuRmMAjeXHKL+w4P7AwUnPce
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shirou/gopsutil v2.18.12+incompatible h1:1eaJvGomDnH74/5cF4CTmTbLHAriGFsTZppLXDX93OM=
github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
+github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=
@@ -1223,6 +1243,8 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
+github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=