Closed hardyjosh closed 1 month ago
stringly merge the top fields of the settings and dotrain frontmatter and then deserialize them into the Config, although this needs very carefull handling of strings and positions, and what would be the case if a field like networks has a key with same name on both setting and frontmatter?
@rouzwelt so I think we talked about how to do this and afaics it works - basically:
settings-networks
, settings-orderbooks
etc)networks
and settings-networks
)if we can do this, then we can use yaml anchors across both places with no issues.
Edit: The below may be possible with regular YAML functionality: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
We need to check whether it already works and if not what we would have to do to support.
We have a need for scenario composition that doesn't work in a strict hierachy.
At the moment in a
deployment
you reference one scenario, likeparent.child.grandchild
The corresponding scenarios look like this:
What we want to allow is
Then you could create deployments like:
In the scenario for 1,
grandchild
would inherit bindings fromaunty
cousin
andchild
, and in 2,grandchild
would inhereit fromuncle
andchild
.At the moment we "pre-flatten" all scenarios according to the hierachy in
scenarios
so they can easily be accessed by name later. Now, we would create scenarios only as needed (there is potentially too many combinations).Edit1:
serde_yaml
crate supports yaml anchors natively and works just fineEdit2:
stringly merge the top fields of the settings and dotrain frontmatter and then deserialize them into the Config, although this needs very carefull handling of strings and positions, and what would be the case if a field like networks has a key with same name on both setting and frontmatter?