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

service can use x-* name #413

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented May 31, 2023

extensions are not supported inside the services top-level attribute, this allows users to declare services with name starting by x-... Unfortunately support for this is buggy, and here is a fix + test-case :)

closes docker/compose#8809

Signed-off-by: Nicolas De Loof <[email protected]>
Copy link
Contributor

@ulyssessouza ulyssessouza left a comment

Choose a reason for hiding this comment

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

From a semantic point of view that looks confusing to have a service prefixed with x- and I ask myself if we should or not allow it given that it has a meaning in other parts of the file.

From a technical point, YES... Why not? Makes sense that we would not use x- in the services map.

The question is... Do we want that to have this "ambiguity"?

@ndeloof
Copy link
Collaborator Author

ndeloof commented Jun 1, 2023

The question is... Do we want that to have this "ambiguity"?

A huge majority of compose users don't rely on extensions (many don't know about yaml anchors), but use a simple compose.yaml file. But within those there's a significant amount of our users who might have service named x-foo for internal reasons

Also, this is not a new feature, just a fix for incomplete #255 which was discussed 1 year ago :P

@ulyssessouza ulyssessouza self-requested a review June 1, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: service "extensions" has neither an image nor a build context specified: invalid compose project
3 participants