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

Azure Platform Logs: rename identity as identity_name when the value is a string #33654

Merged
merged 7 commits into from
Dec 6, 2022

Conversation

zmoog
Copy link
Contributor

@zmoog zmoog commented Nov 11, 2022

What does this PR do?

If the identity field comes as a string, the pipeline renames it as identity_name to avoid collisions when the value is an object.

Why is it important?

The identity field comes in different flavors: depending on the specific log category, it can be an object or a string.

We can avoid conflicts in a well-known field by renaming it according to its type.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.
  • I have added a backport label, if appropriate.

Related issues

@zmoog zmoog added bug Team:Cloud-Monitoring Label for the Cloud Monitoring team labels Nov 11, 2022
@zmoog zmoog self-assigned this Nov 11, 2022
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Nov 11, 2022
@mergify
Copy link
Contributor

mergify bot commented Nov 11, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @zmoog? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@zmoog zmoog force-pushed the zmoog/identity-for-platform-logs branch from ebee8fd to ce10c7c Compare November 11, 2022 16:25
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 11, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-12-05T18:21:56.368+0000

  • Duration: 75 min 21 sec

Test stats 🧪

Test Results
Failed 0
Passed 7134
Skipped 738
Total 7872

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@zmoog zmoog changed the title Rename identity as identity_name when is a string Azure Platform Logs: rename identity as identity_name when the value is a string Nov 11, 2022
@zmoog zmoog added backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport with mergify labels Nov 11, 2022
@zmoog zmoog force-pushed the zmoog/identity-for-platform-logs branch 2 times, most recently from 3e79a47 to 4ff070d Compare November 13, 2022 08:12
@zmoog zmoog marked this pull request as ready for review November 16, 2022 12:50
@zmoog zmoog requested a review from a team as a code owner November 16, 2022 12:50
@zmoog zmoog force-pushed the zmoog/identity-for-platform-logs branch from 57b4acc to 727cc75 Compare November 16, 2022 12:51
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

need a changelog?

@zmoog zmoog added the backport-v8.6.0 Automated backport with mergify label Nov 17, 2022
@zmoog
Copy link
Contributor Author

zmoog commented Nov 17, 2022

need a changelog?

Yeah, definitely.

@zmoog zmoog force-pushed the zmoog/identity-for-platform-logs branch 2 times, most recently from a427c0d to fc978ce Compare November 17, 2022 09:23
@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b zmoog/identity-for-platform-logs upstream/zmoog/identity-for-platform-logs
git merge upstream/main
git push upstream zmoog/identity-for-platform-logs

zmoog added 7 commits December 5, 2022 19:20
The identity field comes in different flavours, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.
I am not setting up this test in the right way
Improves readability as it usually is the last element of the
processor definition.
@zmoog zmoog force-pushed the zmoog/identity-for-platform-logs branch from fc978ce to fd50989 Compare December 5, 2022 18:21
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@zmoog zmoog merged commit ea9b0cb into elastic:main Dec 6, 2022
@zmoog zmoog deleted the zmoog/identity-for-platform-logs branch December 6, 2022 10:13
mergify bot pushed a commit that referenced this pull request Dec 6, 2022
…is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)
mergify bot pushed a commit that referenced this pull request Dec 6, 2022
…is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)
zmoog added a commit that referenced this pull request Dec 6, 2022
…is a string (#33654) (#33959)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)

Co-authored-by: Maurizio Branca <[email protected]>
zmoog added a commit that referenced this pull request Dec 7, 2022
…is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)

# Conflicts:
#	x-pack/filebeat/module/azure/fields.go
zmoog added a commit that referenced this pull request Dec 12, 2022
…ty_name when the value is a string (#33958)

* Azure Platform Logs: rename identity as identity_name when the value is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)

* Remove extra changelog entries

Co-authored-by: Maurizio Branca <[email protected]>
zmoog added a commit that referenced this pull request Dec 12, 2022
…is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)

# Conflicts:
#	x-pack/filebeat/module/azure/fields.go
zmoog added a commit that referenced this pull request Dec 12, 2022
…ity_name when the value is a string (#33957)

* Azure Platform Logs: rename identity as identity_name when the value is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.

(cherry picked from commit ea9b0cb)

# Conflicts:
#	x-pack/filebeat/module/azure/fields.go

* Remove extra entries in changelog

* Update fields.go

* Remove extra entries in changelog

Co-authored-by: Maurizio Branca <[email protected]>
Co-authored-by: Maurizio Branca <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
…is a string (#33654)

* Rename identity as identity_name when is a string

The identity field comes in different flavors, depending on the
specific log category.

If it comes as a string, the pipeline renames it as identity_name to
avoid collisions when the value is an object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport with mergify backport-v8.6.0 Automated backport with mergify bug Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants