8000 Fix deploy.placement constraints/preferences docs by PaarthShah · Pull Request #507 · compose-spec/compose-spec · GitHub
[go: up one dir, main page]

Skip to content

Conversation

PaarthShah
Copy link
@PaarthShah PaarthShah commented May 26, 2024

What this PR does / why we need it:
This PR is to fix the docs to match compose-spec.json's AND docker compose's implementation for each of:

  • deploy.placement.constraints
  • deploy.placement.preferences

The docs have been modified to match the practical implementation of the spec as-is, including its usage for docker swarm: https://docs.docker.com/engine/swarm/services/#control-service-placement

Which issue(s) this PR fixes:

Fixes #506

Renders docker/compose#11853 irrelevant

@PaarthShah PaarthShah force-pushed the fix-deploy-placement-docs branch from 8543eda to af1ad83 Compare May 26, 2024 00:36
Signed-off-by: Paarth Shah <mail@shahpaarth.com>
@PaarthShah PaarthShah force-pushed the fix-deploy-placement-docs branch from af1ad83 to cb7f738 Compare May 26, 2024 00:39
@PaarthShah
Copy link
Author

Ah I see I got somewhat ninja'ed by 20ebf93

@ndeloof
Copy link
Collaborator
ndeloof commented Jul 10, 2024

As swarm does not apply the compose specification, I wonder this is relevant to rely on swarm docs to define those attributes in the compose specification. Better keep them with a fuzzy definition IMHO

@ndeloof
Copy link
Collaborator
ndeloof commented Jul 11, 2024

Are you ok with 20ebf93 or do you feel those attributes require better documentation ?
The point here is that those are legacy from docker compose file v3, introduced for swarm support, but never implemented in docker-compose. So they just don't have any actual implementation we could rely on to document, but from a command that does not implement the spec 🧐

@PaarthShah
Copy link
Author
PaarthShah commented Jul 11, 2024

@ndeloof I'm generally okay with it, but I think we can do better. I'd have to compare/contrast my PR with it properly (it's been a little bit)

As far as implementation goes, I'm wondering if docker/cli#4863 (comment) is a good example at all, or whether it's purely hypothetical at this point.

And in the general case, I'd cite that the compose-spec is intended to be a superset of docker compose 2 and 3:

https://docs.docker.com/compose/compose-file/14-include/

Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification.

Therefore I expect everything in compose file format 3 to be de-facto transferred to the compose spec, or explicitly marked for deprecation + removal when the implementation of something better is available.

I vote for the former because of the existence of PRs like the above that will provide implementation.

@github-actions github-actions bot added the stale label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deploy.placement constraints and placement documentation does not match compose-spec.json

2 participants

0