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

check that a container_name is used only once across all services declarations #585

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

glours
Copy link
Collaborator

@glours glours commented Feb 20, 2024

Fix #583

@glours glours requested a review from ndeloof as a code owner February 20, 2024 09:23
@glours glours self-assigned this Feb 20, 2024
@glours glours requested review from milas and jhrotko February 20, 2024 09:23
@@ -29,6 +29,7 @@ import (

// checkConsistency validate a compose model is consistent
func checkConsistency(project *types.Project) error {
containerNames := map[string]string{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

could use utils.Set, which offers Has method

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't keep the original service name with a Set only the container_name value

@ndeloof ndeloof merged commit 5d934a2 into compose-spec:main Feb 20, 2024
8 checks passed
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.

Validation doesn't catch multiple services with the same container_name
3 participants