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

newt: Fix config check for entries with description #570

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

m-gorecki
Copy link
Contributor

@m-gorecki m-gorecki commented Sep 9, 2024

We should use DeepEqual to compare interface values.
In some cases Value interface might contain a map
with some more keys than just "value" key - for
example "description" key. This will cause
DeepEqual to fail, even if the "value" keys
would be the same. However before returning an error
we also check if Expr field of both entries
is not nil. We can assume that in that
case no additional keys in map will be present
and no false positive error will be returned.

We should use DeepEqual to compare interface values.
In some cases Value interface might contain a map
with some more keys than just "value" key - for
example "description" key. This will cause
DeepEqual to fail, even if the "value" keys
would be the same. However before returning an error
we also check if Expr field of both entries
is not nil. We can assume that in that
case no additional keys in map will be present
and no false positive error will be returned.
@m-gorecki m-gorecki marked this pull request as ready for review September 9, 2024 10:50
@m-gorecki m-gorecki merged commit 85f7393 into apache:master Sep 9, 2024
64 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.

1 participant