Closed andrew-edgar closed 5 years ago
Using the latest Spruce CLI the following fails.
--- base.yml instance_groups: - name : api azs: - z1 - z2 instances: 2 vm_type: small --- ops.yml - type: replace path: /instance_groups/name=api:before value: azs: - z1 - z2 instances: 2 name: bits
When I run the spruce CLI i get this ...
➜ temp spruce merge --go-patch base.yml ops.yml ops.yml: Expected to find exactly one matching array item for path '/instance_groups/name=api:before' but found 0
When I use aviator (https://github.com/JulzDiverse/aviator) (which includes the spruce 1.16.2 library) and the correct aviator file as defined here ...
spruce: - base: base.yml go_patch: true merge: - with: files: - ops.yml to: final.yml
I get the correct "final.yml"
instance_groups: - azs: - z1 - z2 instances: 2 name: bits - azs: - z1 - z2 instances: 2 name: api vm_type: small
Also when using bosh int I get the correct value with the following command line ...
bosh int
bosh int base.yml -o ops.yml
This also failed in the spruce playground. looks like the ":before" syntax is NOT supported in the CLI
Looking into this further. I think you need to bump the go-patch vendored package you are using.
Using the latest Spruce CLI the following fails.
When I run the spruce CLI i get this ...
➜ temp spruce merge --go-patch base.yml ops.yml ops.yml: Expected to find exactly one matching array item for path '/instance_groups/name=api:before' but found 0
When I use aviator (https://github.com/JulzDiverse/aviator) (which includes the spruce 1.16.2 library) and the correct aviator file as defined here ...
I get the correct "final.yml"
Also when using
bosh int
I get the correct value with the following command line ...This also failed in the spruce playground. looks like the ":before" syntax is NOT supported in the CLI