-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cli/compose: add schema 3.10, with optional version field (default to "latest") #3257
cli/compose: add schema 3.10, with optional version field (default to "latest") #3257
Conversation
This comment has been minimized.
This comment has been minimized.
b84b7c1
to
297230b
Compare
Easiest to review per commit; the "main" bits are in the last commit |
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.
Makes sense!
LGTM
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Adding a copy of the 3.9 schema, with only the version-string changed. This makes it easier to find changes since 3.9, which are added after this. Signed-off-by: Sebastiaan van Stijn <[email protected]>
The compose spec (https://compose-spec.io) defines the version to be optional, and implementations of the spec to check for supported attributes instead. While this change does not switch the `docker stack` implementation to use the compose-spec, it makes it function more similar. Previously, omitting a version number would either produce an error (as the field was required), or switched the handling to assume it was version 1.0 (which is deprecated). With this change, compose files without a version number will be handled as the latest version supported by `docker stack` (currently 3.10). This allows users that work with docker-compose or docker compose (v2) to deploy their compose file, without having to re-add a version number. Fields that are not supported by stackes (schema 3.10) will still produce an error. Signed-off-by: Sebastiaan van Stijn <[email protected]>
297230b
to
a777880
Compare
Rebased to get a fresh run of CI |
let's bring this in I think I had a follow-up stashed somewhere as well; will dig it up and open a PR for that |
@thaJeztah |
Yes, that's correct; plan is to do a release next month (if all goes well 👍) |
Is this not merged into Docker Desktop yet? |
The compose spec (https://compose-spec.io) defines the version to be optional,
and implementations of the spec to check for supported attributes instead.
While this change does not switch the
docker stack
implementation to use thecompose-spec, it makes it function more similar. Previously, omitting a version
number would either produce an error (as the field was required), or switched
the handling to assume it was version 1.0 (which is deprecated).
With this change, compose files without a version number will be handled as
the latest version supported by
docker stack
(currently 3.10). This allowsusers that work with docker-compose or docker compose (v2) to deploy their
compose file, without having to re-add a version number. Fields that are
not supported by
docker stack
(schema 3.10) will still produce an error.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)