Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Disabling a node in YAML should be explicit #261

Open
silvin-lubecki opened this issue Jun 29, 2018 · 3 comments
Open

Disabling a node in YAML should be explicit #261

silvin-lubecki opened this issue Jun 29, 2018 · 3 comments

Comments

@silvin-lubecki
Copy link
Contributor

silvin-lubecki commented Jun 29, 2018

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!!

@chris-crone
Copy link
Member

@silvin-lubecki I see #244 was merged. Did it take this into account?

@ijc
Copy link
Contributor

ijc commented Jan 21, 2019

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.

@shreyasbapat
Copy link

Is it available for new contributors?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants