From fa700cdae5823b638e9a4df2832591a78918db23 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Wed, 27 Nov 2024 11:02:19 -0600 Subject: [PATCH 1/7] chore(metrics): kots will send upgrade events instead of the operator (#1527) --- Makefile | 5 +- operator/Makefile | 5 +- .../controllers/installation_controller.go | 47 ------------------- operator/pkg/cli/upgrade.go | 11 ----- operator/pkg/cli/upgrade_job.go | 15 ------ operator/pkg/metrics/metrics.go | 37 --------------- pkg/addons/adminconsole/adminconsole.go | 20 ++++---- 7 files changed, 17 insertions(+), 123 deletions(-) diff --git a/Makefile b/Makefile index ecc14c585..d8610b718 100644 --- a/Makefile +++ b/Makefile @@ -191,8 +191,9 @@ rebuild-release: check-env-EC_VERSION check-env-APP_VERSION ./scripts/build-and-release.sh .PHONY: upgrade-release -upgrade-release: export EC_VERSION = $(VERSION)-$(CURRENT_USER)-upgrade -upgrade-release: export APP_VERSION = appver-dev-$(call random-string)-upgrade +upgrade-release: RANDOM_STRING = $(call random-string) +upgrade-release: export EC_VERSION = $(VERSION)-$(CURRENT_USER)-upgrade-$(RANDOM_STRING) +upgrade-release: export APP_VERSION = appver-dev-$(call random-string)-upgrade-$(RANDOM_STRING) upgrade-release: check-env-EC_VERSION check-env-APP_VERSION UPLOAD_BINARIES=1 \ RELEASE_YAML_DIR=e2e/kots-release-upgrade \ diff --git a/operator/Makefile b/operator/Makefile index 7dc538775..9267cf6d7 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -5,6 +5,8 @@ include ../common.mk OS ?= linux ARCH ?= $(shell go env GOARCH) +ADMIN_CONSOLE_IMAGE_OVERRIDE = + # VERSION defines the project version for the bundle. # Update this value when you upgrade the version of your project. # To re-generate a bundle for another specific version without changing the standard setup, you can: @@ -27,7 +29,8 @@ export PATH := $(shell pwd)/bin:$(PATH) LD_FLAGS = \ -X github.com/replicatedhq/embedded-cluster/pkg/versions.K0sVersion=$(K0S_VERSION) \ - -X github.com/replicatedhq/embedded-cluster/pkg/versions.Version=$(VERSION) + -X github.com/replicatedhq/embedded-cluster/pkg/versions.Version=$(VERSION) \ + -X github.com/replicatedhq/embedded-cluster/pkg/addons/adminconsole.AdminConsoleImageOverride=$(ADMIN_CONSOLE_IMAGE_OVERRIDE) # Setting SHELL to bash allows bash commands to be executed by recipes. # Options are set to exit when a recipe line exits non-zero or a piped command fails. diff --git a/operator/controllers/installation_controller.go b/operator/controllers/installation_controller.go index 72fe89bf5..8b056f59b 100644 --- a/operator/controllers/installation_controller.go +++ b/operator/controllers/installation_controller.go @@ -248,47 +248,6 @@ func (r *InstallationReconciler) ReportNodesChanges(ctx context.Context, in *v1b } } -// ReportInstallationChanges reports back to the metrics server if the installation status has changed. -func (r *InstallationReconciler) ReportInstallationChanges(ctx context.Context, before, after *v1beta1.Installation) { - if len(before.Status.State) == 0 || before.Status.State == after.Status.State { - return - } - var err error - var beforeVer, afterVer string - if before.Spec.Config != nil { - beforeVer = before.Spec.Config.Version - } - if after.Spec.Config != nil { - afterVer = after.Spec.Config.Version - } - switch after.Status.State { - case v1beta1.InstallationStateInstalling: - if beforeVer != "" { - err = metrics.NotifyUpgradeStarted(ctx, after.Spec.MetricsBaseURL, metrics.UpgradeStartedEvent{ - ClusterID: after.Spec.ClusterID, - TargetVersion: afterVer, - InitialVersion: beforeVer, - }) - } - case v1beta1.InstallationStateInstalled: - err = metrics.NotifyUpgradeSucceeded(ctx, after.Spec.MetricsBaseURL, metrics.UpgradeSucceededEvent{ - ClusterID: after.Spec.ClusterID, - TargetVersion: afterVer, - InitialVersion: beforeVer, - }) - case v1beta1.InstallationStateFailed: - err = metrics.NotifyUpgradeFailed(ctx, after.Spec.MetricsBaseURL, metrics.UpgradeFailedEvent{ - ClusterID: after.Spec.ClusterID, - Reason: after.Status.Reason, - TargetVersion: afterVer, - InitialVersion: beforeVer, - }) - } - if err != nil { - ctrl.LoggerFrom(ctx).Error(err, "failed to notify cluster installation status") - } -} - func (r *InstallationReconciler) ReconcileOpenebs(ctx context.Context, in *v1beta1.Installation) error { log := ctrl.LoggerFrom(ctx) @@ -642,11 +601,6 @@ func (r *InstallationReconciler) Reconcile(ctx context.Context, req ctrl.Request return ctrl.Result{}, fmt.Errorf("failed to update installation status: %w", err) } - // we create a copy of the installation so we can compare if it - // changed its status after the reconcile (this is mostly for - // calling back to us with events). - before := in.DeepCopy() - // verify if a new node has been added, removed or changed. events, err := r.ReconcileNodeStatuses(ctx, in) if err != nil { @@ -698,7 +652,6 @@ func (r *InstallationReconciler) Reconcile(ctx context.Context, req ctrl.Request // if we are not in an airgap environment this is the time to call back to // replicated and inform the status of this installation. if !in.Spec.AirGap { - r.ReportInstallationChanges(ctx, before, in) r.ReportNodesChanges(ctx, in, events) } diff --git a/operator/pkg/cli/upgrade.go b/operator/pkg/cli/upgrade.go index 2bf41fe64..4ec52c90c 100644 --- a/operator/pkg/cli/upgrade.go +++ b/operator/pkg/cli/upgrade.go @@ -8,7 +8,6 @@ import ( clusterv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1" "github.com/replicatedhq/embedded-cluster/operator/pkg/k8sutil" - "github.com/replicatedhq/embedded-cluster/operator/pkg/metrics" "github.com/replicatedhq/embedded-cluster/operator/pkg/upgrade" "github.com/replicatedhq/embedded-cluster/pkg/kubeutils" "github.com/replicatedhq/embedded-cluster/pkg/runtimeconfig" @@ -63,16 +62,6 @@ func UpgradeCmd() *cobra.Command { if err != nil { return fmt.Errorf("failed to upgrade: %w", err) } - if !in.Spec.AirGap { - err = metrics.NotifyUpgradeStarted(cmd.Context(), in.Spec.MetricsBaseURL, metrics.UpgradeStartedEvent{ - ClusterID: in.Spec.ClusterID, - TargetVersion: in.Spec.Config.Version, - InitialVersion: previousInstallation.Spec.Config.Version, - }) - if err != nil { - fmt.Printf("failed to report that the upgrade was started: %v\n", err) - } - } fmt.Println("Upgrade job created successfully") diff --git a/operator/pkg/cli/upgrade_job.go b/operator/pkg/cli/upgrade_job.go index dbad7467b..29194f264 100644 --- a/operator/pkg/cli/upgrade_job.go +++ b/operator/pkg/cli/upgrade_job.go @@ -2,11 +2,9 @@ package cli import ( "fmt" - "strings" "time" "github.com/replicatedhq/embedded-cluster/operator/pkg/k8sutil" - "github.com/replicatedhq/embedded-cluster/operator/pkg/metrics" "github.com/replicatedhq/embedded-cluster/operator/pkg/upgrade" "github.com/replicatedhq/embedded-cluster/pkg/runtimeconfig" "github.com/replicatedhq/embedded-cluster/pkg/versions" @@ -48,25 +46,12 @@ func UpgradeJobCmd() *cobra.Command { fmt.Printf("Upgrading to installation %s (version %s)\n", in.Name, in.Spec.Config.Version) i := 0 - allErrors := []string{} sleepDuration := time.Second * 5 for { err = upgrade.Upgrade(cmd.Context(), cli, in) if err != nil { fmt.Printf("Upgrade failed, retrying: %s\n", err.Error()) - allErrors = append(allErrors, err.Error()) if i >= 10 { - if !in.Spec.AirGap { - err = metrics.NotifyUpgradeFailed(cmd.Context(), in.Spec.MetricsBaseURL, metrics.UpgradeFailedEvent{ - ClusterID: in.Spec.ClusterID, - TargetVersion: in.Spec.Config.Version, - InitialVersion: previousInstallationVersion, - Reason: strings.Join(allErrors, ", "), - }) - if err != nil { - fmt.Printf("failed to report that the upgrade was started: %v\n", err) - } - } return fmt.Errorf("failed to upgrade after %s", (sleepDuration * time.Duration(i)).String()) } diff --git a/operator/pkg/metrics/metrics.go b/operator/pkg/metrics/metrics.go index 78c587991..0694c1bed 100644 --- a/operator/pkg/metrics/metrics.go +++ b/operator/pkg/metrics/metrics.go @@ -39,28 +39,6 @@ type NodeEvent struct { Version string `json:"version"` } -// UpgradeStartedEvent is send back home when the upgrade starts. -type UpgradeStartedEvent struct { - ClusterID string `json:"clusterID"` - TargetVersion string `json:"targetVersion"` - InitialVersion string `json:"initialVersion"` -} - -// UpgradeFailedEvent is send back home when the upgrade fails. -type UpgradeFailedEvent struct { - ClusterID string `json:"clusterID"` - TargetVersion string `json:"targetVersion"` - InitialVersion string `json:"initialVersion"` - Reason string `json:"reason"` -} - -// UpgradeSucceededEvent event is send back home when the upgrade succeeds. -type UpgradeSucceededEvent struct { - ClusterID string `json:"clusterID"` - TargetVersion string `json:"targetVersion"` - InitialVersion string `json:"initialVersion"` -} - // Hash returns the hash of the node. func (n NodeEvent) Hash() (string, error) { hasher := sha256.New() @@ -117,18 +95,3 @@ func NotifyNodeAdded(ctx context.Context, baseURL string, ev NodeEvent) error { func NotifyNodeRemoved(ctx context.Context, baseURL string, ev NodeRemovedEvent) error { return sendEvent(ctx, "NodeRemoved", baseURL, ev) } - -// NotifyUpgradeStarted notifies the metrics server that an upgrade has started. -func NotifyUpgradeStarted(ctx context.Context, baseURL string, ev UpgradeStartedEvent) error { - return sendEvent(ctx, "UpgradeStarted", baseURL, ev) -} - -// NotifyUpgradeFailed notifies the metrics server that an upgrade has failed. -func NotifyUpgradeFailed(ctx context.Context, baseURL string, ev UpgradeFailedEvent) error { - return sendEvent(ctx, "UpgradeFailed", baseURL, ev) -} - -// NotifyUpgradeSucceeded notifies the metrics server that an upgrade has succeeded. -func NotifyUpgradeSucceeded(ctx context.Context, baseURL string, ev UpgradeSucceededEvent) error { - return sendEvent(ctx, "UpgradeSucceeded", baseURL, ev) -} diff --git a/pkg/addons/adminconsole/adminconsole.go b/pkg/addons/adminconsole/adminconsole.go index c21876c36..8c46cf77f 100644 --- a/pkg/addons/adminconsole/adminconsole.go +++ b/pkg/addons/adminconsole/adminconsole.go @@ -15,16 +15,6 @@ import ( k0sv1beta1 "github.com/k0sproject/k0s/pkg/apis/k0s/v1beta1" ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1" "github.com/replicatedhq/embedded-cluster/kinds/types" - "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" - "github.com/sirupsen/logrus" - "golang.org/x/crypto/bcrypt" - "gopkg.in/yaml.v3" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/utils/ptr" - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/replicatedhq/embedded-cluster/pkg/addons/registry" "github.com/replicatedhq/embedded-cluster/pkg/helm" "github.com/replicatedhq/embedded-cluster/pkg/helpers" @@ -34,6 +24,16 @@ import ( "github.com/replicatedhq/embedded-cluster/pkg/netutils" "github.com/replicatedhq/embedded-cluster/pkg/release" "github.com/replicatedhq/embedded-cluster/pkg/spinner" + "github.com/replicatedhq/embedded-cluster/pkg/versions" + "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" + "github.com/sirupsen/logrus" + "golang.org/x/crypto/bcrypt" + "gopkg.in/yaml.v3" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" ) const ( From 2d846252a9e75158e47938cbb41a331d845b344c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Antunes?= Date: Fri, 29 Nov 2024 22:02:12 +0000 Subject: [PATCH 2/7] chore(ci): address melange's latest change (#1560) * chore(ci): pin melange version * chore: try out 0.15.14 * fix: duplicate imports * fix: can't pin melange, shorten the version string instead * fix: ci pipelines and other methods * fix: abreviate git describe to 4 chars * fix: changed APP_VERSION by mistake * chore: try to rename the melange package * chore: reverse suffix changes --- .github/workflows/ci.yaml | 22 +++++++++++----------- common.mk | 2 +- operator/deploy/apko.tmpl.yaml | 2 +- operator/deploy/melange.tmpl.yaml | 2 +- pkg/addons/adminconsole/adminconsole.go | 4 +--- scripts/build-and-release.sh | 2 +- scripts/ci-build-bin.sh | 2 +- scripts/ci-build-deps.sh | 2 +- scripts/ci-embed-release.sh | 2 +- scripts/ci-release-app.sh | 2 +- scripts/ci-upload-binaries.sh | 2 +- 11 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd019fb0e..f591b196d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -181,7 +181,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export K0S_VERSION=$(make print-K0S_VERSION) - export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*') export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }} export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }} # avoid rate limiting @@ -254,7 +254,7 @@ jobs: run: | export K0S_VERSION=$(make print-PREVIOUS_K0S_VERSION) export K0S_GO_VERSION=$(make print-PREVIOUS_K0S_GO_VERSION) - export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s + export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-previous-k0s # avoid rate limiting export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2) @@ -357,7 +357,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export K0S_VERSION=$(make print-K0S_VERSION) - export EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-upgrade + export EC_VERSION=$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-upgrade export APP_VERSION=appver-dev-${{ needs.git-sha.outputs.git_sha }}-upgrade # avoid rate limiting export FIO_VERSION=$(gh release list --repo axboe/fio --json tagName,isLatest | jq -r '.[] | select(.isLatest==true)|.tagName' | cut -d- -f2) @@ -481,25 +481,25 @@ jobs: ./scripts/ci-release-app.sh # install the previous k0s version to ensure an upgrade occurs - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s" export APP_VERSION="appver-${SHORT_SHA}-previous-k0s" export RELEASE_YAML_DIR=e2e/kots-release-install ./scripts/ci-release-app.sh # then install the current k0s version - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')" export APP_VERSION="appver-${SHORT_SHA}" export RELEASE_YAML_DIR=e2e/kots-release-install ./scripts/ci-release-app.sh # then a noop upgrade - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')" export APP_VERSION="appver-${SHORT_SHA}-noop" export RELEASE_YAML_DIR=e2e/kots-release-install ./scripts/ci-release-app.sh # and finally an app upgrade - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-upgrade" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-upgrade" export APP_VERSION="appver-${SHORT_SHA}-upgrade" export RELEASE_YAML_DIR=e2e/kots-release-upgrade ./scripts/ci-release-app.sh @@ -521,19 +521,19 @@ jobs: ./scripts/ci-release-app.sh # install the previous k0s version to ensure an upgrade occurs - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-previous-k0s" export APP_VERSION="appver-${SHORT_SHA}-previous-k0s" export RELEASE_YAML_DIR=e2e/kots-release-install ./scripts/ci-release-app.sh # then install the current k0s version - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')" export APP_VERSION="appver-${SHORT_SHA}" export RELEASE_YAML_DIR=e2e/kots-release-install ./scripts/ci-release-app.sh # and finally an app upgrade - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')-upgrade" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')-upgrade" export APP_VERSION="appver-${SHORT_SHA}-upgrade" export RELEASE_YAML_DIR=e2e/kots-release-upgrade ./scripts/ci-release-app.sh @@ -542,7 +542,7 @@ jobs: if: github.event_name == 'pull_request' run: | export SHORT_SHA=dev-${{ needs.git-sha.outputs.git_sha }} - export EC_VERSION="$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*')" + export EC_VERSION="$(git describe --tags --abbrev=4 --match='[0-9]*.[0-9]*.[0-9]*')" export APP_VERSION="appver-${SHORT_SHA}" echo "This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app [license ID](https://vendor.staging.replicated.com/apps/embedded-cluster-smoke-test-staging-app/customers?sort=name-asc)." > download-link.txt diff --git a/common.mk b/common.mk index 4226622a9..8238e23c5 100644 --- a/common.mk +++ b/common.mk @@ -16,7 +16,7 @@ MELANGE ?= $(LOCALBIN)/melange APKO ?= $(LOCALBIN)/apko ## Version to use for building -VERSION ?= $(shell git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') +VERSION ?= $(shell git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/operator/deploy/apko.tmpl.yaml b/operator/deploy/apko.tmpl.yaml index 57398969e..d36d38ba0 100644 --- a/operator/deploy/apko.tmpl.yaml +++ b/operator/deploy/apko.tmpl.yaml @@ -6,7 +6,7 @@ contents: - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub - ./melange.rsa.pub packages: - - embedded-cluster-operator # This is expected to be built locally by `melange`. + - ec-operator # This is expected to be built locally by `melange`. - ca-certificates-bundle accounts: diff --git a/operator/deploy/melange.tmpl.yaml b/operator/deploy/melange.tmpl.yaml index 5ec8840b9..aa1e75a91 100644 --- a/operator/deploy/melange.tmpl.yaml +++ b/operator/deploy/melange.tmpl.yaml @@ -1,5 +1,5 @@ package: - name: embedded-cluster-operator + name: ec-operator version: ${PACKAGE_VERSION} epoch: 0 description: Embedded Cluster Operator diff --git a/pkg/addons/adminconsole/adminconsole.go b/pkg/addons/adminconsole/adminconsole.go index 8c46cf77f..31344d75f 100644 --- a/pkg/addons/adminconsole/adminconsole.go +++ b/pkg/addons/adminconsole/adminconsole.go @@ -9,9 +9,6 @@ import ( "fmt" "time" - "github.com/replicatedhq/embedded-cluster/pkg/runtimeconfig" - "github.com/replicatedhq/embedded-cluster/pkg/versions" - k0sv1beta1 "github.com/k0sproject/k0s/pkg/apis/k0s/v1beta1" ecv1beta1 "github.com/replicatedhq/embedded-cluster/kinds/apis/v1beta1" "github.com/replicatedhq/embedded-cluster/kinds/types" @@ -23,6 +20,7 @@ import ( "github.com/replicatedhq/embedded-cluster/pkg/metrics" "github.com/replicatedhq/embedded-cluster/pkg/netutils" "github.com/replicatedhq/embedded-cluster/pkg/release" + "github.com/replicatedhq/embedded-cluster/pkg/runtimeconfig" "github.com/replicatedhq/embedded-cluster/pkg/spinner" "github.com/replicatedhq/embedded-cluster/pkg/versions" "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" diff --git a/scripts/build-and-release.sh b/scripts/build-and-release.sh index da13a8ee6..e6cc2cfbe 100755 --- a/scripts/build-and-release.sh +++ b/scripts/build-and-release.sh @@ -35,7 +35,7 @@ export REPLICATED_API_ORIGIN REPLICATED_APP REPLICATED_API_TOKEN AWS_ACCESS_KEY_ function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi if [ -z "${APP_VERSION:-}" ]; then APP_VERSION="appver-dev-$(git rev-parse --short HEAD)" diff --git a/scripts/ci-build-bin.sh b/scripts/ci-build-bin.sh index af40fc23e..2901463aa 100755 --- a/scripts/ci-build-bin.sh +++ b/scripts/ci-build-bin.sh @@ -18,7 +18,7 @@ fi function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi if [ -z "${K0S_VERSION:-}" ]; then K0S_VERSION=$(make print-K0S_VERSION) diff --git a/scripts/ci-build-deps.sh b/scripts/ci-build-deps.sh index aecf586ff..b37adb90e 100755 --- a/scripts/ci-build-deps.sh +++ b/scripts/ci-build-deps.sh @@ -10,7 +10,7 @@ USE_CHAINGUARD=${USE_CHAINGUARD:-1} function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi require EC_VERSION "${EC_VERSION:-}" diff --git a/scripts/ci-embed-release.sh b/scripts/ci-embed-release.sh index 97930b0a8..0878389e1 100755 --- a/scripts/ci-embed-release.sh +++ b/scripts/ci-embed-release.sh @@ -23,7 +23,7 @@ fi function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi if [ -z "${APP_VERSION:-}" ]; then local short_sha= diff --git a/scripts/ci-release-app.sh b/scripts/ci-release-app.sh index 8a61961af..57c7a49ae 100755 --- a/scripts/ci-release-app.sh +++ b/scripts/ci-release-app.sh @@ -23,7 +23,7 @@ require REPLICATED_API_ORIGIN "${REPLICATED_API_ORIGIN:-}" function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi if [ -z "${APP_VERSION:-}" ]; then local short_sha= diff --git a/scripts/ci-upload-binaries.sh b/scripts/ci-upload-binaries.sh index 2e911889b..ea8aa3e48 100755 --- a/scripts/ci-upload-binaries.sh +++ b/scripts/ci-upload-binaries.sh @@ -20,7 +20,7 @@ require S3_BUCKET "${S3_BUCKET}" function init_vars() { if [ -z "${EC_VERSION:-}" ]; then - EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*') + EC_VERSION=$(git describe --tags --match='[0-9]*.[0-9]*.[0-9]*' --abbrev=4) fi if [ -z "${K0S_VERSION:-}" ]; then K0S_VERSION=$(make print-K0S_VERSION) From badf863f72e9449a02abbf9b6d4d7932f4d9bfb3 Mon Sep 17 00:00:00 2001 From: replicated-ci-ec Date: Fri, 29 Nov 2024 23:14:16 +0000 Subject: [PATCH 3/7] feat: update adminconsole version (#1556) --- pkg/addons/adminconsole/static/metadata.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/addons/adminconsole/static/metadata.yaml b/pkg/addons/adminconsole/static/metadata.yaml index acd7d1bb7..f09f8af25 100644 --- a/pkg/addons/adminconsole/static/metadata.yaml +++ b/pkg/addons/adminconsole/static/metadata.yaml @@ -5,24 +5,24 @@ # $ make buildtools # $ output/bin/buildtools update addon # -version: 1.121.1 +version: 1.121.2 location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console images: kotsadm: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm tag: - amd64: v1.121.1-amd64@sha256:f55438fd0c0358d50bb58ee0759ceef2a8c731ce1de4ce2824f77fd444a258e6 - arm64: v1.121.1-arm64@sha256:62cc08aea3872e20f83a97b2bfae6aa523a5131874920c77a56a45612c009893 + amd64: v1.121.2-amd64@sha256:33dfc88c02ed5bf1147b79bc46a8e516763a094f09b68b5e98e3095e0746d6f5 + arm64: v1.121.2-arm64@sha256:de4f3a0518dbdcc7221a37f7276e50d28c65ee7893bf16c8b2fd7f6b640f1cfe kotsadm-migrations: repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations tag: - amd64: v1.121.1-amd64@sha256:2f08f9e02758c71d8c2d3efa1a29d54dff335ea4783c8ed00123e245709cb158 - arm64: v1.121.1-arm64@sha256:5b8631eae79661d7a056fced5ac44c922c8b2de95200ce0b1caab0f06c6ed956 + amd64: v1.121.2-amd64@sha256:3b86891ca6b857ebfb71b59414c8d4447395fffb6fdda0b8975ef7d3f8544f74 + arm64: v1.121.2-arm64@sha256:6557705d2e02012bd65a0b219db659788ced24a819cbc14bde62634ebf115adc kurl-proxy: repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy tag: - amd64: v1.121.1-amd64@sha256:6bdd249ca9cfba883070d8609392da2b620ed1b8113a42036f9d32f8c0a4f0d1 - arm64: v1.121.1-arm64@sha256:8e7b5264e862cc4f38c440c9a6151be255ba429010ab247516673a4f39adb807 + amd64: v1.121.2-amd64@sha256:9ed3e3ec092a467a242fd5490dace18a902708d59bf4309dafdb2c945e65fa5b + arm64: v1.121.2-arm64@sha256:55307eb96b167efbee68a3708d99f54d54aca0fa9d486dc1dd64763361a33215 rqlite: repo: proxy.replicated.com/anonymous/kotsadm/rqlite tag: From 27b8adc6e564217efa94fb5a3f0b98d80c45398f Mon Sep 17 00:00:00 2001 From: replicated-ci-ec Date: Sat, 30 Nov 2024 12:05:07 +0000 Subject: [PATCH 4/7] chore: update seaweedfs images (#1561) Update image versions Co-authored-by: sgalsaleh <39952863+sgalsaleh@users.noreply.github.com> --- pkg/addons/seaweedfs/static/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/addons/seaweedfs/static/metadata.yaml b/pkg/addons/seaweedfs/static/metadata.yaml index 896d7af8c..2d6839cf0 100644 --- a/pkg/addons/seaweedfs/static/metadata.yaml +++ b/pkg/addons/seaweedfs/static/metadata.yaml @@ -11,5 +11,5 @@ images: seaweedfs: repo: proxy.replicated.com/anonymous/replicated/ec-seaweedfs tag: - amd64: 3.79-r0-amd64@sha256:a6cd31bc4ba11f01665ee217653129f2f7827fb1148ca1003ff1becad2d59b05 - arm64: 3.79-r0-arm64@sha256:a0a42fc5057ce5bc78707db5762f0beefaed1e45c7d6b3dd2d5fcca3045595f3 + amd64: 3.79-r0-amd64@sha256:607a9f1369a2dcc548957f5af4a47b6072f8f6a5a7760cdc811983cb091afe58 + arm64: 3.79-r0-arm64@sha256:5acebbd54bdff6339e3fcf45d50d54626c5fa7823f917b439b677259c213a42c From c1800651b0c47168f035ce5429b57437c9888110 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 06:04:24 +0000 Subject: [PATCH 5/7] build(deps): bump the security group with 2 updates (#1563) Bumps the security group with 2 updates: [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) and [github.com/gorilla/websocket](https://github.com/gorilla/websocket). Updates `github.com/jedib0t/go-pretty/v6` from 6.6.2 to 6.6.3 - [Release notes](https://github.com/jedib0t/go-pretty/releases) - [Commits](https://github.com/jedib0t/go-pretty/compare/v6.6.2...v6.6.3) Updates `github.com/gorilla/websocket` from 1.5.1 to 1.5.3 - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.3) --- updated-dependencies: - dependency-name: github.com/jedib0t/go-pretty/v6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: security - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-patch dependency-group: security ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 0579e014d..a42e041f2 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/google/go-github/v62 v62.0.0 github.com/google/uuid v1.6.0 github.com/gosimple/slug v1.14.0 - github.com/jedib0t/go-pretty/v6 v6.6.2 + github.com/jedib0t/go-pretty/v6 v6.6.3 github.com/k0sproject/dig v0.3.1 github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b github.com/ohler55/ojg v1.25.0 @@ -323,7 +323,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/gorilla/securecookie v1.1.2 // indirect - github.com/gorilla/websocket v1.5.1 + github.com/gorilla/websocket v1.5.3 github.com/gosimple/unidecode v1.0.1 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/imdario/mergo v0.3.16 // indirect diff --git a/go.sum b/go.sum index c8d1347b6..5defab627 100644 --- a/go.sum +++ b/go.sum @@ -674,8 +674,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosimple/slug v1.14.0 h1:RtTL/71mJNDfpUbCOmnf/XFkzKRtD6wL6Uy+3akm4Es= github.com/gosimple/slug v1.14.0/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= @@ -730,8 +730,8 @@ github.com/jackc/pgx/v5 v5.7.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/jedib0t/go-pretty/v6 v6.6.2 h1:27bLj3nRODzaiA7tPIxy9UVWHoPspFfME9XxgwiiNsM= -github.com/jedib0t/go-pretty/v6 v6.6.2/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= +github.com/jedib0t/go-pretty/v6 v6.6.3 h1:nGqgS0tgIO1Hto47HSaaK4ac/I/Bu7usmdD3qvs0WvM= +github.com/jedib0t/go-pretty/v6 v6.6.3/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E= github.com/jeremija/gosubmit v0.2.7 h1:At0OhGCFGPXyjPYAsCchoBUhE099pcBXmsb4iZqROIc= github.com/jeremija/gosubmit v0.2.7/go.mod h1:Ui+HS073lCFREXBbdfrJzMB57OI/bdxTiLtrDHHhFPI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= From f688a028c03c06d4170d93838a8a67345f4a1b6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 06:05:11 +0000 Subject: [PATCH 6/7] build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.68.0 to 1.69.0 (#1565) build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.68.0 to 1.69.0. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.68.0...service/s3/v1.69.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a42e041f2..4d99ae2d4 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.32.5 github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/credentials v1.17.46 - github.com/aws/aws-sdk-go-v2/service/s3 v1.68.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 github.com/bombsimon/logrusr/v4 v4.1.0 github.com/canonical/lxd v0.0.0-20241030172432-dee0d04b56ee github.com/containers/image/v5 v5.33.0 diff --git a/go.sum b/go.sum index 5defab627..fed1ea0e8 100644 --- a/go.sum +++ b/go.sum @@ -294,8 +294,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwr github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 h1:P1doBzv5VEg1ONxnJss1Kh5ZG/ewoIE4MQtKKc6Crgg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5/go.mod h1:NOP+euMW7W3Ukt28tAxPuoWao4rhhqJD3QEBk7oCg7w= -github.com/aws/aws-sdk-go-v2/service/s3 v1.68.0 h1:bFpcqdwtAEsgpZXvkTxIThFQx/EM0oV6kXmfFIGjxME= -github.com/aws/aws-sdk-go-v2/service/s3 v1.68.0/go.mod h1:ralv4XawHjEMaHOWnTFushl0WRqim/gQWesAMF6hTow= +github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 h1:Q2ax8S21clKOnHhhr933xm3JxdJebql+R7aNo7p7GBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0/go.mod h1:ralv4XawHjEMaHOWnTFushl0WRqim/gQWesAMF6hTow= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= From cbdc74fd4756a409cad10a49c4989fe786f0b243 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 12:05:22 +0000 Subject: [PATCH 7/7] build(deps): bump github.com/onsi/gomega from 1.35.1 to 1.36.0 (#1564) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.35.1 to 1.36.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.35.1...v1.36.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4d99ae2d4..ba28f9426 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/k0sproject/k0s v1.30.7-0.20241029184556-a942e759e13b github.com/ohler55/ojg v1.25.0 github.com/onsi/ginkgo/v2 v2.22.0 - github.com/onsi/gomega v1.35.1 + github.com/onsi/gomega v1.36.0 github.com/replicatedhq/embedded-cluster/kinds v0.0.0 github.com/replicatedhq/embedded-cluster/utils v0.0.0 github.com/replicatedhq/kotskinds v0.0.0-20240814191029-3f677ee409a0 diff --git a/go.sum b/go.sum index fed1ea0e8..987c29079 100644 --- a/go.sum +++ b/go.sum @@ -908,8 +908,8 @@ github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.36.0 h1:Pb12RlruUtj4XUuPUqeEWc6j5DkVVVA49Uf6YLfC95Y= +github.com/onsi/gomega v1.36.0/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=