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

Transformations: Deduplicate names when using extract fields transformation. #77569

Merged

Conversation

oscarkilhed
Copy link
Contributor

@oscarkilhed oscarkilhed commented Nov 2, 2023

What is this feature?

This assigns unique names to extracted fields that collide with an already existing name on the frame. This is a breaking change and as such is behind a feature toggle.

Why do we need this feature?

If there is a name collision the frame will not be valid.

Which issue(s) does this PR fix?:

Fixes #72331

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

Release notice breaking change

In panels using the extract fields transformation, where one of the extracted names collides with one of the already existing fields, the extracted field will be renamed.

@oscarkilhed oscarkilhed added add to changelog area/transformations breaking change Relevant for changelog generation no-backport Skip backport of PR labels Nov 2, 2023
@oscarkilhed oscarkilhed requested review from grafanabot and a team as code owners November 2, 2023 13:53
@oscarkilhed oscarkilhed requested a review from a team November 2, 2023 13:53
@oscarkilhed oscarkilhed requested review from a team as code owners November 2, 2023 13:53
@oscarkilhed oscarkilhed requested review from mdvictor, baldm0mma, tskarhed, eledobleefe and mckn and removed request for a team November 2, 2023 13:53
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.3.x milestone Nov 2, 2023
@oscarkilhed oscarkilhed changed the title Transformations: Deduplicate names when using extract fields transformation. Transformations: deduplicate names when using extract fields transformation. Nov 2, 2023
@oscarkilhed oscarkilhed changed the title Transformations: deduplicate names when using extract fields transformation. Transformations: Deduplicate names when using extract fields transformation. Nov 2, 2023
Copy link
Contributor

@baldm0mma baldm0mma left a comment

Choose a reason for hiding this comment

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

LGTM!

@oscarkilhed oscarkilhed merged commit 0eda368 into main Nov 2, 2023
31 checks passed
@oscarkilhed oscarkilhed deleted the oscark/extract-field-transformation-deduplicate-field-names branch November 2, 2023 15:47
zserge pushed a commit that referenced this pull request Nov 9, 2023
…ormation. (#77569)

* dedupe field names

* add test to make sure we don't break normal case
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transformation: extractFields might lead to duplicated fields with the same name
3 participants