Fleet version: v4.84.0-rc.2604222001
Found Fleet version: v4.84.0-rc.2604222001
π₯ Actual behavior
When a string field value (e.g., VPP app display_name) contains a $ character followed by alphanumeric characters, the round-trip UI β generate-gitops β gitops is broken.
-
A value set via the Fleet UI (e.g., display_name: ($($U$J@) is stored in the DB.
-
fleetctl generate-gitops outputs this value literally into the yml file.
-
fleetctl gitops attempts to apply the file and interprets $U and $J as environment variable references, failing with:
-
No working escape mechanism found:
$$ produces more errors (5 instead of 2), as gitops treats $$ as a separate var reference
- Single-quoting the value does not help
- Double-quoting the value does not help
No working escape was found: $$ produces more errors, and single/double quoting does not help.
UPDATE: @noahtalerman: this is how to escape:
(https://fleetdm.com/docs/configuration/yaml-files#variables:~:text=)-,can%20be%20escaped,-so%20it%27s%20not)
π οΈ Expected behavior
Update the error message:
* environment variable U not set; if you intended the literal string $U then please escape it as \$U.
π§βπ» Steps to reproduce
- In the Fleet UI, set a string field (e.g., VPP app
display_name) to a value containing $ followed by alphanumeric chars β e.g., ($($U$J@
- Run
fleetctl generate-gitops --dir /tmp/test-export --force
- Run
fleetctl gitops -f /tmp/test-export/fleets/<team>.yml --dry-run
- Observe failure with
environment variable "<X>" not set
π―οΈ More info
Discovered while verifying #33106. Affects any text field that ends up in gitops yml output (display names, descriptions, URLs, passwords, queries, etc.).
Fleet version: v4.84.0-rc.2604222001
Found Fleet version: v4.84.0-rc.2604222001
π₯ Actual behavior
When a string field value (e.g., VPP app
display_name) contains a$character followed by alphanumeric characters, the round-trip UI βgenerate-gitopsβgitopsis broken.A value set via the Fleet UI (e.g.,
display_name: ($($U$J@) is stored in the DB.fleetctl generate-gitopsoutputs this value literally into the yml file.fleetctl gitopsattempts to apply the file and interprets$Uand$Jas environment variable references, failing with:No working escape mechanism found:
$$produces more errors (5 instead of 2), as gitops treats$$as a separate var referenceNo working escape was found:
$$produces more errors, and single/double quoting does not help.UPDATE: @noahtalerman: this is how to escape:
(https://fleetdm.com/docs/configuration/yaml-files#variables:~:text=)-,can%20be%20escaped,-so%20it%27s%20not)
π οΈ Expected behavior
Update the error message:
π§βπ» Steps to reproduce
display_name) to a value containing$followed by alphanumeric chars β e.g.,($($U$J@fleetctl generate-gitops --dir /tmp/test-export --forcefleetctl gitops -f /tmp/test-export/fleets/<team>.yml --dry-runenvironment variable "<X>" not setπ―οΈ More info
Discovered while verifying #33106. Affects any text field that ends up in gitops yml output (display names, descriptions, URLs, passwords, queries, etc.).