Skip to content

neutralize path separator when used in service name#522

Merged
ndeloof merged 1 commit intocompose-spec:mainfrom
ndeloof:name_with_path_separator
Jan 15, 2024
Merged

neutralize path separator when used in service name#522
ndeloof merged 1 commit intocompose-spec:mainfrom
ndeloof:name_with_path_separator

Conversation

@ndeloof
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 jhrotko and milas January 12, 2024 14:13
@erayaydin
Copy link
Copy Markdown

👻 funny touch

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@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
@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