ci: pin documentdb build to chart documentDbVersion#373
ci: pin documentdb build to chart documentDbVersion#373WentingWu666666 wants to merge 5 commits intodocumentdb:mainfrom
Conversation
The build-packages job currently checks out documentdb/documentdb@main, which exposes the operator repo's CI to unstable regression tests on upstream HEAD (e.g. setUnion / setDifference projection diffs caused by missing ORDER BY in regress expected output). The chart's values.yaml already pins documentDbVersion (currently 0.109.0), and that version is what the operator actually ships and validates. Read documentDbVersion from values.yaml at workflow time and translate it to the matching upstream tag (e.g. 0.109.0 -> v0.109-0). The caller-supplied documentdb_ref input still takes precedence for ad-hoc dispatches; the empty default now means 'derive from chart', not 'use main'. This keeps CI builds in lock-step with the shipped chart version and avoids whole classes of upstream-flake outages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Without this, edits to the reusable build workflow don't run through E2E and ship untested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
The gateway packaging script was moved upstream from ./packaging/build_gateway_packages.sh to ./packaging/gateway/build_gateway_packages.sh. With the workflow now pinned to the chart's documentDbVersion (e.g. v0.109-0), the older path is what's actually present at that tag. Probe for either path so this step works against both old tags and main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
Operator e2e tests on main require server behavior present in documentdb v0.110-0; v0.109-0 fails CRUD/update_ops with duplicate-key on _id_ index. Aligns chart with the version e2e expects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (ci); effort from diff stats (53+7 LOC, 3 files); LLM: Fixes a CI flakiness/red caused by unpinned upstream If a label is wrong, remove it manually and ping |
There was a problem hiding this comment.
Pull request overview
Pins the DocumentDB source checkout used by the CI package build to the Helm chart’s default documentDbVersion, so CI builds/tests the same upstream tag the chart ships (while keeping a caller override available).
Changes:
- Bump the chart default
documentDbVersionto0.110.0. - Update
test-build-and-package.ymlto derive the DocumentDB git ref fromvalues.yaml(translating0.x.y→v0.x-y) unlessdocumentdb_refis explicitly provided. - Extend E2E workflow path filters to include changes to the reusable build-and-package workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| operator/documentdb-helm-chart/values.yaml | Updates the chart’s default DocumentDB version used for image/tag selection. |
| .github/workflows/test-e2e.yml | Ensures E2E runs when the reusable build workflow changes. |
| .github/workflows/test-build-and-package.yml | Derives the DocumentDB checkout ref from the chart version and adds a gateway script path fallback. |
| VERSION=$(grep -E '^documentDbVersion:' "$VALUES_FILE" \ | ||
| | sed -E 's/^documentDbVersion:[[:space:]]*"?([^"[:space:]]+)"?.*/\1/') | ||
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "ERROR: failed to parse documentDbVersion from $VALUES_FILE (got '$VERSION')" >&2 |
What
Pin the
build-packagesjob's documentdb checkout to the chart's defaultdocumentDbVersioninstead of upstreammain.Why
The
build-packagesjob intest-build-and-package.ymlcurrently builds documentdb fromdocumentdb/documentdb@main. That checkout includes the upstream regression suite (make check/override_dh_auto_testindebian/rules), which has rows that flip success/fail per upstream SHA most recently visible assetUnion/setDifferenceprojection diffs caused by missingORDER BYin regress expected output. See PR #364 for the resulting CI red.The chart's
values.yamlalready pins the database version it ships (documentDbVersion: 0.109.0). Building from that exact tag rather than from a movingmainmeans the operator-repo CI is testing the same documentdb the chart actually deploys, and immutable tags don't have the upstream-flake exposure.What changed
test-build-and-package.ymlnow readsdocumentDbVersionfrom the chartvalues.yamlat workflow time and translates it to the upstream tag format (0.109.0 -> v0.109-0) before checking out documentdb.documentdb_refinput is preserved as a caller-supplied override; its default goes from'main'to empty (which now means "derive from chart").Why this is preferable to skipping regression tests
Earlier mitigation attempts on PR #364 disabled the upstream regression suite outright. That bypasses real signal and isn't the right long-term posture for the operator repo. Pinning to the chart's shipped version keeps the regression suite running, on a known-good immutable tag.
Validation
documentDbVersionis bumped in a future PR (e.g. PR chore: bump default DocumentDB version to 0.110.0 #364 ->0.110.0), this workflow auto-follows; no separate workflow change is required.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com