Normalize YAML Before Comparing Worker Configurations
Admin ·
Flow mappings, indentation, quotes and key order can obscure a small change to a worker configuration. Use a stable YAML layout so the comparison shows the actual values.
Compare two layouts of the same settings
Select Load example and Normalize YAML. The export starts with accounts, then flags and retry. The retry keys are attempts and backoff in that order. The value 003 becomes 3, and 1.500 becomes 1.5.
Move the original retry line to the end of the source and normalize again. Both exports are identical because mapping keys always sort by their decoded strings. The flags sequence keeps a boolean true, a string "true", and null in that order.
Check numbers and aliases in the exported file
Download canonical.yaml. Find the full sequence identifier 9007199254740993 under accounts. Paste the exported file into YAML source and normalize it again to verify the same output.
To see alias expansion, replace the source with two lines, base: &base { workers: 2 } and copy: *base. Both keys in the normalized result contain workers: 2. The anchor name is absent because each reference is expanded to its value.
base: &base { workers: 2 }
copy: *baseKeep a working source file for comments and formatting
Use normalized copies for comparisons. Comments, blank lines, anchor names and original quoting are absent from the export. Strings are double quoted and the output uses block indentation for nonempty sequences and mappings.
Normalize one YAML 1.2 core document with string mapping keys at a time. Correct duplicate keys or cyclic aliases before comparing the result.
Common questions
Why are text values quoted?
Double quotes keep strings such as true, null and 003 distinct from matching core values and provide stable formatting.
Are comments included in the download?
The export contains the normalized data. Retain the source file to keep its comments and style.