Repository navigation
ci: run helm unittest with internal release values - #1019
Draft
michaellzc wants to merge 2 commits into
Draft
michaellzc wants to merge 2 commits into
michaellzc wants to merge 2 commits into
Conversation
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>
This branch has not been deployed
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.
Internal releases point
values.yamlatus-docker.pkg.dev/sourcegraph-images/internaland pin new image tags and chart versions. A unit test that asserts those defaults passes on its PR and fails only on theinternal/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, andChart.yamlversions with placeholders the wayrelease.yamldoes, then runsscripts/ci/helm-unittest.sh, so it reuses the chart list and needs neithersgnor registry access. It also fixesdataDirPermissionsInitContainer_test.yaml(#997, onmainonly), 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.yamllocally (helm v4.3.0, helm-unittest v1.0.2):mainwith the pre-#1011 migrator test from #966migrator_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 #3210main(643f7c0)dataDirPermissionsInitContainer_test.yaml,Expected index.docker.io/sourcegraph/custom-postgres:test, Actual us-docker.pkg.dev/sourcegraph-images/internal/custom-postgres:testCharts: 4 passed,Tests: 281 passed10228c2^), the rewrite changes the same 9 files and the same 42 lines as the release's image andChart.yamlcommits (10228c2,9968ea5).8.1.4873@sha256:1683…) passes Unit Tests and fails the new step.