Add documentation for bind mount consistency flags (#31047).#31749
Add documentation for bind mount consistency flags (#31047).#31749vdemeester merged 1 commit intomoby:masterfrom
Conversation
run|
@yallop I think the service create doc should go in the table just beneath ro/rw options. |
|
cc @thaJeztah |
|
Thanks, @cpuguy83. I've added an entry to the table. |
api/swagger.yaml
Outdated
There was a problem hiding this comment.
Can you list valid options here as well?
|
Left one suggestion. Also, we probably need to add a note that this is (currently) only used on Docker for Mac? I think it's ok to squash commits here before merging 😸 |
6176c6c to
7ebacf7
Compare
|
Seems conceptual difference between consistent, delegate and cached is missing here. Can maybe reuse text from the original gist, slightly adapted here to signal which one is default:
|
api/swagger.yaml
Outdated
There was a problem hiding this comment.
It seems weird to have default. Isn't that just an alias for consistent?
There was a problem hiding this comment.
default is consistent except with the lowest (instead of highest) priority in cases where multiple consistency requirements overlap. In the future, default may be changed to be cached except with the lowest (instead of the second highest) priority in cases where multiple consistency requirements overlap.
There was a problem hiding this comment.
Question; if this field is left empty, is that equal to "default"? Wondering if we actually need the literal "default" value
There was a problem hiding this comment.
I'm not sure what the API semantics are regarding omitted fields but the default mode is present in the --mount long-form CLI so that every mode is representable as an explicit value. At least in that context, having default allows things like scripting consistency=$MODE where the MODE variable can then be set to any of default, delegated, cached, or consistent. Without a representation for every mode, there is not a nice way to set the consistency to default without additional complexity of omitting consistency= sometimes.
There was a problem hiding this comment.
I think overall the API allows omitting values to use the default, which also is "strictly" what default is 😇;
In computer technology, a default (noun, pronounced dee-FAWLT ) is a predesigned value or setting that is used by a computer program when a value or setting is not specified by the program user.
What will the result be if an older client creates a mount? (older clients won't know about this option, so use the old API version, and don't specify this property)
@cpuguy83 wdyt?
There was a problem hiding this comment.
It probably doesn't need to be documented other than what the default actually is vs a value of "default".
docs/reference/commandline/create.md
Outdated
There was a problem hiding this comment.
What's the deal with the order here? Can it be either alphabetical or default-first? Also this doesn't have default as above.
There was a problem hiding this comment.
default is not in this list because in the short -v form, :default is not very explanatory and simply omitting it is the same. default is in the long --mount form as it is an actual consistency mode that can be selected and may be indicated for maximum explanatory effect.
delegated is the most relaxed and lowest priority (except for default, not present in this form). cached is the next most relaxed and higher priority. consistent is not relaxed and highest priority.
docs/reference/commandline/run.md
Outdated
There was a problem hiding this comment.
Ordering again, and questions about default. Also, this is a great time to explain what each of them means. I'd put them into a <ul>.
There was a problem hiding this comment.
Thanks for the review, @mstanleyjones. I've added a <ul> explaining the modes, based on @andrerom's suggestion (c06c6bc).
man/docker-run.1.md
Outdated
There was a problem hiding this comment.
You can remove this line now.
man/src/container/create.md
Outdated
Signed-off-by: Jeremy Yallop <yallop@docker.com>
|
Seen this fail a couple of times, possibly flaky test |
Add documentation for bind mount consistency flags (moby#31047). (cherry picked from commit 9439402) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Documentation for #31047, following @thaJeztah's recommendations, copied here for convenience: