Skip to content

ci: run helm unittest with internal release values - #1019

Draft
michaellzc wants to merge 2 commits into
mainfrom
plat-917-unittest-release-values
Draft

michaellzc wants to merge 2 commits into
mainfrom
plat-917-unittest-release-values

Conversation

@michaellzc

Copy link
Copy Markdown
Member

Internal releases point values.yaml at us-docker.pkg.dev/sourcegraph-images/internal and pin new image tags and chart versions. A unit test that asserts those defaults passes on its PR and fails only on the internal/release-* branch, which is how 8.2.0 broke (build #3210, fixed by #1011).

This adds a "Unit Tests with internal release values" step that rewrites the registry, the pinned defaultTags, and Chart.yaml versions with placeholders the way release.yaml does, then runs scripts/ci/helm-unittest.sh, so it reuses the chart list and needs neither sg nor registry access. It also fixes dataDirPermissionsInitContainer_test.yaml (#997, on main only), which the new step caught asserting the default registry and would have broken the next minor release.

Closes PLAT-917

Test plan

Ran the step's command from pipeline.yaml locally (helm v4.3.0, helm-unittest v1.0.2):

Tree Unit Tests Unit Tests with internal release values
main with the pre-#1011 migrator test from #966 pass, 280 tests fail: migrator_test.yaml, Expected to match: ^index.docker.io/sourcegraph/migrator: Actual: us-docker.pkg.dev/sourcegraph-images/internal/migrator:99.0.0@sha256:0000…, the same failure as #3210
main (643f7c0) pass, 281 tests fail: 3 tests in dataDirPermissionsInitContainer_test.yaml, Expected index.docker.io/sourcegraph/custom-postgres:test, Actual us-docker.pkg.dev/sourcegraph-images/internal/custom-postgres:test
this PR pass, 281 tests pass, Charts: 4 passed, Tests: 281 passed
  • On the v8.2.0 release base (10228c2^), the rewrite changes the same 9 files and the same 42 lines as the release's image and Chart.yaml commits (10228c2, 9968ea5).
  • A scratch test that hardcodes the current pinned tag (8.1.4873@sha256:1683…) passes Unit Tests and fails the new step.

michaellzc and others added 2 commits November 13, 2026 18:37
Internal releases rewrite sourcegraph.image.repository in values.yaml, so
asserting index.docker.io/sourcegraph fails on the release branch. Pin the
repository in the tests instead, as #1011 did for the migrator test.

Refs PLAT-917

Amp-Thread-ID: https://ampcode.com/threads/T-1c037f81-355a-4899-8ed6-27f80bc505a9
Co-authored-by: Amp <amp@ampcode.com>
Internal releases point values.yaml at the internal registry and pin new
image tags and chart versions, so a unit test that asserts the defaults
passes on its PR and fails on the release branch (8.2.0, build #3210).
Rerun the unit tests on every PR with placeholder values rewritten the
same way.

Refs PLAT-917

Amp-Thread-ID: https://ampcode.com/threads/T-1c037f81-355a-4899-8ed6-27f80bc505a9
Co-authored-by: Amp <amp@ampcode.com>
@github-actions

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant