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

[FEA]: Automate release process #653

Open
11 of 13 tasks
jrhemstad opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1945
Open
11 of 13 tasks

[FEA]: Automate release process #653

jrhemstad opened this issue Nov 2, 2023 · 1 comment · May be fixed by #1945
Assignees
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.

Comments

@jrhemstad
Copy link
Collaborator

jrhemstad commented Nov 2, 2023

Is this a duplicate?

Area

Infrastructure

Is your feature request related to a problem? Please describe.

As a maintainer of CCCL, I'd like to have an automated release process in line with the GitLab flow model, ensuring consistent and error-free releases.

Goals:

  1. Automate the creation of release branches, branch/X.Y.x, from main.
  2. Update the version in code via scripts and create a pull request with these changes against main.
  3. Tag the repository with an initial RC tag, vX.Y.0-rc0, once the pull request is merged into main and backported to the release branch.
  4. Automatically generate incremental RC tags, vX.Y.0-rc1, on the release branch upon merging backported changes.
  5. Create final release tags, vX.Y.0, and draft GitHub releases upon manual approval.

Describe the solution you'd like

Proposed Actions:

  1. Start Release Action (Manual Trigger)

    • Inputs:
      • new_version: SemVer string (e.g., 2.3.0 for the release 2.3.0).
    • Behavior:
      • Creates a new release branch named branch/X.Y.x.
      • Runs a script to update version numbers in the codebase.
      • Opens a PR against main with the version changes.
  2. Update RC Action (Automatic Trigger)

    • Triggers:
      • On merge commits to branch/*.
    • Behavior:
      • If an RC tag does not exist, it implies this is the first backport to the release branch for the current version, and the vX.Y.0-rc0 tag is created.
      • Checks if a final tag for the current version exists.
      • If so, identifies the latest patch version tag and creates a new RC tag for the next patch version.
      • If not, increments the RC number and creates a new tag.
  3. Finalize Release Action (Manual Trigger)

    • Inputs:
      • release_version: SemVer string of the final release version.
      • branch_name: The release branch name (e.g., branch/X.Y.x).
    • Behavior:
      • Creates a new tag vX.Y.Z.
      • Creates a draft GitHub release associated with the tag.
      • Creates and uploads release artifacts of cmake install as per [FEA]: SHA Stable release URLs #622

Edge Cases & Additional Considerations:

  • The action scripts must handle the scenario where a release is finalized, and subsequent commits are made to the release branch, which should start a new patch version.
  • The initial RC tag for a new minor/major version must be created correctly when there are no prior RC tags for the version.

Example: Starting a New Minor Release

Current Scenario:

  • main branch is at version 2.2.0.
  • We plan to start a new minor release 2.3.0.

Automated Steps:

  1. A maintainer triggers the "Start Release Action" with new_version input as 2.3.0.
  2. The action creates a new branch branch/2.3.x from main.
  3. The update_version.sh script is run on a new branch update-version-2.3.0, changing the version to 2.3.0 in the codebase.
  4. A PR is created to merge update-version-2.3.0 into main with a backport branch/2.3.x label.
  5. Upon merge, our backport automation picks up the changes and creates a backport PR against branch/2.3.x.
  6. Once the backport PR is merged into branch/2.3.x, the "Update RC Action" is triggered, and it tags the commit with v2.3.0-rc0.

If additional fixes are needed in 2.3.0:

  1. Additional fixes are merged into main and tagged with the backport branch/2.3.x label.
  2. For each subsequent merge that is backported to branch/2.3.x, the "Update RC Action" is triggered.
  3. This action will:
    • Check the most recent RC tag on branch/2.3.x.
    • Increment the RC number based on the most recent tag (e.g., if v2.3.0-rc1 exists, it will create v2.3.0-rc2).
    • Tag the new commit in branch/2.3.x with the new RC tag (e.g., v2.3.0-rc2).

Finalizing the Release:

  1. Once the release is ready to be finalized (all RCs are stable, and no further changes are required for the release):
    • A maintainer triggers the "Finalize Release Action" with the release_version input as 2.3.0.
    • The action checks out branch/2.3.x.
    • It tags the latest commit in the release branch with the final release version tag (e.g., v2.3.0).
    • The action then creates a draft GitHub release tied to the v2.3.0 tag, with the pre-filled release notes for the maintainer to review.
    • The draft release can then be published manually by the maintainer after final review and approval.

Example: Creating a Hotfix Release Candidate

Current Scenario:

  • The latest release v2.3.0 is out.
  • A critical bug is identified that needs a hotfix.

Automated Steps:

  1. The bug is fixed in a new branch branched off main and the PR is merged into main.
  2. A backport branch/2.3.x label is added to the PR.
  3. The backport automation creates a new backport PR to merge these changes into branch/2.3.x.
  4. After the backport PR is merged into branch/2.3.x, the "Update RC Action" automatically identifies that v2.3.0 is the latest non-RC tag.
  5. The action increments the patch version and creates a new RC tag v2.3.1-rc0.

Tasks

@jrhemstad jrhemstad added the feature request New feature or request. label Nov 2, 2023
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 2, 2023
@alliepiper alliepiper self-assigned this May 28, 2024
@alliepiper
Copy link
Collaborator

@jrhemstad I'm going to start looking at this this week.

About RC's, we could tag a new RC for each merge, but I'm not sure what this does for us. Seems like each RC will basically map to a SHA on the branch, and the RCs will have lost meaning.

Alternatively, we could manually invoke the Update RC workflow intentionally when we have a need for an RC (eg. the we have collected all of the planned backports and consider a particular SHA on the release branch to be ready-for-release. We could additionally make the tagging process dependent on a thorough set of test/benchmark results that validate the code before exposing the tag to users that may want to test the code before the full release.

alliepiper added a commit to alliepiper/cccl that referenced this issue Jul 5, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh`.
    - Commits version bump to release branch.
    - Creates pull request to merge the release branch into `main`.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `ref`: Optional; The ref to tag as the release candidate.
      If not provided, the current HEAD of the release branch is used.
  - Actions:
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
@alliepiper alliepiper linked a pull request Jul 5, 2024 that will close this issue
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Jul 5, 2024
alliepiper added a commit to alliepiper/cccl that referenced this issue Jul 5, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh`.
    - Commits version bump to release branch.
    - Creates pull request to merge the release branch into `main`.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `ref`: Optional; The ref to tag as the release candidate.
      If not provided, the current HEAD of the release branch is used.
  - Actions:
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
alliepiper added a commit to alliepiper/cccl that referenced this issue Jul 5, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh`.
    - Commits version bump to release branch.
    - Creates pull request to merge the release branch into `main`.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `ref`: Optional; The ref to tag as the release candidate.
      If not provided, the current HEAD of the release branch is used.
  - Actions:
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
alliepiper added a commit to alliepiper/cccl that referenced this issue Jul 5, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh`.
    - Commits version bump to release branch.
    - Creates pull request to merge the release branch into `main`.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Uses the HEAD SHA of the release branch for testing/tagging.
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Review to In Progress in CCCL Jul 6, 2024
alliepiper added a commit to alliepiper/cccl that referenced this issue Jul 6, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh` in topic branch.
    - Creates pull request to merge the topic branch into `main`
    - Marks the pull request for backporting to the release branch.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Uses the HEAD SHA of the release branch for testing/tagging.
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Jul 8, 2024
@wmaxey wmaxey closed this as completed in 43eb66a Oct 16, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Oct 16, 2024
@jrhemstad jrhemstad reopened this Oct 17, 2024
@github-project-automation github-project-automation bot moved this from Done to Needs Triage in CCCL Oct 17, 2024
pciolkosz pushed a commit to pciolkosz/cccl that referenced this issue Oct 25, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh` in topic branch.
    - Creates pull request to merge the topic branch into `main`
    - Marks the pull request for backporting to the release branch.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Uses the HEAD SHA of the release branch for testing/tagging.
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
@jrhemstad jrhemstad assigned wmaxey and unassigned alliepiper Oct 30, 2024
@jrhemstad jrhemstad moved this from Needs Triage to In Progress in CCCL Oct 30, 2024
fbusato pushed a commit to fbusato/cccl that referenced this issue Nov 5, 2024
Fixes NVIDIA#653.

Adds three new workflows that can be manually triggered at various points
in the release process:

- `release-create-new`: Begin the release process for a new version.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
    - `branch_point`: Optional; If the `branch/{major}.{minor}.x` branch
      does not exist, create it from this SHA.
      If the release branch already exists, this is ignored.
      If not provided, the release branch is created from the current
      `main` branch.
  - Actions:
    - Creates release branch if needed.
    - Bumps version numbers with `update-version.sh` in topic branch.
    - Creates pull request to merge the topic branch into `main`
    - Marks the pull request for backporting to the release branch.
- `release-update-rc`: Validate and tag a new release candidate.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Uses the HEAD SHA of the release branch for testing/tagging.
    - Determines the next rc for this version by inspecting existing tags.
    - Runs the `pull_request` workflow to validate the release candidate.
      This can be modified in the future to run a special rc acceptance
      workflow.
    - Tags the release candidate if the workflow passes.
- `release-finalize`: Tag a final release.
  - Inputs:
    - `new_version`: The new version, eg. "2.3.1"
  - Actions:
    - Determines the most recent release candidate.
    - Tags the latest release candidate as the final release.

[skip-matrix][skip-rapids][skip-vdc][skip-docs]
@wmaxey wmaxey added the 2.8.0 target for 2.8.0 release label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants