[release-1.28] Fix yq expression syntax in configuration-converter#1524
Merged
istio-testing merged 1 commit intoistio-ecosystem:release-1.28from Jan 20, 2026
Conversation
The validate_spec_components function in configuration-converter.sh was failing with "Error: bad expression, please check expression syntax" on extracting "components" keys. The original command attempted to delete non-"enabled" keys using: del(.spec.components.[] | keys[] | select(. != "enabled")) This failed because: - `.spec.components.[]` incorrectly tries to iterate over object values - `keys[]` syntax doesn't work in this pipeline context in yq v4 - `select(. != "enabled")` references values instead of key names - No proper context management for applying deletions back to document Replaced with proper yq v4 syntax using the `with()` function. Signed-off-by: Maxim Babushkin <mbabushk@redhat.com>
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.28 #1524 +/- ##
================================================
- Coverage 81.03% 80.38% -0.66%
================================================
Files 44 44
Lines 2299 2299
================================================
- Hits 1863 1848 -15
- Misses 321 330 +9
- Partials 115 121 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fjglira
approved these changes
Jan 20, 2026
4ec1e9f
into
istio-ecosystem:release-1.28
18 of 19 checks passed
rafaelvzago
pushed a commit
to rafaelvzago/sail-operator
that referenced
this pull request
Jan 22, 2026
…1524) The validate_spec_components function in configuration-converter.sh was failing with "Error: bad expression, please check expression syntax" on extracting "components" keys. The original command attempted to delete non-"enabled" keys using: del(.spec.components.[] | keys[] | select(. != "enabled")) This failed because: - `.spec.components.[]` incorrectly tries to iterate over object values - `keys[]` syntax doesn't work in this pipeline context in yq v4 - `select(. != "enabled")` references values instead of key names - No proper context management for applying deletions back to document Replaced with proper yq v4 syntax using the `with()` function. Signed-off-by: Maxim Babushkin <mbabushk@redhat.com> Co-authored-by: Maxim Babushkin <mbabushk@redhat.com> Signed-off-by: Rafael Zago <rafaelvzago@gmail.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.
This is an automated cherry-pick of #1519