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

Automatically manage pre-release branches #18

Merged
merged 8 commits into from
Jan 9, 2025

Conversation

petrutlucian94
Copy link
Contributor

A k8s-snap PR automatically creates and cleans up git branches for upstream k8s pre-releases:
canonical/k8s-snap#916

Here we're adding an almost identical job that picks up these git branches and prepares launchpad recipes.

TODOs:

  • clean up obsolete pre-releases that were superseeded by a new pre-release or stable release
  • promote beta and rc pre-releases to the corresponding snap risk level

@petrutlucian94 petrutlucian94 requested a review from a team as a code owner December 19, 2024 06:58
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch 10 times, most recently from 397710f to 6b98e4d Compare December 19, 2024 07:57
@petrutlucian94 petrutlucian94 marked this pull request as draft December 19, 2024 07:59
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch 2 times, most recently from 2874132 to 9ee419a Compare December 19, 2024 08:09
A k8s-snap PR automatically creates and cleans up git branches
for upstream k8s pre-releases:
canonical/k8s-snap#916

Here we're adding an almost identical job that picks up these
git branches and prepares launchpad recipes.

TODOs:
* clean up obsolete pre-releases that were superseeded by a new
  pre-release or stable release
* promote beta and rc pre-releases to the corresponding snap
  risk level
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch from 9ee419a to 43c945c Compare December 19, 2024 12:54
We intend to publish snaps for pre-release branches, which have
the following format: auotupdate/v1.33.0-alpha.1.

In order to do so, we need to update the "TIP_BRANCH" regex, which
is used to filter branches.

We'll need to clarify what "TIP_BRANCH" means and add an inline
comment.
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch 2 times, most recently from 9bcc19e to e2ac086 Compare December 19, 2024 13:18
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch from e2ac086 to ee96d92 Compare December 19, 2024 13:21
@petrutlucian94 petrutlucian94 marked this pull request as ready for review December 19, 2024 13:57
Copy link
Collaborator

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

Great work @petrutlucian94

Looks great already, only some small changes.

scripts/ensure_snap_builds.py Outdated Show resolved Hide resolved
scripts/k8s_releases.py Outdated Show resolved Hide resolved
scripts/k8s_releases.py Outdated Show resolved Hide resolved
* use argparse
* reneame k8s_releases.py -> k8s_release.py
* move cleanup placeholder
bschimke95
bschimke95 previously approved these changes Jan 8, 2025
Copy link
Collaborator

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM

We'll use a single branch for all pre-releases of a given risk level,
e.g. v1.33.0-alpha.0 -> autoupdate/v1.33.0-alpha.

This commit also removes unused k8s_release.py functions that were
inherited from the k8s-snap script.
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/auto-pre-release branch from e08351d to f4ef36f Compare January 8, 2025 13:33
@petrutlucian94
Copy link
Contributor Author

@bschimke95 The promotion CI failures are unrelated, should we merge this PR to get it out the way?

@bschimke95
Copy link
Collaborator

let's do this.

@bschimke95 bschimke95 merged commit f41f8e7 into main Jan 9, 2025
74 of 84 checks passed
@bschimke95 bschimke95 deleted the lpetrut/auto-pre-release branch January 9, 2025 15:21
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.

2 participants