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

fix: dont enrich if non empty keys are not same #4930

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Conversation

nityanandagohain
Copy link
Member

@nityanandagohain nityanandagohain commented Apr 29, 2024

Fixes #4901

Issue explaination

If there are two fields

  • myattr (type=tag, datatype=string)
  • myattr (type=resource, datatype=string)

We added a change recently where we forcefully try to enrich all attributes

so if user is searching for myattr (type=resource, datatype=string) then it might get replaced with * myattr (type=tag, datatype=string)

This PR fixes it.

though there is no solution right now if in the query user enters myattr with no metadata, we don't know which one to choose for enriching the tag or the resource attribute.

@github-actions github-actions bot added the bug Something isn't working label Apr 29, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@nityanandagohain nityanandagohain marked this pull request as ready for review April 29, 2024 11:46
@srikanthccv
Copy link
Member

though there is no solution right now if in the query user enters myattr with no metadata, we don't know which one to choose for enriching the tag or the resource attribute.

So what happens now?

so if user is searching for myattr (type=resource, datatype=string) then it might get replaced with * myattr (type=tag, datatype=string)

Did someone in production run into this issue? What attribute were they using?

@nityanandagohain
Copy link
Member Author

So what happens now?

It's random right now, since the map is based on name whatever key remains is used for enrichment.

Did someone in production run into this issue? What attribute were they using?

Yes it was faced by an user, who had an old duplicate attribute in resource and due to this bug, even when the new attribute (with correct type and data type) was sent it was being replaced as we were forcefully enriching it.

@nityanandagohain nityanandagohain merged commit 5326f2d into develop Apr 29, 2024
11 of 12 checks passed
@nityanandagohain nityanandagohain deleted the issue_4901 branch April 29, 2024 17:10
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.

LOGS[BE]: Query encrichment not taking care of collisions
2 participants