Skip to content

Automate edge releases #12175

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 3 commits into from
Mar 1, 2024
Merged

Automate edge releases #12175

merged 3 commits into from
Mar 1, 2024

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Feb 28, 2024

Followup to #12132

Now one only needs to tag in order to trigger the release. Please see the updated RELEASE.md file for the new instructions.

The last action in the release workflow, helm-publish, now runs:

  • bin/helm-bump-edge: This has been modified to calculate the new edge version by inspecting https://run.linkerd.io/install-edge and bumping the version found there, using a new scheme YYYY.M.N (also droppping the -edge suffix) shared across all the charts (except for partials, patch and linkerd-multicluster-link which remain static). The version entry in the Chart.yaml files no longer needs to be manually updated, and its value is not used for the new version computation, so it was changed to 0.0.0-undefined. Also note this script validates that the current git tag matches the expected new version.
  • bin/helm-docs: Called just to update the charts READMEs with the new version. We also still call it in the helm.yml workflow to check the values.yaml entries are in sync. So after any change to those values, we still need to manually run bin/helm-docs.
  • bin/helm-build package: As the previous two steps mutate the local checked out source, this no longer validates that there are no uncommited changes.

@alpeb alpeb requested a review from a team as a code owner February 28, 2024 16:01
@alpeb alpeb force-pushed the alpeb/edge-version-scheme branch from 6f1ef8e to b340f11 Compare February 28, 2024 16:03
Followup to #12132

Now one only needs to tag in order to trigger the release. Please see the updated `RELEASE.md` file for the new instructions.

The last action in the release workflow, `helm-publish`, now runs:

- `bin/helm-bump-edge`: This has been modified to calculate the new edge version by inspecting https://run.linkerd.io/install-edge and bumping the version found there, using a new scheme `YYYY.M.N` (also droppping the `-edge` suffix) shared across all the charts (except for `partials`, `patch` and `linkerd-multicluster-link` which remain static). The `version` entry in the Chart.yaml files no longer needs to be manually updated, and its value is not used for the new version computation, so it was changed to `0.0.0-undefined`. Also note this script validates that the current git tag matches the expected new version.
- `bin/helm-docs`: Called just to update the charts READMEs with the new version. We also still call it in the `helm.yml` workflow to check the values.yaml entries are in sync. So after any change to those values, we still need to manually run `bin/helm-docs`.
- `bin/helm-build package`: As the previous two steps mutate the local checked out source, this no longer validates that there are no uncommited changes.
@alpeb alpeb force-pushed the alpeb/edge-version-scheme branch from b340f11 to e5d3000 Compare February 28, 2024 16:43
gsutil cp gs://helm.linkerd.io/${{ inputs.branch }}/index.yaml target/helm/index-pre.yaml
gsutil cp gs://helm.linkerd.io/edge/index.yaml target/helm/index-pre.yaml
bin/helm-bump-edge
bin/helm-docs
Copy link
Member

Choose a reason for hiding this comment

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

Since we now bundle this into the release process, are we able to remove the README.md files and helm-docs checks that run regularly? Or what's the value in preserving the generated files in the repo?

Copy link
Member Author

Choose a reason for hiding this comment

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

We just get those files nicely rendered by github when browsing the repo. But they're also at artifacthub, so I'm not profoundly attached to them 🤷‍♂️

edge_tag_regex="edge-([0-9][0-9])\.([0-9]|[0-9][0-9])\.([0-9]+)"

# Get the current edge version.
url=https://run.linkerd.io/install-edge
Copy link
Member

Choose a reason for hiding this comment

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

Given that the edge- tag already specifies the edge version, do we need to recompute the new version independently? How do we ensure that the computed value and the actual tag don't differ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not necessary to recompute the version but this avoids making mistakes. A few lines below it's ensured the tag and the computed version match.

Co-authored-by: Oliver Gould <[email protected]>
Copy link
Member

@mateiidavid mateiidavid left a comment

Choose a reason for hiding this comment

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

🚢

@alpeb alpeb merged commit c2eb296 into main Mar 1, 2024
@alpeb alpeb deleted the alpeb/edge-version-scheme branch March 1, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants