Skip to content

[release-1.28] Fix yq expression syntax in configuration-converter#1524

Merged
istio-testing merged 1 commit intoistio-ecosystem:release-1.28from
istio-testing:cherry-pick-1519-to-release-1.28
Jan 20, 2026
Merged

[release-1.28] Fix yq expression syntax in configuration-converter#1524
istio-testing merged 1 commit intoistio-ecosystem:release-1.28from
istio-testing:cherry-pick-1519-to-release-1.28

Conversation

@istio-testing
Copy link
Copy Markdown
Collaborator

This is an automated cherry-pick of #1519

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>
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.38%. Comparing base (7995cfe) to head (e68fc2d).
⚠️ Report is 1 commits behind head on release-1.28.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@istio-testing istio-testing merged commit 4ec1e9f into istio-ecosystem:release-1.28 Jan 20, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants