>_ IzzyLab

Topic breakdown

YAML anchors are a way to avoid duplicating identical pieces of config: &name marks a value as an anchor, and *name elsewhere inserts a copy of it (an alias). Separately there's the merge key <<: — it doesn't put the anchor as a whole into a separate field, but pours its key-value pairs into the current map, as if you'd written them out by hand; after the merge the << key itself doesn't remain in the structure. Order matters: the anchor must be defined earlier in the document than the alias to it, and fields written next to <<: override the ones coming from the anchor.

What's checked

  1. YAML is valid
  2. anchor and merge used
  3. dev and prod got the shared fields and differ

What it looks like