-
Notifications
You must be signed in to change notification settings - Fork 139
add description to all compose-spec.json attributes #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@rcjsuen if you want to take a look also |
e4f44b6 to
8020eb6
Compare
| "weight": { | ||
| "type": ["integer", "string"], | ||
| "description": "Block IO weight (relative weight) for the service, between 10 and 1000." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I was able to set this value to
0. Is that intentional? - Should we set a
minimumandmaximumfor this similar tocpu_percent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I keep this one for a follow up PR
| }, | ||
| "mem_swappiness": { | ||
| "type": ["integer", "string"], | ||
| "description": "Container memory swappiness as percentage (0 to 100)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "description": "Container memory swappiness as percentage (0 to 100)." | |
| "description": "Container memory swappiness as a percentage (0 to 100)." |
Should we set a minimum and maximum here? I was able to set this value to -1 but Docker Compose still seemed to work. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there are many places where such min/max could be defined. We should consider adding them as a follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we'll do follow-up PR to manage this kind of improvement
| "count": { | ||
| "type": ["string", "integer"], | ||
| "description": "Number of GPUs to use." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we specify a minimum value here?
| "driver": { | ||
| "type": "string", | ||
| "description": "Specify which driver should be used for this network. Default is 'bridge'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we declare the default attribute here?
| "description": "A dictionary mapping keys to values.", | ||
| "patternProperties": { | ||
| ".+": { | ||
| "type": ["string", "number", "boolean", "null"] | ||
| "type": ["string", "number", "boolean", "null"], | ||
| "description": "Value for the key, which can be a string, number, boolean, or null." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could someone help clarify to me as to why we allow a key to be null? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key only (no value) means "use same value from host env variables, and if not set remove variable"
| "rate": { | ||
| "type": ["integer", "string"], | ||
| "description": "Rate limit in bytes per second or IO operations per second." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set a minimum for this attribute?
| "weight": { | ||
| "type": ["integer", "string"], | ||
| "description": "Relative weight for the device, between 10 and 1000." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set a minimum and maximum for this attribute?
8020eb6 to
d3f0e2a
Compare
| }, | ||
| "mem_swappiness": { | ||
| "type": ["integer", "string"], | ||
| "description": "Container memory swappiness as percentage (0 to 100)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there are many places where such min/max could be defined. We should consider adding them as a follow-up
| "failure_action": { | ||
| "type": "string", | ||
| "description": "Action to take if a rollback fails: 'continue', 'pause'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only exists for swarm mode, low priority imho
| "description": "A dictionary mapping keys to values.", | ||
| "patternProperties": { | ||
| ".+": { | ||
| "type": ["string", "number", "boolean", "null"] | ||
| "type": ["string", "number", "boolean", "null"], | ||
| "description": "Value for the key, which can be a string, number, boolean, or null." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key only (no value) means "use same value from host env variables, and if not set remove variable"
it will give more details to Language Server Protocol tools Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
a48bc5b to
3977667
Compare
No problem. Makes sense to me. 👍 |
it will give more details to Language Server Protocol tools
https://docker.atlassian.net/browse/APCLI-1107
Fix compose-spec/compose-spec#138