Skip to content

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

Merged
thaJeztah merged 2 commits intodocker:masterfrom
laurazard:compose-schema-x-props
Apr 19, 2023
Merged

Swarm: Add schema 3.11, and Allow additional properties in build#4214
thaJeztah merged 2 commits intodocker:masterfrom
laurazard:compose-schema-x-props

Conversation

@laurazard
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 😅

@laurazard laurazard force-pushed the compose-schema-x-props branch from 93bb623 to 73da2ab Compare April 18, 2023 13:35
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>
@laurazard laurazard force-pushed the compose-schema-x-props branch from 73da2ab to 271b966 Compare April 18, 2023 13:52
@laurazard laurazard requested a review from thaJeztah April 18, 2023 14:34
Copy link
Copy Markdown
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