Skip to content

Release process enhancement #1185

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

Merged
merged 53 commits into from
Mar 26, 2025
Merged

Release process enhancement #1185

merged 53 commits into from
Mar 26, 2025

Conversation

didierofrivia
Copy link
Member

@didierofrivia didierofrivia commented Mar 5, 2025

Closes #1122

This PR introduces a new process for releasing the Kuadrant operator. It replaces the poorly documented manual way and the error prone automated workflow, by a new automated workflow and a well documented manual one. Both of the processes work around a new manifest named release.yaml, which is the source of truth for our kustomize configs, bundles and helm charts.

release.yaml file format.

This example of the release.yaml file uses tag v1.0.1 as reference.

# FILE: ./release.yaml
kuadrant-operator:
  version: "1.0.1"
olm:
  default-channel: "stable"
  channels:
    - "stable"
dependencies:
  authorino-operator: "0.16.0"
  console-plugin: "0.0.14"
  dns-operator: "0.12.0"
  limitador-operator: "0.12.1"
  wasm-shim: "0.8.1"

The kuadrant-operator section relates to the release version of the kuadrant operator.
While the olm section relates to fields required for building the olm catalogs.
And the dependencies section relates to the released versions of the subcomponents that will be included in a release.
There are validation steps during the make prepare-release that require the dependencies to be release before generating the release of the Kuadrant operator.

How to release Kuadrant Operator

To release a version “vX.Y.Z” of Kuadrant Operator in GitHub and Quay.io, there are two options, a manual and an automated process.
For both processes, first make sure every Kuadrant Operator dependency has been already released.

Automated Workflow

  1. Run the GHA Automated Release
    filling the following fields:
    • gitRef: Select the branch/tag/commit where you want to cut a release from.
    • kuadrantOperatorVersion: the Semantic Version of the desired release.
    • authorinoOperatorVersion: Authorino Operator bundle version (X.Y.Z)
    • limitadorOperatorVersion: Limitador Operator bundle version (X.Y.Z)
    • dnsOperatorVersion: DNS Operator bundle version (X.Y.Z)
    • wasmShimVersion: WASM Shim version (X.Y.Z)
    • consolePluginVersion: ConsolePlugin version (X.Y.Z)
    • olmChannel: This will set the OLM channels and default-channel annotations
  2. The workflow will create a Pull Request that should be peer-reviewed and approved by a member of the Kuadrant team, focusing on the changes made in Kustomize config, OLM bundles and Helm Charts.
  3. Once the PR is merged, a release workflow will be triggered tagging and publishing the Github release
    it will also build the images and packages and publish them on Quay, Helm repository.

Notes

  • It's not possible to cherry-pick commits, the workflow will pick a branch/tag/commit and all the history behind to the PR, any modifications should be done in the created PR.

Manual Workflow

Local steps

  1. Create the release-vX.Y branch, if the branch does not already exist.
  2. Push the release-vX.Y to the remote (kuadrant/kuadrant-operator)
  3. Create the release-vX.Y.Z-rc(n) branch with release-vX.Y as the base.
  4. Cherry-pick commits to the kudrant-vX.Y.Z-rc(n) from the relevant sources, i.e. main.
  5. Update the applicable version in the release.yaml.
  6. Run make prepare-release on the release-vX.Y.Z-rc(n). If you run into rate limit errors, set the env GITHUB_TOKEN with your PAT.

Remote steps

  1. Open a PR against the release-vX.Y branch with the changes from release-vX.Y.Z-rc(n) branch.
  2. PR verification checks will run.
  3. Get manual review of PR with focus on changes in these areas:
    • ./bundle.Dockerfile
    • ./bundle
    • ./config
    • ./charts/
  4. Merge PR
  5. Run the Release Workflow on the release-vX.Y. This does the following:
    • Creates the GitHub release
    • Creates tags
  6. Verify that the build release tag workflow is triggered and completes for the new tag.

TODO

Boomatang and others added 14 commits March 3, 2025 15:56
Adjust the release document to suit the new release process.

Signed-off-by: Jim Fitzpatrick <[email protected]>
From talks and calls, the release process has being moved to a more local
process, less automated to allow for manual checks of the data before
releasing.

Signed-off-by: Jim Fitzpatrick <[email protected]>
- fix naming issue
- refine process steps

Signed-off-by: Jim Fitzpatrick <[email protected]>
The release script has being design to use a toml file for the version
and is to be run locally.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Remove the reference to bundles from the format. It is suspected that
the released version of the operator will never be different from the
bundles. There is also an overlap with helm which does not have the
concept of bundles.

Signed-off-by: Jim Fitzpatrick <[email protected]>
The release workflow has being modified to only be triggered when a
pull request is merged to branches that match `release-vX.Y`.

The workflow will only make the GitHub release objects.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Set up a make target for verifying that the prepare-release target was
ran, and there is no uncommitted changes.

There has also being a workflow set up to run this check when a Pull
Request is made against the release branches.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Slight change to the form that is being used.

Signed-off-by: Jim Fitzpatrick <[email protected]>
[ci] Setting OLM channel depending on prerelease input

[ci] Fixing yq cmd updating release.yaml

[ci] Fixing branching, prepare release scripts and dependencies

[ci] Creating CR release branch on `Create Pull Request` step

* Running Create Pull Request only if not triggered by ACT

* In order to set the desired channel and default channel
* Changed consolePlugin default to `0.0.0`
* Also descriptions of inputs to semver

[ci] Updated sed command to also work with `+build` tags

Signed-off-by: dd di cesare <[email protected]>
Signed-off-by: dd di cesare <[email protected]>
Refactor workflows to only use the verify-prepare-release target.
This removed one of the workflows which was no longer required.

Signed-off-by: Jim Fitzpatrick <[email protected]>
In the release.yaml 0.0.0 can now be used to mark a version should be
the latest version.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.46%. Comparing base (2ae754e) to head (1e6ee22).
Report is 68 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1185      +/-   ##
==========================================
- Coverage   83.38%   77.46%   -5.93%     
==========================================
  Files          82       82              
  Lines        7120     7388     +268     
==========================================
- Hits         5937     5723     -214     
- Misses        949     1477     +528     
+ Partials      234      188      -46     
Flag Coverage Δ
bare-k8s-integration 28.77% <ø> (+5.35%) ⬆️
controllers-integration 77.08% <ø> (+2.80%) ⬆️
envoygateway-integration 43.98% <ø> (+2.34%) ⬆️
gatewayapi-integration 22.84% <ø> (+2.79%) ⬆️
istio-integration 47.16% <ø> (+3.14%) ⬆️
unit 18.37% <ø> (-0.72%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) 90.78% <ø> (ø)
api/v1beta2 (u) ∅ <ø> (∅)
pkg/common (u) ∅ <ø> (∅)
pkg/istio (u) ∅ <ø> (∅)
pkg/log (u) ∅ <ø> (∅)
pkg/reconcilers (u) ∅ <ø> (∅)
pkg/rlptools (u) ∅ <ø> (∅)
controllers (i) ∅ <ø> (∅)

see 148 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@didierofrivia didierofrivia moved this to In Progress in Kuadrant Mar 13, 2025
The workflow steps has no field needs

Signed-off-by: Jim Fitzpatrick <[email protected]>
Set the commitish-target to the prerlease branch. The branch will be the
in the following format: "release-vMAJOR.MINO"

Signed-off-by: Jim Fitzpatrick <[email protected]>
eguzki and others added 6 commits March 20, 2025 15:57
prepare-release: make default-channel optional
workflows/build-images-for-tag-release.yaml: fix operator image build
The softprops/action-gh-release does not correctly pick up the tag for
comparing when creating the release notes. Here the GitHub api is
directly used to generate the release notes. softporps/action-gh-release
is still used to create the actual release.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Some refactor of the scripts.
- Move the default release body header from load_github_envvar.sh
- Link future todo issue
- Fix some spelling mistakes

Signed-off-by: Jim Fitzpatrick <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Signed-off-by: dd di cesare <[email protected]>
@didierofrivia didierofrivia force-pushed the release-process-enhancement branch from 33065b4 to 8efafb9 Compare March 24, 2025 14:59
eguzki
eguzki previously approved these changes Mar 26, 2025
Boomatang
Boomatang previously approved these changes Mar 26, 2025
Copy link
Contributor

@Boomatang Boomatang left a comment

Choose a reason for hiding this comment

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

Looking good to me

@didierofrivia didierofrivia enabled auto-merge March 26, 2025 10:09
@didierofrivia didierofrivia dismissed stale reviews from Boomatang and eguzki via f236e1e March 26, 2025 10:58
@didierofrivia didierofrivia added this pull request to the merge queue Mar 26, 2025
Merged via the queue into main with commit 93042c1 Mar 26, 2025
41 of 42 checks passed
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Kuadrant Mar 26, 2025
@didierofrivia didierofrivia deleted the release-process-enhancement branch March 26, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Release Process Improvements
6 participants