app
app copied to clipboard
Disabling a node in YAML should be explicit
Description
A YAML node can be disabled using a "enabled" key with a value:
version: "3.4"
services:
monitor:
enabled: "! ${myapp.debug}"
But the code handling this feature says that no value means disabling the node too:
version: "3.4"
services:
monitor:
enabled: # monitor is disabled
I suggest we should remove this implicit disable with no value, and error out, as I think that enabling should be explicit too.
⚠️ We should also add unit tests on this part!!
@silvin-lubecki I see https://github.com/docker/app/pull/244 was merged. Did it take this into account?
The code is now at https://github.com/docker/app/blob/master/render/render.go#L135...L157 (and the key is x-enabled
). By my reading it still has the same behaviour which @silvin-lubecki proposed changing.
Is it available for new contributors?