question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow partial overriding of nested YAML content

See original GitHub issue

A section of an example YAML file:

sections:
  header:
    text@: "Some header text"
  promo:
    heading@: "Heading"

The above YAML is used in the default locale (en_US). If in the en_IN locale I want to override just the promo section, using the code below would override the whole sections object:


---
$locale: en_IN
  sections:
    promo:
      heading@: "New heading"

Obviously the desired outcome is that we only affect the promo subsection.

/cc @meizon

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremydwcommented, Aug 1, 2016

Okay, #239 is merged! Time to resume work on this feature.

1reaction
jeremydwcommented, Jul 8, 2016

The former would work, although you’ll need to add an anchor for &smoothies.flavours before you can use *smoothies.flavours. After merging in https://github.com/grow/grow/pull/239 we’ll resume working on this to get it in ASAP.

On Thu, Jul 7, 2016 at 5:23 AM, Wills Bithrey notifications@github.com wrote:

Would this work?

smoothies: flavours: - name: “Coconut” price: 10 - name: “Strawberry” price: 9 flavours@it: << : *smoothies.flavours - name: “Amaretti” price: 10

i.e. We often have “top level” groupings of things which then contain lists of other things as per this example in our yaml files, and I’m not sure that the merge would work since it’s being used within the same “parent” map?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/grow/grow/issues/142#issuecomment-231062343, or mute the thread https://github.com/notifications/unsubscribe/AAndfYHPpRLYYe0elug7vfQ4XIB_C11eks5qTO-5gaJpZM4GNAG0 .

jeremydw

Read more comments on GitHub >

github_iconTop Results From Across the Web

yaml anchor and alias - partial override - Stack Overflow
I have to structures that are pretty similar but differ only in a leaf node of the corresponding tree, like A1.AB.ABB in the...
Read more >
GitLab CI/CD include examples
Specific YAML-defined variables and details of the production job are overridden. Content of a custom configuration file named autodevops-template.yml :.
Read more >
Share Compose configurations between files and projects
To use multiple override files, or an override file with a different name, you can use the -f option to specify the list...
Read more >
YAML Ain't Markup Language (YAML™) revision 1.2.2
In some cases, YAML also allows nested block collections to start ... tag or invalid content, only a partial representation may be composed....
Read more >
Override Files - Configuration Language | Terraform
For example, a human-edited configuration file in the Terraform language native syntax could be partially overridden using a programmatically-generated file in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found