To synchronise a running project with it's source configuration.
Suggested by @hommes-doutant here.
implementation
Updating an existing project could look like this.
$ be update spiderman
Following which be.yaml, templates.yaml and inventory.yaml is updated.
The name of the given project must be given, similar to how it would normally be given during be in or be ls etc.
Only projects started from a preset would support being updated. When starting a project via be new, a reference to it's source is embedded in be.yaml.
be.yaml
source: mottosso/be-film
If the source is local, then it's local name is provided.
source: mylocalpreset
The source is then used to determine from where to pull updates.
overlap
In the case of updating a configuration file with modified values, what should happen?
original
environment:
MYVAR: My value
old
environment:
MYVAR: My value
MYADDEDVAR: Another value
new
environment:
MYVAR: New value
result
environment:
MYVAR: New value
MYADDEDVAR: Another value
A simple {}.update({}) would suffice here, but what about when modifications involve removal of data?
original
environment:
MYVAR: My value
MYOTHERVAR: Another value
new
environment:
MYVAR: My value
Or modifications to an original value?
original
environment:
MYVAR: My short value
new
environment:
MYVAR: My longer value
problem
A number of questions arise that might make the experience not-so-intuitive and unsafe.
goal
To synchronise a running project with it's source configuration. Suggested by @hommes-doutant here.
implementation
Updating an existing project could look like this.
Following which
be.yaml
,templates.yaml
andinventory.yaml
is updated.The name of the given project must be given, similar to how it would normally be given during
be in
orbe ls
etc.Only projects started from a preset would support being updated. When starting a project via
be new
, a reference to it's source is embedded inbe.yaml
.be.yaml
If the source is local, then it's local name is provided.
The source is then used to determine from where to pull updates.
overlap
In the case of updating a configuration file with modified values, what should happen?
original
old
new
result
A simple
{}.update({})
would suffice here, but what about when modifications involve removal of data?original
new
Or modifications to an original value?
original
new
problem
A number of questions arise that might make the experience not-so-intuitive and unsafe.