Skip to content

[release-1.26] Fix yq expression syntax in configuration-converter#1526

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

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

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 78.62%. Comparing base (39446ea) to head (7d1b80d).
⚠️ Report is 1 commits behind head on release-1.26.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.26    #1526      +/-   ##
================================================
+ Coverage         78.17%   78.62%   +0.44%     
================================================
  Files                44       44              
  Lines              2227     2227              
================================================
+ Hits               1741     1751      +10     
+ Misses              374      368       -6     
+ Partials            112      108       -4     

☔ 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.

@MaxBab
Copy link
Copy Markdown
Collaborator

MaxBab commented Jan 20, 2026

/test e2e-kind-olm

@istio-testing istio-testing merged commit 3e7d72f into istio-ecosystem:release-1.26 Jan 20, 2026
18 checks passed
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Jan 20, 2026
* upstream/release-1.26:
  Fix yq expression syntax in configuration-converter (istio-ecosystem#1526)
  Automator: Update dependencies in istio-ecosystem/sail-operator@release-1.26 (istio-ecosystem#1523)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Jan 20, 2026
* upstream/release-1.26:
  Fix yq expression syntax in configuration-converter (istio-ecosystem#1526)
  Automator: Update dependencies in istio-ecosystem/sail-operator@release-1.26 (istio-ecosystem#1523)
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