-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: validator checking unique names doesn't return early anymore on … #1807
fix: validator checking unique names doesn't return early anymore on … #1807
Conversation
E2E Test Results 3 files - 1 269 suites - 134 26m 59s ⏱️ - 53m 43s For more details on these failures, see this check. Results for commit 894fbe0. ± Comparison against base commit f31a9f7. This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
f90f464
to
894fbe0
Compare
1539adf
to
451fef5
Compare
|
451fef5
to
94cb432
Compare
94cb432
to
8789145
Compare
// If they can't be resolved, we compare the unresolved NameParameters of the two configs, | ||
// first assuming both being of type ReferenceParameter, and if that fails, assuming both being of type CompoundParameter. | ||
// If the fields are equal, a name clash is guaranteed. | ||
// This check is not perfect. Name clashes are not caught if, e.g., one config is resolvable and the other one isn't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10/10 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx!
What this PR does / Why we need it:
This fixes a bug where we erroneously return early from unique name validation for classic apis if the scope of the config-to-check differs from a scope of the configs we have already seen before.
YAML to validate
Current (wrong) log output:
Expected log output, introduced with this PR:
Special notes for your reviewer:
A test has been added to check the behavior. If you execute the test without the fix, it will fail.
Does this PR introduce a user-facing change?
Yes, validation will fail now for non-unique names in the same scope, whereas before there were cases where validation would succeed, although it shouldn't.