From b5df580e4fb69b1f242b96e37d570500d140d672 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Thu, 9 Jan 2025 16:12:17 +0100 Subject: [PATCH 1/5] release 24.11.1 Signed-off-by: Andrew Kenworthy --- CHANGELOG.md | 2 ++ Cargo.lock | 4 ++-- Cargo.nix | 4 ++-- Cargo.toml | 2 +- deploy/helm/airflow-operator/Chart.yaml | 4 ++-- .../getting_started/code/getting_started.sh | 16 ++++++++-------- .../getting_started/code/install_output.txt | 8 ++++---- docs/templating_vars.yaml | 8 ++++---- tests/release.yaml | 10 +++++----- 9 files changed, 30 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0a2635a..e2d3b41e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +## [24.11.1] - 2025-01-09 + ## [24.11.1-rc2] - 2024-12-12 ## [24.11.1-rc1] - 2024-12-05 diff --git a/Cargo.lock b/Cargo.lock index a12b94ae..e0c2ab4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2172,7 +2172,7 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "stackable-airflow-crd" -version = "24.11.1-rc2" +version = "24.11.1" dependencies = [ "indoc", "product-config", @@ -2189,7 +2189,7 @@ dependencies = [ [[package]] name = "stackable-airflow-operator" -version = "24.11.1-rc2" +version = "24.11.1" dependencies = [ "anyhow", "built", diff --git a/Cargo.nix b/Cargo.nix index 731ef513..802fccbd 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -6677,7 +6677,7 @@ rec { }; "stackable-airflow-crd" = rec { crateName = "stackable-airflow-crd"; - version = "24.11.1-rc2"; + version = "24.11.1"; edition = "2021"; src = lib.cleanSourceWith { filter = sourceFilter; src = ./rust/crd; }; libName = "stackable_airflow_crd"; @@ -6739,7 +6739,7 @@ rec { }; "stackable-airflow-operator" = rec { crateName = "stackable-airflow-operator"; - version = "24.11.1-rc2"; + version = "24.11.1"; edition = "2021"; crateBin = [ { diff --git a/Cargo.toml b/Cargo.toml index 3bfb7a3d..b1f7f738 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["rust/crd", "rust/operator-binary"] resolver = "2" [workspace.package] -version = "24.11.1-rc2" +version = "24.11.1" authors = ["Stackable GmbH "] license = "OSL-3.0" edition = "2021" diff --git a/deploy/helm/airflow-operator/Chart.yaml b/deploy/helm/airflow-operator/Chart.yaml index 94cc6c35..127d4634 100644 --- a/deploy/helm/airflow-operator/Chart.yaml +++ b/deploy/helm/airflow-operator/Chart.yaml @@ -1,8 +1,8 @@ --- apiVersion: v2 name: airflow-operator -version: "24.11.1-rc2" -appVersion: "24.11.1-rc2" +version: "24.11.1" +appVersion: "24.11.1" description: The Stackable Operator for Apache Airflow home: https://github.com/stackabletech/airflow-operator maintainers: diff --git a/docs/modules/airflow/examples/getting_started/code/getting_started.sh b/docs/modules/airflow/examples/getting_started/code/getting_started.sh index 5df404bb..d6cc716c 100755 --- a/docs/modules/airflow/examples/getting_started/code/getting_started.sh +++ b/docs/modules/airflow/examples/getting_started/code/getting_started.sh @@ -44,20 +44,20 @@ echo "Updating Helm repo" helm repo update echo "Installing Operators with Helm" # tag::helm-install-operators[] -helm install --wait commons-operator stackable-stable/commons-operator --version 24.11.1-rc2 -helm install --wait secret-operator stackable-stable/secret-operator --version 24.11.1-rc2 -helm install --wait listener-operator stackable-stable/listener-operator --version 24.11.1-rc2 -helm install --wait airflow-operator stackable-stable/airflow-operator --version 24.11.1-rc2 +helm install --wait commons-operator stackable-stable/commons-operator --version 24.11.1 +helm install --wait secret-operator stackable-stable/secret-operator --version 24.11.1 +helm install --wait listener-operator stackable-stable/listener-operator --version 24.11.1 +helm install --wait airflow-operator stackable-stable/airflow-operator --version 24.11.1 # end::helm-install-operators[] ;; "stackablectl") echo "installing Operators with stackablectl" # tag::stackablectl-install-operators[] stackablectl operator install \ - commons=24.11.1-rc2 \ - secret=24.11.1-rc2 \ - listener=24.11.1-rc2 \ - airflow=24.11.1-rc2 + commons=24.11.1 \ + secret=24.11.1 \ + listener=24.11.1 \ + airflow=24.11.1 # end::stackablectl-install-operators[] ;; *) diff --git a/docs/modules/airflow/examples/getting_started/code/install_output.txt b/docs/modules/airflow/examples/getting_started/code/install_output.txt index 1187d3da..70f01b6f 100644 --- a/docs/modules/airflow/examples/getting_started/code/install_output.txt +++ b/docs/modules/airflow/examples/getting_started/code/install_output.txt @@ -1,4 +1,4 @@ -Installed commons=24.11.1-rc2 operator -Installed secret=24.11.1-rc2 operator -Installed listener=24.11.1-rc2 operator -Installed airflow=24.11.1-rc2 operator +Installed commons=24.11.1 operator +Installed secret=24.11.1 operator +Installed listener=24.11.1 operator +Installed airflow=24.11.1 operator diff --git a/docs/templating_vars.yaml b/docs/templating_vars.yaml index ea3c4543..0c973875 100644 --- a/docs/templating_vars.yaml +++ b/docs/templating_vars.yaml @@ -3,9 +3,9 @@ helm: repo_name: stackable-stable repo_url: https://repo.stackable.tech/repository/helm-stable/ versions: - commons: 24.11.1-rc2 - secret: 24.11.1-rc2 - listener: 24.11.1-rc2 - airflow: 24.11.1-rc2 + commons: 24.11.1 + secret: 24.11.1 + listener: 24.11.1 + airflow: 24.11.1 postgresql: 12.1.5 redis: 17.3.7 diff --git a/tests/release.yaml b/tests/release.yaml index 989cacd5..cf4e8781 100644 --- a/tests/release.yaml +++ b/tests/release.yaml @@ -7,12 +7,12 @@ releases: description: Integration test products: commons: - operatorVersion: 24.11.1-rc2 + operatorVersion: 24.11.1 secret: - operatorVersion: 24.11.1-rc2 + operatorVersion: 24.11.1 listener: - operatorVersion: 24.11.1-rc2 + operatorVersion: 24.11.1 airflow: - operatorVersion: 24.11.1-rc2 + operatorVersion: 24.11.1 spark-k8s: - operatorVersion: 24.11.1-rc2 + operatorVersion: 24.11.1 From 3456f26341db155ff6e460d706cfb20a022a390f Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jan 2025 09:44:45 +0100 Subject: [PATCH 2/5] use helm package --version rather than cargo set-version --- .github/workflows/build.yml | 38 ++++++++++++++++++++++--------------- Makefile | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b4abe75..8c1ce870 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -345,19 +345,6 @@ jobs: with: crate: cargo-edit bin: cargo-set-version - - name: Update version if PR against main branch - if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} - run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} - - name: Update version if PR against non-main branch - # For PRs to be merged against a release branch, use the version that has already been set in the calling script. - if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') - PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}" - cargo set-version --offline --workspace "$PR_VERSION" - # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the # default value in the makefile if called from this action, but not otherwise (i.e. when called locally). # This is needed for the HELM_REPO variable. @@ -365,7 +352,7 @@ jobs: uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 - name: Install syft uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2 - - name: Build Docker image and Helm chart + - name: Build prerequisites run: | # Installing helm and yq on ubicloud-standard-8-arm only if [ "$(arch)" = "aarch64" ]; then @@ -375,8 +362,29 @@ jobs: sudo apt-get -y install helm sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq fi + - name: Build Docker image and Helm chart - main-PR + if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + PR_VERSION="0.0.0-pr${PR_NUMBER}" + + make -e build PR_VERSION="$PR_VERSION" + - name: Build Docker image and Helm chart - non-main-PR + if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') + PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}" + + make -e build PR_VERSION="$PR_VERSION" + - name: Build Docker image and Helm chart - non-PR + if: ${{ github.event_name != 'pull_request' }} + run: | + PR_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') - make -e build + make -e build PR_VERSION="$PR_VERSION" - name: Publish Docker image and Helm chart if: ${{ !github.event.pull_request.head.repo.fork }} run: | diff --git a/Makefile b/Makefile index 16b67fcc..9ce4777b 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ helm-publish: cosign sign -y "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_CHARTS}/${HELM_CHART_NAME}@$$REPO_DIGEST_OF_ARTIFACT" helm-package: - mkdir -p target/helm && helm package --destination target/helm deploy/helm/${OPERATOR_NAME} + mkdir -p target/helm && helm package --version ${PR_VERSION} --destination target/helm deploy/helm/${OPERATOR_NAME} ## Chart related targets compile-chart: version crds config From 0887500c98146d50e49895139ac2ba481171f6ee Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jan 2025 09:51:17 +0100 Subject: [PATCH 3/5] fixed broken if condition --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c1ce870..afc155a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -363,7 +363,7 @@ jobs: sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq fi - name: Build Docker image and Helm chart - main-PR - if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} env: PR_NUMBER: ${{ github.event.pull_request.number }} run: | From 26d0e9800da5b1baaa91ad229284c7625f41cc2a Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jan 2025 11:25:32 +0100 Subject: [PATCH 4/5] revert previous change and set version manually for non-main PR case --- .github/workflows/build.yml | 40 ++++++++++++++++--------------------- Makefile | 2 +- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afc155a9..2dd9f012 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -345,6 +345,21 @@ jobs: with: crate: cargo-edit bin: cargo-set-version + - name: Update version if PR against main branch + if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} + run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} + - name: Update version if PR against non-main branch + # For PRs to be merged against a release branch, use the version that has already been set in the calling script. + # We can't rely on cargo set-version here as we will break semver rules when changing the version to make it + # specific to this PR e.g. 1.2.0 --> 1.2.0-pr678, so set it manually. + if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') + PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}" + sed -i "s/version = \"${MANIFEST_VERSION}\"/version = \"${PR_VERSION}\"/" Cargo.toml + # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the # default value in the makefile if called from this action, but not otherwise (i.e. when called locally). # This is needed for the HELM_REPO variable. @@ -352,7 +367,7 @@ jobs: uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 - name: Install syft uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2 - - name: Build prerequisites + - name: Build Docker image and Helm chart run: | # Installing helm and yq on ubicloud-standard-8-arm only if [ "$(arch)" = "aarch64" ]; then @@ -362,29 +377,8 @@ jobs: sudo apt-get -y install helm sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq fi - - name: Build Docker image and Helm chart - main-PR - if: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' }} - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - PR_VERSION="0.0.0-pr${PR_NUMBER}" - - make -e build PR_VERSION="$PR_VERSION" - - name: Build Docker image and Helm chart - non-main-PR - if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') - PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}" - - make -e build PR_VERSION="$PR_VERSION" - - name: Build Docker image and Helm chart - non-PR - if: ${{ github.event_name != 'pull_request' }} - run: | - PR_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') - make -e build PR_VERSION="$PR_VERSION" + make -e build - name: Publish Docker image and Helm chart if: ${{ !github.event.pull_request.head.repo.fork }} run: | diff --git a/Makefile b/Makefile index 9ce4777b..16b67fcc 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ helm-publish: cosign sign -y "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_CHARTS}/${HELM_CHART_NAME}@$$REPO_DIGEST_OF_ARTIFACT" helm-package: - mkdir -p target/helm && helm package --version ${PR_VERSION} --destination target/helm deploy/helm/${OPERATOR_NAME} + mkdir -p target/helm && helm package --destination target/helm deploy/helm/${OPERATOR_NAME} ## Chart related targets compile-chart: version crds config From 52f1678148dd0278202d6d7f30a88c8c26726c23 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jan 2025 11:55:17 +0100 Subject: [PATCH 5/5] ditto for manifest step --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dd9f012..9217c8ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,13 +427,15 @@ jobs: run: cargo set-version --offline --workspace 0.0.0-pr${{ github.event.pull_request.number }} - name: Update version if PR against non-main branch # For PRs to be merged against a release branch, use the version that has already been set in the calling script. + # We can't rely on cargo set-version here as we will break semver rules when changing the version to make it + # specific to this PR e.g. 1.2.0 --> 1.2.0-pr678, so set it manually. if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/main' }} env: PR_NUMBER: ${{ github.event.pull_request.number }} run: | MANIFEST_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version') PR_VERSION="${MANIFEST_VERSION}-pr${PR_NUMBER}" - cargo set-version --offline --workspace "$PR_VERSION" + sed -i "s/version = \"${MANIFEST_VERSION}\"/version = \"${PR_VERSION}\"/" Cargo.toml - name: Build manifest list run: | # Creating manifest list