Skip to content

Simplify k0s Release Process Using Git Patches #2172

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sgalsaleh
Copy link
Member

@sgalsaleh sgalsaleh commented May 18, 2025

What this PR does / why we need it:

This PR proposes replacing long-lived version branches (e.g., k0s-1-28, k0s-1-29) with a Git patch-based workflow. Instead of maintaining separate branches per minor version, we’ll keep all development on main and apply version-specific patches at build time via CI.

Benefits

  • Eliminates ongoing branch maintenance and merge conflicts
  • Centralizes logic while preserving version-specific behavior
  • Simplifies CI and improves auditability of changes
  • Reduces cognitive load and duplication

How It Works

  • Version-specific patches live under patches/k0s-<version>/
  • CI checks out main, applies the relevant patches, and builds/releases from there
  • Patch creation is straightforward via git diff from a branch. For example: git diff > 001-k0s-metadata.patch

Impact

  • Drops the need for long-lived branches
  • Requires one-time extraction of existing diffs into patches
  • Adds patch application logic to CI, but reduces overall maintenance overhead

This approach keeps the build deterministic and isolated per version, with minimal changes to runtime behavior or release artifacts.

Which issue(s) this PR fixes:

SC-123682

Does this PR require a test?

Yes

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

Copy link

github-actions bot commented May 18, 2025

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-706f0f1" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-706f0f1?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@sgalsaleh sgalsaleh changed the title Use k0s git patches system Simplify k0s Release Process Using Git Patches May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant