Skip to content
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

Swarm: Add schema 3.11, and Allow additional properties in build #4214

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

laurazard
Copy link
Member

@laurazard laurazard commented Apr 18, 2023

- What I did

Since Swarm does not use the build section, there's no reason to validate properties here.
This makes it so we don't have to keep updating the schema in the CLI to support properties added in the Compose Spec for build, and does not imply any new feature support since Swarm does not consider this section.

- How I did it

Update the schema in the CLI to allow additionalProperties in build.

- How to verify it

Write a Compose file such as

services:
  a:
    image: alpine
    build:
      whatever: "meow"

and deploy it with docker stack deploy -c <file> [name]

- Description for the changelog

related:

- A picture of a cute animal (not mandatory but encouraged)

image

@thaJeztah
Copy link
Member

Looks like there's a failure somewhere

#19 80.15 === FAIL: cli/compose/loader TestLoad (0.00s)
#19 80.15     loader_test.go:238: assertion failed: 3.10 (sampleConfig.Version string) != 3.11 (actual.Version string)

@laurazard
Copy link
Member Author

laurazard commented Apr 18, 2023

Yup! Sorry, should have left this as a draft, I wanted to look at the tests and add some but started looking at something else in the meantime and got distracted 😅

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
Since Swarm does not use the `build` section, there's no reason to validate properties here.
This makes it so we don't have to keep updating the schema in the CLI to support properties
added in the Compose Spec for build, and does not imply any new feature support since Swarm
does not consider this section.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah changed the title Swarm: Allow additional properties in build Swarm: Add schema 3.10, and Allow additional properties in build Apr 19, 2023
@thaJeztah thaJeztah changed the title Swarm: Add schema 3.10, and Allow additional properties in build Swarm: Add schema 3.11, and Allow additional properties in build Apr 19, 2023
@thaJeztah thaJeztah merged commit 1277e8f into docker:master Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Additional property additional_contexts is not allowed when using docker stack deploy
3 participants