diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 88241b4282..0000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,30 +0,0 @@ -doc: - - changed-files: - - any-glob-to-any-file: - - 'README*' - - 'CONTRIBUTING*' - - 'code-of-conduct*' - -tests: - - changed-files: - - any-glob-to-any-file: - - 'e2e-tests/**' - - 'Jenkinsfile*' - -ci: - - changed-files: - - any-glob-to-any-file: '.github/workflows/**' - -build: - - changed-files: - - any-glob-to-any-file: 'build/**' - -olm: - - changed-files: - - any-glob-to-any-file: 'installers/olm/**' - -dependencies: - - changed-files: - - any-glob-to-any-file: - - 'go.mod' - - 'go.sum' diff --git a/.github/pr-badge.yml b/.github/pr-badge.yml deleted file mode 100644 index b3ecc7f204..0000000000 --- a/.github/pr-badge.yml +++ /dev/null @@ -1,5 +0,0 @@ -label: "JIRA" -url: "https://jira.percona.com/browse/$issuePrefix" -message: "$issuePrefix" -color: "green" -when: "$issuePrefix" diff --git a/.github/workflows/auto-version-bump.yaml b/.github/workflows/auto-version-bump.yaml new file mode 100644 index 0000000000..3ba5fdf577 --- /dev/null +++ b/.github/workflows/auto-version-bump.yaml @@ -0,0 +1,206 @@ +name: Auto Version Bump + +on: + pull_request: + types: [opened, synchronize, labeled] + paths: + - 'pkg/**' + - 'cmd/**' + - 'build/**' + - 'config/**' + - 'deploy/**' + +permissions: + contents: write + pull-requests: read + +jobs: + auto-bump: + runs-on: ubuntu-latest + steps: + - name: Determine bump type from label + id: label + run: | + LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}' + if echo "$LABELS" | jq -e 'map(select(. == "bump:major")) | length > 0' > /dev/null; then + echo "type=major" >> "$GITHUB_OUTPUT" + elif echo "$LABELS" | jq -e 'map(select(. == "bump:minor")) | length > 0' > /dev/null; then + echo "type=minor" >> "$GITHUB_OUTPUT" + elif echo "$LABELS" | jq -e 'map(select(. == "bump:patch")) | length > 0' > /dev/null; then + echo "type=patch" >> "$GITHUB_OUTPUT" + else + echo "type=" >> "$GITHUB_OUTPUT" + fi + + - name: Checkout PR branch + if: steps.label.outputs.type != '' + uses: actions/checkout@v7 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Fetch base branch + if: steps.label.outputs.type != '' + run: git fetch origin ${{ github.event.pull_request.base.ref }} + + - name: Configure git + if: steps.label.outputs.type != '' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Resolve version conflict with base + if: steps.label.outputs.type != '' + id: conflict + run: | + BASE_REF="origin/${{ github.event.pull_request.base.ref }}" + VERSION_FILE="pkg/version/version.txt" + + # Check if version file has a merge conflict with base + if git merge --no-commit --no-ff "$BASE_REF" 2>/dev/null; then + git merge --abort 2>/dev/null || true + echo "resolved=false" >> "$GITHUB_OUTPUT" + else + CONFLICTED=$(git diff --name-only --diff-filter=U 2>/dev/null || true) + git merge --abort 2>/dev/null || true + + # Check if conflicts are only in the version file + VERSION_ONLY=true + for f in $CONFLICTED; do + if [ "$f" != "$VERSION_FILE" ]; then + VERSION_ONLY=false + break + fi + done + + if [ "$VERSION_ONLY" = "true" ]; then + echo "🔀 Version file conflict detected — will auto-resolve from base" + echo "resolved=true" >> "$GITHUB_OUTPUT" + else + echo "resolved=false" >> "$GITHUB_OUTPUT" + fi + fi + + - name: Merge base into PR (resolve version conflict) + if: steps.label.outputs.type != '' && steps.conflict.outputs.resolved == 'true' + run: | + BASE_REF="origin/${{ github.event.pull_request.base.ref }}" + VERSION_FILE="pkg/version/version.txt" + + # Start the merge, accept conflicts + git merge "$BASE_REF" --no-edit || true + + # Resolve version file by taking theirs (will be overwritten by bump step) + git checkout --theirs "$VERSION_FILE" 2>/dev/null || true + git add "$VERSION_FILE" + + # If there are other conflicts, abort + OTHER_CONFLICTS=$(git diff --name-only --diff-filter=U 2>/dev/null || true) + if [ -n "$OTHER_CONFLICTS" ]; then + echo "::error::Merge has conflicts beyond version file, cannot auto-resolve" + git merge --abort + exit 1 + fi + + git commit --no-edit + + - name: Bump version + if: steps.label.outputs.type != '' + id: bump + run: | + BUMP_TYPE="${{ steps.label.outputs.type }}" + BASE_REF="origin/${{ github.event.pull_request.base.ref }}" + VERSION_FILE="pkg/version/version.txt" + + CHANGED_FILES=$(git diff --name-only "$BASE_REF" HEAD) + + # Check if code in monitored directories changed (excluding version file) + CODE_CHANGED=$(echo "$CHANGED_FILES" | grep -E '^(pkg|cmd|build|config|deploy)/' | grep -v "^${VERSION_FILE}$" || true) + if [ -z "$CODE_CHANGED" ]; then + echo "No code changes detected, skipping bump" + echo "bumped=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + # Read current versions + BASE_VER=$(git show "$BASE_REF:$VERSION_FILE" 2>/dev/null | tr -d '[:space:]' || echo "1.22.0-0") + PR_VER=$(cat "$VERSION_FILE" | tr -d '[:space:]') + + # Parse subversioned format: X.Y.Z-N + # Base version + BASE_SEMVER=$(echo "$BASE_VER" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+') + BASE_SUB=$(echo "$BASE_VER" | grep -oE '\-[0-9]+$' | tr -d '-' || echo "0") + if [ -z "$BASE_SUB" ]; then BASE_SUB=0; fi + + # PR version + PR_SEMVER=$(echo "$PR_VER" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+') + PR_SUB=$(echo "$PR_VER" | grep -oE '\-[0-9]+$' | tr -d '-' || echo "0") + if [ -z "$PR_SUB" ]; then PR_SUB=0; fi + + # Compare: if PR version is already higher than base, skip (manual bump) + IFS='.' read -r b1 b2 b3 <<< "$BASE_SEMVER" + IFS='.' read -r p1 p2 p3 <<< "$PR_SEMVER" + + ALREADY_BUMPED=false + if [ "$p1" -gt "$b1" ] 2>/dev/null; then + ALREADY_BUMPED=true + elif [ "$p1" -eq "$b1" ] && [ "$p2" -gt "$b2" ] 2>/dev/null; then + ALREADY_BUMPED=true + elif [ "$p1" -eq "$b1" ] && [ "$p2" -eq "$b2" ] && [ "$p3" -gt "$b3" ] 2>/dev/null; then + ALREADY_BUMPED=true + elif [ "$p1" -eq "$b1" ] && [ "$p2" -eq "$b2" ] && [ "$p3" -eq "$b3" ] && [ "$PR_SUB" -gt "$BASE_SUB" ] 2>/dev/null; then + ALREADY_BUMPED=true + fi + + if [ "$ALREADY_BUMPED" = "true" ]; then + echo "✅ Version already bumped ($BASE_VER → $PR_VER), skipping" + echo "bumped=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + # Bump based on type + # For this repo: bump:patch increments the -N subversion suffix + # bump:minor and bump:major bump the semver portion (for upstream rebases) + IFS='.' read -r major minor patch <<< "$BASE_SEMVER" + case "$BUMP_TYPE" in + major) + major=$((major + 1)); minor=0; patch=0 + NEW_VER="${major}.${minor}.${patch}-1" + ;; + minor) + minor=$((minor + 1)); patch=0 + NEW_VER="${major}.${minor}.${patch}-1" + ;; + patch) + NEW_SUB=$((BASE_SUB + 1)) + NEW_VER="${BASE_SEMVER}-${NEW_SUB}" + ;; + esac + + echo "🔄 Version: $BASE_VER → $NEW_VER ($BUMP_TYPE)" + + # Write version file + printf '%s\n' "$NEW_VER" > "$VERSION_FILE" + + echo "bumped=true" >> "$GITHUB_OUTPUT" + + - name: Ensure trailing newline + if: steps.label.outputs.type != '' + run: | + VERSION_FILE="pkg/version/version.txt" + if [ -n "$(tail -c 1 "$VERSION_FILE")" ]; then + echo "" >> "$VERSION_FILE" + echo "Fixed missing trailing newline in $VERSION_FILE" + fi + + - name: Commit and push + if: steps.label.outputs.type != '' + run: | + if git diff --quiet; then + echo "No changes to commit" + else + git add -A + git commit -m "chore: auto-bump version (${{ steps.label.outputs.type }})" + git push + fi diff --git a/.github/workflows/label-check.yaml b/.github/workflows/label-check.yaml new file mode 100644 index 0000000000..b0f046188a --- /dev/null +++ b/.github/workflows/label-check.yaml @@ -0,0 +1,58 @@ +name: Version Bump Label Check + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +permissions: + contents: read + pull-requests: read + +jobs: + check-label: + runs-on: ubuntu-latest + steps: + - name: Check for code changes + id: changes + uses: dorny/paths-filter@v4 + with: + filters: | + code: + - 'pkg/**' + - 'cmd/**' + - 'build/**' + - 'config/**' + - 'deploy/**' + + - name: Check for bump label + if: steps.changes.outputs.code == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + LABELS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels --jq '[.[].name]') + echo "Labels found: $LABELS" + SKIP=$(echo "$LABELS" | jq 'map(select(. == "skip-release")) | length') + + if [ "$SKIP" -gt 0 ]; then + echo "✅ skip-release label found, no version bump required" + exit 0 + fi + + PATCH=$(echo "$LABELS" | jq 'map(select(. == "bump:patch")) | length') + MINOR=$(echo "$LABELS" | jq 'map(select(. == "bump:minor")) | length') + MAJOR=$(echo "$LABELS" | jq 'map(select(. == "bump:major")) | length') + COUNT=$((PATCH + MINOR + MAJOR)) + + if [ "$COUNT" -eq 0 ]; then + echo "::error::PR must have exactly one bump label (bump:patch, bump:minor, or bump:major) or skip-release" + exit 1 + elif [ "$COUNT" -gt 1 ]; then + echo "::error::PR has multiple bump labels. Use exactly one of: bump:patch, bump:minor, bump:major" + exit 1 + fi + + echo "✅ Bump label found" + + - name: Skip label check + if: steps.changes.outputs.code == 'false' + run: echo "✅ No code changes detected, skipping label check" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 7d66056a97..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "PR Labeler" -on: - pull_request: - types: [opened, synchronize] - -jobs: - label: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: "Label PR" - uses: actions/labeler@v6 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-labels: true - - label-community: - runs-on: ubuntu-latest - steps: - - name: "Check if PR is from a fork" - if: github.event.pull_request.head.repo.fork == true - run: | - gh pr edit ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --add-label "community" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml deleted file mode 100644 index e770d68d84..0000000000 --- a/.github/workflows/renovate.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Renovate -on: - schedule: - - cron: "0 */3 * * *" - workflow_dispatch: - -jobs: - renovate: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Run Renovate - uses: renovatebot/github-action@v46.1.14 - with: - token: ${{ secrets.RENOVATE_TOKEN }} - env: - LOG_LEVEL: info - RENOVATE_REPOSITORIES: ${{ github.repository }} - RENOVATE_GIT_AUTHOR: "Renovate Bot " diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index c066d62592..0f59bcf639 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -32,7 +32,7 @@ jobs: with: go-version: '^1.25' - run: go install -v github.com/incu6us/goimports-reviser/v3@latest - - run: $(go env GOPATH)/bin/goimports-reviser -imports-order "std,general,company,project" -company-prefixes "github.com/percona" ./... + - run: $(go env GOPATH)/bin/goimports-reviser -imports-order "std,general,company,project" -company-prefixes "github.com/objectrocket,github.com/percona" ./... - uses: reviewdog/action-suggester@v1.24.0 with: tool_name: goimports-reviser @@ -93,13 +93,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: check on release branch - if: ${{ contains(github.head_ref, 'release-') || contains(github.base_ref, 'release-') }} - run: | - make generate manifests VERSION="$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" pkg/version/version.txt)" IMAGE_TAG_BASE="percona/percona-server-mongodb-operator" - git diff --exit-code - - name: check on non release branches - if: ${{ ! (contains(github.head_ref, 'release-') || contains(github.base_ref, 'release-')) }} + - name: check manifests are up to date run: | make generate manifests VERSION=main git diff --exit-code diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml deleted file mode 100644 index cc87f9ae89..0000000000 --- a/.github/workflows/scan.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Scan docker -on: [pull_request] - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: docker.io - - # github.repository as / - IMAGE_NAME: perconalab/percona-server-mongodb-operator - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build an image from Dockerfile (linux/arm64) - run: | - export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-arm64 - export DOCKER_PUSH=0 - export DOCKER_SQUASH=0 - export DOCKER_DEFAULT_PLATFORM='linux/arm64' - ./e2e-tests/build - - - name: Build an image from Dockerfile (linux/amd64) - run: | - export IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-amd64 - export DOCKER_PUSH=0 - export DOCKER_SQUASH=0 - export DOCKER_DEFAULT_PLATFORM='linux/amd64' - ./e2e-tests/build diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 80f5653dd8..0000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Close Stale PRs" -on: - schedule: - - cron: "0 3 * * *" # Runs daily at 03:00 UTC - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v10 - with: - any-of-labels: 'community' - exempt-all-pr-milestones: true - days-before-stale: 30 # Mark as stale after 30 days - days-before-close: 14 # Close after 14 more days - stale-pr-label: "stale" - exempt-pr-labels: "work-in-progress,blocked" - operations-per-run: 30 - remove-stale-when-updated: true - repo-token: "${{ secrets.GITHUB_TOKEN }}" - diff --git a/config/crd/patches/versionlabel_in_psmdb.yaml b/config/crd/patches/versionlabel_in_psmdb.yaml index aeeae3d176..ab4407ee4d 100644 --- a/config/crd/patches/versionlabel_in_psmdb.yaml +++ b/config/crd/patches/versionlabel_in_psmdb.yaml @@ -4,6 +4,6 @@ metadata: name: perconaservermongodbs.psmdb.percona.com labels: app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 app.kubernetes.io/component: crd app.kubernetes.io/part-of: percona-server-mongodb-operator diff --git a/config/crd/patches/versionlabel_in_psmdbbackup.yaml b/config/crd/patches/versionlabel_in_psmdbbackup.yaml index 37c431d4b2..a14c8167d0 100644 --- a/config/crd/patches/versionlabel_in_psmdbbackup.yaml +++ b/config/crd/patches/versionlabel_in_psmdbbackup.yaml @@ -4,6 +4,6 @@ metadata: name: perconaservermongodbbackups.psmdb.percona.com labels: app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 app.kubernetes.io/component: crd app.kubernetes.io/part-of: percona-server-mongodb-operator diff --git a/config/crd/patches/versionlabel_in_psmdbrestore.yaml b/config/crd/patches/versionlabel_in_psmdbrestore.yaml index 78c6065d55..6c2facd2d9 100644 --- a/config/crd/patches/versionlabel_in_psmdbrestore.yaml +++ b/config/crd/patches/versionlabel_in_psmdbrestore.yaml @@ -4,6 +4,6 @@ metadata: name: perconaservermongodbrestores.psmdb.percona.com labels: app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 app.kubernetes.io/component: crd app.kubernetes.io/part-of: percona-server-mongodb-operator diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 5af13e5a68..7eafc17755 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbbackups.psmdb.percona.com spec: group: psmdb.percona.com @@ -284,7 +284,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbrestores.psmdb.percona.com spec: group: psmdb.percona.com @@ -571,7 +571,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbs.psmdb.percona.com spec: group: psmdb.percona.com diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 606fa6287b..aad196d7bd 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbbackups.psmdb.percona.com spec: group: psmdb.percona.com @@ -284,7 +284,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbrestores.psmdb.percona.com spec: group: psmdb.percona.com @@ -571,7 +571,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbs.psmdb.percona.com spec: group: psmdb.percona.com diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 81e6aade93..96bab990ba 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbbackups.psmdb.percona.com spec: group: psmdb.percona.com @@ -284,7 +284,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbrestores.psmdb.percona.com spec: group: psmdb.percona.com @@ -571,7 +571,7 @@ metadata: app.kubernetes.io/component: crd app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb-operator - app.kubernetes.io/version: v1.22.0 + app.kubernetes.io/version: v1.22.0-1 name: perconaservermongodbs.psmdb.percona.com spec: group: psmdb.percona.com diff --git a/pkg/version/version.go b/pkg/version/version.go index cdde224516..3b22516707 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -12,6 +12,33 @@ import ( //go:embed version.txt var version string +// Version returns the base semver version (X.Y.Z) used for CRVersion +// feature-gating comparisons. The subversion suffix (-N) is stripped +// because hashicorp/go-version treats hyphens as prerelease identifiers, +// which would break version comparison logic. func Version() string { + v := strings.TrimSpace(version) + // Strip the subversion suffix (-N) if present. + // The full version including subversion is in FullVersion(). + if idx := strings.LastIndex(v, "-"); idx > 0 { + // Only strip if the part after the last hyphen is numeric (our subversion). + suffix := v[idx+1:] + isNumeric := true + for _, c := range suffix { + if c < '0' || c > '9' { + isNumeric = false + break + } + } + if isNumeric { + return v[:idx] + } + } + return v +} + +// FullVersion returns the complete version string including the subversion +// suffix (e.g., "1.22.0-1"). Used for image tagging and display purposes. +func FullVersion() string { return strings.TrimSpace(version) } diff --git a/pkg/version/version.txt b/pkg/version/version.txt index 57807d6d0d..634b414049 100644 --- a/pkg/version/version.txt +++ b/pkg/version/version.txt @@ -1 +1 @@ -1.22.0 +1.22.0-1 diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index d81d416990..3b86458706 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -45,7 +45,7 @@ func TestCRDVersionLabel(t *testing.T) { if !slices.Contains(crdNames, crd.Name) { continue } - expectedVersion := "v" + version.Version() + expectedVersion := "v" + version.FullVersion() expectedLabels := naming.Labels() expectedLabels[naming.LabelKubernetesOperatorVersion] = expectedVersion expectedLabels[naming.LabelKubernetesComponent] = "crd"