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

neutralize path separator when used in service name #522

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Jan 12, 2024

tree.Path must distinguish parts in a path vs names using the path separator char.
This quick fix replaces path separator with another char I don't expect anyone would use for resource name

closes docker/compose#11336

Copy link
Collaborator

@glours glours left a comment

Choose a reason for hiding this comment

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

😂

@ndeloof
Copy link
Collaborator Author

ndeloof commented Jan 12, 2024

a nicer approach is to redefine tree.Path as a slice of parts, so that parts can be any string. I'm looking into this, but can't guarantee a PR to be ready short-terms

update: we need tree.Path to be comparable so it can be used as map key, which makes this non-trivial :P

@ndeloof ndeloof force-pushed the name_with_path_separator branch from f0e323b to 0129f49 Compare January 12, 2024 14:13
@ndeloof ndeloof requested review from milas and jhrotko January 12, 2024 14:13
@erayaydin
Copy link

👻 funny touch

@ndeloof ndeloof force-pushed the name_with_path_separator branch from 0129f49 to 13df5ff Compare January 15, 2024 13:48
@ndeloof ndeloof enabled auto-merge (rebase) January 15, 2024 13:48
@ndeloof ndeloof merged commit f936ff2 into compose-spec:main Jan 15, 2024
8 checks passed
@ndeloof ndeloof deleted the name_with_path_separator branch January 15, 2024 13:53
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.

[BUG] On V2.24.0 error is thrown when there is "." in the service name
3 participants