-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
Different results from different yq versions. #1206
Comments
Checking the behavior of different versions I found that the problem appeared in release |
Hi @trainormg - thanks for raising the issue. Can you please provide me with sample |
Hi.
The results change, in the same way I described in the first comment, from yq <=4.15.1 and yq>=4.16.1. The sample files:
default:
val: default_value
default:
val: file2_default
boot:
val: boot_value |
Digging into this, I can replicate it. Until I work out what's going on and fix it, you can workaround the issue by adding a pipe:
|
Ok I understand what's happening now. When the expression is like this:
the Whereas the expression:
Because of the pipe operator, the The change in 4.16.1 was a fix to the collect operator - which as a side effect now does this. It does seem odd at first, but digging into it I think it's actually being consistent. Still I'm not satisfied as it's not intuitive - but if I revert the fix I did that will just cause a bunch of other issues. I'll sit on this for a bit and see if I (or anyone else) thinks of something clever to do... |
Describe the bug
The same eval-all expression returns different values in yq 4.9.8 and yq 4.25.1.
Command:
Result using yq 4.9.8:
my-tf-states-bucket-ew1
Result using yq 4.25.1 or 4.24.5:
Same expression without array index to extract a single value:
Result (the same with all the versions of yq already mentioned):
The expected result is to have the same return values for all the yq versions.
The text was updated successfully, but these errors were encountered: