-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ingestor): resolve the spawned tag per environment (:dev / :stg) #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
901eb74
feat(ingestor): resolve the spawned tag per environment (backend#1360)
LukasWodka 6c207d6
fix(review): normalize CLIENT_ENV aliases before the channel lookup
LukasWodka b87a4d4
fix(review): one CLIENT_ENV normalizer, and unbreak the digest resolver
LukasWodka 8a5b82d
style(script): keep each yq-free reader with its own header comment
LukasWodka fa74943
fix: bump the chart to 1.9.9, and strip comments before quotes in the…
LukasWodka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| suite: ingestor per-environment channel tag (backend#1360) | ||
| templates: | ||
| - templates/jobs-manager-deployment.yaml | ||
| release: | ||
| name: stg | ||
| namespace: tracebloc | ||
| set: | ||
| clientId: "test-id" | ||
| clientPassword: "test" | ||
| tests: | ||
| - it: dev edges spawn the :dev internal channel | ||
| set: | ||
| env.CLIENT_ENV: dev | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "dev" | ||
|
|
||
| - it: staging edges spawn the :stg internal channel | ||
| set: | ||
| env.CLIENT_ENV: stg | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "stg" | ||
|
|
||
| - it: prod stays on the semver float, never a :prod tag (none is published) | ||
| set: | ||
| env.CLIENT_ENV: prod | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.7" | ||
|
|
||
| - it: defaults to the prod float when CLIENT_ENV is unset | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.7" | ||
|
|
||
| - it: an explicit tag override wins over the channel for every environment | ||
| set: | ||
| env.CLIENT_ENV: dev | ||
| images.ingestor.tag: "0.8.0" | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.8.0" | ||
|
|
||
| - it: an unknown CLIENT_ENV falls back to the literal rather than rendering empty | ||
| set: | ||
| env.CLIENT_ENV: produktion | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.7" | ||
|
|
||
| - it: renders for a release predating channelTags (--reuse-values replay) | ||
| set: | ||
| env.CLIENT_ENV: dev | ||
| images.ingestor.channelTags: null | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.7" | ||
|
|
||
| - it: prod still pins by digest, so the tag is not the spawn target there | ||
| set: | ||
| env.CLIENT_ENV: prod | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_DIGEST | ||
| value: "sha256:9098b3c9b83951f825e262d6ff1e9c47c46c5b5cafbfc8fef1ed82ccbadebb24" | ||
|
|
||
| - it: dev gets no digest, so it spawns by the floating channel tag | ||
| set: | ||
| env.CLIENT_ENV: dev | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_DIGEST | ||
| value: "" | ||
|
|
||
| - it: the documented alias "staging" resolves to the stg channel, not the prod float | ||
| # Review catch (#494): the schema documents dev|staging|prod while these | ||
| # keys are dev|stg|prod, so CLIENT_ENV=staging previously missed | ||
| # channelTags and silently fell back to 0.7 while client-runtime | ||
| # normalized it to stg at runtime — the split-brain of client-runtime#227. | ||
| set: | ||
| env.CLIENT_ENV: staging | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "stg" | ||
|
|
||
| - it: the documented alias "development" resolves to the dev channel | ||
| set: | ||
| env.CLIENT_ENV: development | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "dev" | ||
|
|
||
| - it: the documented alias "production" resolves to the prod float | ||
| set: | ||
| env.CLIENT_ENV: production | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_TAG | ||
| value: "0.7" | ||
|
|
||
| - it: the "production" alias keeps the prod reproducibility pin | ||
| # Bugbot catch (#494): the first alias fix normalized inside | ||
| # tracebloc.ingestorTag only, so CLIENT_ENV=production got the prod float | ||
| # tag while tracebloc.ingestorDigest still compared the RAW value to | ||
| # "prod" and returned nothing — silently dropping the pin | ||
| # (backend#1028/#1245) on an edge that looked correctly configured. Both | ||
| # helpers now share tracebloc.clientEnv. | ||
| set: | ||
| env.CLIENT_ENV: production | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].env | ||
| content: | ||
| name: INGESTOR_IMAGE_DIGEST | ||
| value: "sha256:9098b3c9b83951f825e262d6ff1e9c47c46c5b5cafbfc8fef1ed82ccbadebb24" |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.