Repository navigation
migrator: decouple image unit test from release-rewritten values - #1011
Merged
Merged
Conversation
Releases rewrite sourcegraph.image.repository and migrator.image.defaultTag in values.yaml to the internal registry for internal builds, so asserting the chart default index.docker.io image failed every internal release build (first hit by 8.2.0). Pin the repository and tag in the test instead, matching charts/sourcegraph/tests/imageRepository_test.yaml. Amp-Thread-ID: https://ampcode.com/threads/T-ca0eafc9-7175-4232-bd12-abd4f121842f Co-authored-by: Amp <amp@ampcode.com>
kalanchan
approved these changes
Nov 11, 2026
michaellzc
added a commit
that referenced
this pull request
Nov 11, 2026
…itten values (#1012) Backport of #1011 to `8.2.x`. The 8.2.0 helm release needs it: `DeployRepoReleaseCreate` failed on this test ([build #3210](https://buildkite.com/sourcegraph/deploy-sourcegraph-helm/builds/3210)), and helm promotion is on hold until it's fixed. It was cherry-picked cleanly with `-x`. See #1011 for the root cause. ## Test plan `helm unittest` on this branch, for the 4 CI charts: `Charts: 4 passed`, `Tests: 254 passed`. The same fix applied to `internal/release-v8.2.0` also passes (254 tests); without it, `migrator` fails the same way as #3210. Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every internal release build fails the
sourcegraph-migratorchart unit test. The release tooling rewritessourcegraph.image.repository(and the migratordefaultTag) invalues.yamlto the internal registry, but the test asserted the chart defaultindex.docker.io/sourcegraph/migrator. The test came from #966, and 8.2.0 is the first release branch that has it, so the 8.2.0DeployRepoReleaseCreatehelm workflow failed on build #3210.This PR removes that assertion from the defaults test and adds a test that pins the repository and tag with
set:, the same waycharts/sourcegraph/tests/imageRepository_test.yamldoes. It still checks how the image is built, but no longer depends on the values the release tooling rewrites.Test plan
helm unittest(helm v4.3.0, helm-unittest v1.0.2) on the 4 charts thatscripts/ci/helm-unittest.shruns:internal/release-v8.2.0before the fix:migratorFAIL,Expected to match: ^index.docker.io/sourcegraph/migrator: Actual: us-docker.pkg.dev/sourcegraph-images/internal/migrator:8.2.0@sha256:28ab…, the same as build #3210.internal/release-v8.2.0with the fix:Charts: 4 passed,Tests: 254 passed.mainwith the fix:Charts: 4 passed,Tests: 259 passed.sourcegraph.imagehelper makes the new test fail:Expected my.registry.example/sg/migrator:test, Actual index.docker.io/sourcegraph/migrator:test.