From b28bd4f0da05dcc45358a0ac5eb2f1c8d5a0ae7c Mon Sep 17 00:00:00 2001 From: Rayhan Hossain Date: Fri, 20 Nov 2026 12:29:39 -0800 Subject: [PATCH 1/2] chore: release v1.2.1 with DocumentDB engine 1.0.1 as the default Security release. Move the default DocumentDB engine from 1.0.0 to 1.0.1: the 1.0.0 engine (extension schema 1.0-0) rebuilt on patched Debian packages, fixing zlib CVE-2026-85091 and CVE-2026-27171 (#504). - Default engine 1.0.0 -> 1.0.1: DEFAULT_DOCUMENTDB_TAG, chart documentDbVersion, sidecar-injector default gateway image, Helm test DOCUMENTDB_VERSION assertions, and CNPG golden files (image tags only). - Chart version/appVersion 1.2.0 -> 1.2.1 and Helm test image tags. - CHANGELOG 1.2.1 Security entry. - Docs: 1.2.1 in the version table and index; new upgrade-guide section explaining how clusters on earlier operators move to engine 1.0.1. The E2E schema-upgrade pair stays 0.117.0 -> 1.0.0: engine 1.0.1 has no schema change, so a 1.0.0 -> 1.0.1 schema test could never pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain --- CHANGELOG.md | 7 ++++++ .../v1/getting-started/before-you-start.md | 3 ++- .../operator-public-documentation/v1/index.md | 2 +- .../v1/operations/upgrades.md | 24 +++++++++++++++++++ .../internal/config/config.go | 2 +- .../internal/config/config_test.go | 2 +- operator/documentdb-helm-chart/Chart.yaml | 4 ++-- .../tests/02_sidecar_injector_test.yaml | 4 ++-- .../tests/03_wal_replica_test.yaml | 2 +- .../tests/09_operator_deployment_test.yaml | 6 ++--- operator/documentdb-helm-chart/values.yaml | 2 +- .../cnpg/testdata/golden/defaults.json | 4 ++-- .../cnpg/testdata/golden/env-overrides.json | 2 +- .../golden/explicit-component-resources.json | 4 ++-- .../cnpg/testdata/golden/recovery-backup.json | 4 ++-- .../cnpg/testdata/golden/recovery-pv.json | 4 ++-- .../replica-region-ignores-recovery.json | 4 ++-- operator/src/internal/utils/constants.go | 2 +- 18 files changed, 57 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca4f75f9..c0365a812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## [Unreleased] +## [1.2.1] - 2026-11-20 + +Security release. The default DocumentDB engine moves from `1.0.0` to `1.0.1`: the same engine (extension schema `1.0-0`) rebuilt on patched Debian packages. Unpinned clusters roll onto the new images when the operator is upgraded; there is no schema migration. The CRDs are unchanged from `1.2.0`; when upgrading from `1.1.x` or earlier, apply the `1.2.1` CRDs before `helm upgrade`. + +### Security +- Default DocumentDB engine `1.0.1` fixes the zlib vulnerabilities [CVE-2026-85091](https://nvd.nist.gov/vuln/detail/CVE-2026-85091) (High) and [CVE-2026-27171](https://nvd.nist.gov/vuln/detail/CVE-2026-27171) (Medium) present in the `documentdb`, `gateway` and `documentdb-combined` `1.0.0` images (#504). Clusters on earlier operators can move to `1.0.1` without an operator upgrade by setting `spec.documentDBVersion: "1.0.1"`, or the chart value `documentDbVersion=1.0.1`. See [Engine 1.0.1 security update](docs/operator-public-documentation/v1/operations/upgrades.md#engine-101-security-update). + ## [1.2.0] - 2026-11-19 Operator release for DocumentDB 1.0; the default DocumentDB engine stays at `1.0.0` (extension schema `1.0-0`), so only the operator, sidecar, CRDs and Helm chart change. The `DocumentDB`, `Backup` and `ScheduledBackup` resources graduate to the stable `documentdb.io/v1` API. **Apply the 1.2.0 CRDs before `helm upgrade`**; existing `documentdb.io/preview` resources and manifests keep working and existing clusters are not restarted. diff --git a/docs/operator-public-documentation/v1/getting-started/before-you-start.md b/docs/operator-public-documentation/v1/getting-started/before-you-start.md index e1f73d893..62546483d 100644 --- a/docs/operator-public-documentation/v1/getting-started/before-you-start.md +++ b/docs/operator-public-documentation/v1/getting-started/before-you-start.md @@ -91,13 +91,14 @@ The operator and the DocumentDB engine have separate version numbers. The Helm c | Operator (Helm chart) | Default DocumentDB engine | Status | |-----------------------|---------------------------|--------| +| `1.2.1` | `1.0.1` (extension schema `1.0-0`) | Generally available; security update: default engine images rebuilt on patched Debian packages | | `1.2.0` | `1.0.0` (extension schema `1.0-0`) | Generally available; graduates the CRDs to the stable `documentdb.io/v1` API (`preview` is deprecated but still served) | | `1.1.0` | `1.0.0` (extension schema `1.0-0`) | Generally available; adds the combined-image fallback for clusters without image volume support | | `1.0.0` | `1.0.0` (extension schema `1.0-0`) | Generally available | | `1.0.0-rc1` | `1.0-RC2` | Release candidate | | `0.3.0` | `0.110.0` | Preview | -Use operator `1.2.0` for DocumentDB 1.0. To move existing clusters to 1.0, see [Upgrading to DocumentDB 1.0](../operations/upgrades.md#upgrading-to-documentdb-10). +Use operator `1.2.1` for DocumentDB 1.0. To move existing clusters to 1.0, see [Upgrading to DocumentDB 1.0](../operations/upgrades.md#upgrading-to-documentdb-10). Engine `1.0.1` is the `1.0.0` engine (same extension schema `1.0-0`) rebuilt with security fixes; see [Engine 1.0.1 security update](../operations/upgrades.md#engine-101-security-update). ## Terminology diff --git a/docs/operator-public-documentation/v1/index.md b/docs/operator-public-documentation/v1/index.md index a25e078d7..1e061c6b6 100644 --- a/docs/operator-public-documentation/v1/index.md +++ b/docs/operator-public-documentation/v1/index.md @@ -7,7 +7,7 @@ DocumentDB is the engine powering vCore-based Azure Cosmos DB for MongoDB. Built When you deploy a DocumentDB cluster, the operator creates and manages PostgreSQL instances, the [DocumentDB Gateway](https://github.com/microsoft/documentdb/tree/main/pg_documentdb_gw), and supporting Kubernetes resources. The gateway enables you to connect with MongoDB-compatible drivers, APIs, and tools, while PostgreSQL serves as the underlying storage engine. !!! note - Operator `1.2.0` is generally available for DocumentDB 1.0. The stable API version is `documentdb.io/v1`; the earlier `documentdb.io/preview` version is deprecated but still served for existing resources. We welcome your feedback and contributions! + Operator `1.2.1` is generally available for DocumentDB 1.0. The stable API version is `documentdb.io/v1`; the earlier `documentdb.io/preview` version is deprecated but still served for existing resources. We welcome your feedback and contributions! ## Quickstart diff --git a/docs/operator-public-documentation/v1/operations/upgrades.md b/docs/operator-public-documentation/v1/operations/upgrades.md index cf930dfe3..91bf84d30 100644 --- a/docs/operator-public-documentation/v1/operations/upgrades.md +++ b/docs/operator-public-documentation/v1/operations/upgrades.md @@ -340,6 +340,30 @@ Whether you can roll back depends on whether the schema has been updated: !!! tip This is why the default two-phase mode exists — it gives you a rollback-safe window before committing the schema change. Always back up before upgrading, and validate the new binary before setting `schemaVersion`. +### Engine 1.0.1 security update + +DocumentDB engine `1.0.1` is the `1.0.0` engine rebuilt on patched Debian packages. It fixes the zlib vulnerabilities [CVE-2026-85091](https://nvd.nist.gov/vuln/detail/CVE-2026-85091) and [CVE-2026-27171](https://nvd.nist.gov/vuln/detail/CVE-2026-27171) in the `documentdb`, `gateway` and `documentdb-combined` `1.0.0` images. The extension schema is unchanged (`1.0-0`), so moving to `1.0.1` is a rolling restart with no schema migration. + +Operator `1.2.1` and later deploy `1.0.1` by default. Earlier operators (`1.0.x`, `1.1.x`, `1.2.0`) default to `1.0.0`; you can move to `1.0.1` without upgrading the operator: + +- **One cluster:** set `spec.documentDBVersion` to `1.0.1`: + + ```bash + kubectl patch documentdb my-cluster -n default \ + --type merge -p '{"spec":{"documentDBVersion":"1.0.1"}}' + ``` + +- **Every cluster that doesn't pin `spec.documentDBVersion`:** change the chart's default engine and keep your current chart version: + + ```bash + helm upgrade documentdb-operator oci://ghcr.io/documentdb/documentdb-operator \ + --version \ + --namespace documentdb-operator \ + --reuse-values --set documentDbVersion=1.0.1 --wait + ``` + +If a cluster sets `spec.image.documentDB` or `spec.image.gateway`, change those tags to `1.0.1` as well; explicit images take precedence. Don't set `spec.schemaVersion: "1.0.1"`: engine `1.0.1` has no schema change. + ### Upgrading to DocumentDB 1.0 Run DocumentDB 1.0 on operator `1.0.0`, the release tested with it. Before upgrading the operator, pin `spec.documentDBVersion` on every cluster to the version it runs now (see the warning in [Upgrading the Operator](#upgrading-the-operator)), and remove `schemaVersion: "auto"` so nothing migrates before you choose to. Then upgrade the operator and move each cluster: diff --git a/operator/cnpg-plugins/sidecar-injector/internal/config/config.go b/operator/cnpg-plugins/sidecar-injector/internal/config/config.go index 720813665..2251a0225 100644 --- a/operator/cnpg-plugins/sidecar-injector/internal/config/config.go +++ b/operator/cnpg-plugins/sidecar-injector/internal/config/config.go @@ -292,7 +292,7 @@ func (config *Configuration) applyDefaults() { // Set defaults if config.GatewayImage == "" { // NOTE: Keep in sync with operator/src/internal/utils/constants.go:DEFAULT_GATEWAY_IMAGE - config.GatewayImage = "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + config.GatewayImage = "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" } if config.GatewayImagePullPolicy == "" { config.GatewayImagePullPolicy = corev1.PullIfNotPresent diff --git a/operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go b/operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go index f60ab5b15..884a6534b 100644 --- a/operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go +++ b/operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go @@ -36,7 +36,7 @@ func TestApplyDefaults(t *testing.T) { t.Run("sets default gateway image when empty", func(t *testing.T) { config := &Configuration{} config.applyDefaults() - expected := "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + expected := "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" if config.GatewayImage != expected { t.Errorf("expected %q, got %q", expected, config.GatewayImage) } diff --git a/operator/documentdb-helm-chart/Chart.yaml b/operator/documentdb-helm-chart/Chart.yaml index 8c01709f9..877241f24 100644 --- a/operator/documentdb-helm-chart/Chart.yaml +++ b/operator/documentdb-helm-chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: documentdb-operator -version: 1.2.0 +version: 1.2.1 description: A Helm chart for deploying the DocumentDB operator # The operator prefers the Kubernetes ImageVolume feature (GA in 1.35, beta and # opt-in via feature gate in 1.33/1.34, and needs containerd >= 2.1 or @@ -11,7 +11,7 @@ description: A Helm chart for deploying the DocumentDB operator kubeVersion: ">= 1.32.0-0" # appVersion controls the default image tag for operator, sidecar, and wal-replica images. # Database image versions (documentdb extension + gateway) are controlled by documentDbVersion in values.yaml. -appVersion: "1.2.0" +appVersion: "1.2.1" dependencies: - name: cloudnative-pg version: "0.28.3" diff --git a/operator/documentdb-helm-chart/tests/02_sidecar_injector_test.yaml b/operator/documentdb-helm-chart/tests/02_sidecar_injector_test.yaml index bfb41ba46..f114f0e57 100644 --- a/operator/documentdb-helm-chart/tests/02_sidecar_injector_test.yaml +++ b/operator/documentdb-helm-chart/tests/02_sidecar_injector_test.yaml @@ -64,7 +64,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "ghcr.io/documentdb/documentdb-kubernetes-operator/sidecar:1.2.0" + value: "ghcr.io/documentdb/documentdb-kubernetes-operator/sidecar:1.2.1" - it: should use a custom sidecar image tag when set set: @@ -82,7 +82,7 @@ tests: path: spec.template.spec.containers[0].env content: name: DOCUMENTDB_VERSION - value: "1.0.0" + value: "1.0.1" - it: should have empty env when documentDbVersion is empty set: diff --git a/operator/documentdb-helm-chart/tests/03_wal_replica_test.yaml b/operator/documentdb-helm-chart/tests/03_wal_replica_test.yaml index 8d77e3622..5ecd71a36 100644 --- a/operator/documentdb-helm-chart/tests/03_wal_replica_test.yaml +++ b/operator/documentdb-helm-chart/tests/03_wal_replica_test.yaml @@ -95,7 +95,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "ghcr.io/documentdb/documentdb-kubernetes-operator/wal-replica:1.2.0" + value: "ghcr.io/documentdb/documentdb-kubernetes-operator/wal-replica:1.2.1" - it: should use a custom wal-replica image tag when set set: diff --git a/operator/documentdb-helm-chart/tests/09_operator_deployment_test.yaml b/operator/documentdb-helm-chart/tests/09_operator_deployment_test.yaml index 4329b6667..2c10b0aba 100644 --- a/operator/documentdb-helm-chart/tests/09_operator_deployment_test.yaml +++ b/operator/documentdb-helm-chart/tests/09_operator_deployment_test.yaml @@ -46,7 +46,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "ghcr.io/documentdb/documentdb-kubernetes-operator/operator:1.2.0" + value: "ghcr.io/documentdb/documentdb-kubernetes-operator/operator:1.2.1" - it: should use a custom image tag when set set: @@ -71,7 +71,7 @@ tests: asserts: - equal: path: spec.template.spec.containers[0].image - value: "mcr.microsoft.com/documentdb/documentdb-kubernetes-operator/operator:1.2.0" + value: "mcr.microsoft.com/documentdb/documentdb-kubernetes-operator/operator:1.2.1" - it: should use a per-component full-ref repository verbatim, ignoring image.registry set: @@ -312,7 +312,7 @@ tests: path: spec.template.spec.containers[0].env content: name: DOCUMENTDB_VERSION - value: "1.0.0" + value: "1.0.1" - it: should omit DOCUMENTDB_VERSION env when documentDbVersion is empty set: diff --git a/operator/documentdb-helm-chart/values.yaml b/operator/documentdb-helm-chart/values.yaml index d33440489..69fe152b7 100644 --- a/operator/documentdb-helm-chart/values.yaml +++ b/operator/documentdb-helm-chart/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 # which determines the default documentdb extension and gateway image tags at runtime. # This version is INDEPENDENT of Chart.appVersion (which controls operator/sidecar image tags). # When empty, the operator falls back to its compiled-in defaults (see constants.go). -documentDbVersion: "1.0.0" +documentDbVersion: "1.0.1" # How the DocumentDB extension reaches PostgreSQL pods. Decided once, when a # DocumentDB cluster is created; existing clusters keep their mode. diff --git a/operator/src/internal/cnpg/testdata/golden/defaults.json b/operator/src/internal/cnpg/testdata/golden/defaults.json index 00bd44d90..c5a88a060 100644 --- a/operator/src/internal/cnpg/testdata/golden/defaults.json +++ b/operator/src/internal/cnpg/testdata/golden/defaults.json @@ -59,7 +59,7 @@ { "name": "documentdb", "image": { - "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0" + "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1" }, "extension_control_path": [ "share" @@ -114,7 +114,7 @@ "enabled": true, "parameters": { "documentDbCredentialSecret": "documentdb-credentials", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" } } ] diff --git a/operator/src/internal/cnpg/testdata/golden/env-overrides.json b/operator/src/internal/cnpg/testdata/golden/env-overrides.json index 0a0caa5ea..e80e617e3 100644 --- a/operator/src/internal/cnpg/testdata/golden/env-overrides.json +++ b/operator/src/internal/cnpg/testdata/golden/env-overrides.json @@ -133,7 +133,7 @@ "documentDbCredentialSecret": "documentdb-credentials", "gatewayCpuLimit": "1", "gatewayCpuRequest": "1", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0", + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1", "gatewayImagePullPolicy": "Never", "gatewayMemoryLimit": "1536Mi", "gatewayMemoryRequest": "1536Mi", diff --git a/operator/src/internal/cnpg/testdata/golden/explicit-component-resources.json b/operator/src/internal/cnpg/testdata/golden/explicit-component-resources.json index ae138ab8d..b42f86b40 100644 --- a/operator/src/internal/cnpg/testdata/golden/explicit-component-resources.json +++ b/operator/src/internal/cnpg/testdata/golden/explicit-component-resources.json @@ -59,7 +59,7 @@ { "name": "documentdb", "image": { - "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0" + "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1" }, "extension_control_path": [ "share" @@ -128,7 +128,7 @@ "documentDbCredentialSecret": "documentdb-credentials", "gatewayCpuLimit": "500m", "gatewayCpuRequest": "500m", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0", + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1", "gatewayMemoryLimit": "1Gi", "gatewayMemoryRequest": "1Gi", "otelCollectorImage": "otel/opentelemetry-collector-contrib:0.149.0", diff --git a/operator/src/internal/cnpg/testdata/golden/recovery-backup.json b/operator/src/internal/cnpg/testdata/golden/recovery-backup.json index c70764342..13107ebac 100644 --- a/operator/src/internal/cnpg/testdata/golden/recovery-backup.json +++ b/operator/src/internal/cnpg/testdata/golden/recovery-backup.json @@ -59,7 +59,7 @@ { "name": "documentdb", "image": { - "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0" + "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1" }, "extension_control_path": [ "share" @@ -112,7 +112,7 @@ "enabled": true, "parameters": { "documentDbCredentialSecret": "documentdb-credentials", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" } } ] diff --git a/operator/src/internal/cnpg/testdata/golden/recovery-pv.json b/operator/src/internal/cnpg/testdata/golden/recovery-pv.json index 20ab1379f..c8cc14953 100644 --- a/operator/src/internal/cnpg/testdata/golden/recovery-pv.json +++ b/operator/src/internal/cnpg/testdata/golden/recovery-pv.json @@ -59,7 +59,7 @@ { "name": "documentdb", "image": { - "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0" + "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1" }, "extension_control_path": [ "share" @@ -116,7 +116,7 @@ "enabled": true, "parameters": { "documentDbCredentialSecret": "documentdb-credentials", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" } } ] diff --git a/operator/src/internal/cnpg/testdata/golden/replica-region-ignores-recovery.json b/operator/src/internal/cnpg/testdata/golden/replica-region-ignores-recovery.json index 00bd44d90..c5a88a060 100644 --- a/operator/src/internal/cnpg/testdata/golden/replica-region-ignores-recovery.json +++ b/operator/src/internal/cnpg/testdata/golden/replica-region-ignores-recovery.json @@ -59,7 +59,7 @@ { "name": "documentdb", "image": { - "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0" + "reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1" }, "extension_control_path": [ "share" @@ -114,7 +114,7 @@ "enabled": true, "parameters": { "documentDbCredentialSecret": "documentdb-credentials", - "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0" + "gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1" } } ] diff --git a/operator/src/internal/utils/constants.go b/operator/src/internal/utils/constants.go index 2f5de346d..fc2c45714 100644 --- a/operator/src/internal/utils/constants.go +++ b/operator/src/internal/utils/constants.go @@ -68,7 +68,7 @@ const ( // DEFAULT_DOCUMENTDB_TAG is the default tag for the extension and gateway // images when neither an explicit image nor a version is supplied. - DEFAULT_DOCUMENTDB_TAG = "1.0.0" + DEFAULT_DOCUMENTDB_TAG = "1.0.1" // DEFAULT_DOCUMENTDB_IMAGE is the extension image used in ImageVolume mode. DEFAULT_DOCUMENTDB_IMAGE = DOCUMENTDB_EXTENSION_IMAGE_REPO + ":" + DEFAULT_DOCUMENTDB_TAG From e74a9f1cb91ae40c0c8b815fd17eafd551a2cf67 Mon Sep 17 00:00:00 2001 From: Rayhan Hossain Date: Fri, 20 Nov 2026 13:14:59 -0800 Subject: [PATCH 2/2] test(e2e): read the expected extension version from the published image The combined-image job derived the expected pg_extension version from the engine version string (1.0.1 -> 1.0-1). Engine 1.0.1 is a rebuild of 1.0.0 that keeps extension 1.0-0, so the published-image check failed on a correct image. For published images, read default_version from the same release's ImageVolume extension image (documentdb:) instead, which also checks that the combined and ImageVolume images ship the same extension. PR-built images keep the version mapping: they're built from that version and the build job already checks the packaged schema matches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain --- .github/workflows/test-e2e.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index ab027d795..f7c5b47ca 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -749,6 +749,19 @@ jobs: fi # Pin the version so the operator resolves the released combined tag. SPEC_IMAGES="documentDBVersion: \"${VERSION}\"" + # Expect the extension shipped in the same release's ImageVolume + # image. A release can rebuild an engine without changing its + # schema (1.0.1 ships extension 1.0-0), so the version string + # alone doesn't determine the extension version. + EXT_CTR=$(docker create --platform "linux/${ARCH}" \ + "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:${VERSION}" /none) + EXT_VERSION=$(docker export "$EXT_CTR" | tar -xO share/extension/documentdb.control \ + | sed -nE "s/^default_version[[:space:]]*=[[:space:]]*'([^']+)'.*/\1/p") + docker rm "$EXT_CTR" >/dev/null + if [[ -z "$EXT_VERSION" ]]; then + echo "::error::could not read default_version from documentdb:${VERSION} (linux/${ARCH})" + exit 1 + fi else VERSION="${EXT_IMAGE_TAG}" IMAGE="${REPO}:18-${EXT_IMAGE_TAG}-${ARCH}" @@ -762,13 +775,13 @@ jobs: # The operator reuses the release tag of spec.image.documentDB for # the combined image, which resolves to the loaded image. SPEC_IMAGES="image: {documentDB: \"${DOCUMENTDB_IMAGE_RESOLVED}\", gateway: \"${GATEWAY_IMAGE_RESOLVED}\"}" + # PR-built images are built from this version, and the build job + # checks the packaged schema matches it (1.0.0 -> 1.0-0, RCs such + # as 1.0-RC2 -> 1.0-0). Strip the CI run suffix from per-run tags. + EXT_VERSION=$(RAW_VERSION="${VERSION%-test-*}" DOCUMENTDB_GATEWAY_IMAGE_REPO=unused \ + bash .github/scripts/resolve-documentdb-version.sh | sed -n 's/^documentdb_version_dash=//p') fi echo "Expected combined image: ${IMAGE} (linux/${ARCH})" - # The pg_extension version is the resolver's documentdb_version_dash - # (1.0.0 -> 1.0-0, RCs such as 1.0-RC2 -> 1.0-0). Strip the CI run - # suffix from per-run tags first. - EXT_VERSION=$(RAW_VERSION="${VERSION%-test-*}" DOCUMENTDB_GATEWAY_IMAGE_REPO=unused \ - bash .github/scripts/resolve-documentdb-version.sh | sed -n 's/^documentdb_version_dash=//p') { echo "EXPECTED_IMAGE=${IMAGE}" echo "SPEC_IMAGES=${SPEC_IMAGES}"