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

loader: fix overly aggressive project name validation #374

Merged
merged 1 commit into from
Mar 26, 2023

Conversation

milas
Copy link
Member

@milas milas commented Mar 26, 2023

There were cases where the loader would infer a perfectly valid project name by normalizing a directory, but would then re-validate the un-normalized project directory and throw an error.

This moves all the validation into a single spot during the load, which is the only point that it has all the context.

Some of this logic needs to be pushed out of here: it should NOT be reading the config files, for example.

For now, this resolves the main issues.

@milas milas added the bug Something isn't working label Mar 26, 2023
@milas milas requested review from ndeloof and glours March 26, 2023 12:47
@milas milas self-assigned this Mar 26, 2023
There were cases where the loader would infer a perfectly valid
project name by normalizing a directory, but would then re-validate
the un-normalized project directory and throw an error.

This moves all the validation into a single spot during the load,
which is the only point that it has all the context.

Some of this logic needs to be pushed out of here: it should NOT
be reading the config files, for example.

For now, this resolves the main issues.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
@ndeloof ndeloof merged commit 4d6b286 into compose-spec:master Mar 26, 2023
@milas milas deleted the fix-proj-name-validation branch March 26, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants