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

Only ignore parsing errors when used with no-interpolate #613

Merged
merged 1 commit into from Apr 5, 2024

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Apr 2, 2024

Parsing error must be ignored when interpolation is disabled so we don't try to parse ${PORT} as an IP address or port number, but when interpolation is enabled (loading into Project) we must not ignore errors, otherwise the final error is a very generic one

closes docker/compose#11676

Copy link
Contributor

@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.

LGTM

tests := []struct {
name string
yaml any
want any
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not add ignoreParseError bool here and a test to check we don't generate error when set to true?

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof merged commit facef9f into compose-spec:main Apr 5, 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.

[BUG] Error when binding port with host IP
2 participants