Repository navigation
fix(executor): render tolerations as json - #902
Open
jojosenthusiast wants to merge 4 commits into
Open
jojosenthusiast wants to merge 4 commits into
jojosenthusiast wants to merge 4 commits into
Conversation
Apply the tolerations fix to the four sibling fields with the same bug (requiredAffinityMatchExpressions, requiredAffinityMatchFields, pod.affinity, pod.antiAffinity) through a shared executor.jsonValue helper. Strings are rendered exactly as before so the pre-escaped JSON form documented in values.yaml keeps working; the previous commit's | quote double-escaped those backslashes and broke existing deployments. Document the YAML list form, add a CHANGELOG entry, and drop the CI script change in favour of the pending all-charts unittest branch. Amp-Thread-ID: https://ampcode.com/threads/T-01a156fd-e08b-76fb-9aef-4a705912beac 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.
Fixes #349
Reproduction
When
executor.kubernetesJob.node.tolerationsis provided as a YAML list, the executor ConfigMap rendered it as a Go-stylemap[...]string instead of JSON. The executor then fails to parseEXECUTOR_KUBERNETES_NODE_TOLERATIONS.Fix summary
toJson | quote.Tests run
git diff --check upstream/main...HEAD→ passsh -n scripts/ci/helm-unittest.sh→ passhelm unittest -q charts/sourcegraph-executor/k8s→ pass, 10/10 testshelm lint charts/sourcegraph-executor/k8s→ pass, 1 chart linted, 0 failed (existing metadata-name warnings only).buildkite/pipeline.yamlrunsscripts/ci/helm-unittest.sh, and the script now runshelm unittest -q charts/sourcegraph-executor/k8sRisk
Low. Defaults remain unchanged and string inputs are preserved; YAML list/map inputs now render as JSON for the executor.
Non-goals