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

[metricbeat] gcp: check for nil metadata #32281

Merged
merged 3 commits into from
Jul 19, 2022

Conversation

gpop63
Copy link
Contributor

@gpop63 gpop63 commented Jul 10, 2022

What does this PR do?

Checks for nil metadata to avoid panics.

Why is it important?

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 10, 2022
@mergify mergify bot assigned gpop63 Jul 10, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 10, 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-07-13T17:06:27.420+0000

  • Duration: 57 min 21 sec

Test stats 🧪

Test Results
Failed 0
Passed 1115
Skipped 87
Total 1202

💚 Flaky test report

Tests succeeded.

🤖 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!)

@gpop63 gpop63 marked this pull request as ready for review July 11, 2022 14:03
@gpop63 gpop63 requested a review from a team as a code owner July 11, 2022 14:03
@gpop63 gpop63 added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label Jul 11, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 11, 2022
@endorama
Copy link
Member

Given this is a bugfix it should be backported to 8.3 and 7.17, I've added the relevant labels.

@endorama endorama added backport-v8.3.0 Automated backport with mergify backport-7.17 Automated backport to the 7.17 branch with mergify labels Jul 12, 2022
@endorama
Copy link
Member

endorama commented Jul 12, 2022

@gpop63 may you please add a Changelog entry for this change (under Metricbeat bugfixes)?

@mergify
Copy link
Contributor

mergify bot commented Jul 13, 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 fix_nil_metadata_panic upstream/fix_nil_metadata_panic
git merge upstream/main
git push upstream fix_nil_metadata_panic

@gpop63 gpop63 merged commit fa8d17f into elastic:main Jul 19, 2022
mergify bot pushed a commit that referenced this pull request Jul 19, 2022
* add check for nil metadata

* add changelog entry

(cherry picked from commit fa8d17f)
mergify bot pushed a commit that referenced this pull request Jul 19, 2022
* add check for nil metadata

* add changelog entry

(cherry picked from commit fa8d17f)
gpop63 added a commit that referenced this pull request Aug 24, 2022
* add check for nil metadata

* add changelog entry

(cherry picked from commit fa8d17f)

Co-authored-by: gpop63 <[email protected]>
gpop63 added a commit that referenced this pull request Aug 25, 2022
* [metricbeat] gcp: check for nil metadata (#32281)

* add check for nil metadata

* add changelog entry

(cherry picked from commit fa8d17f)

* Update CHANGELOG.next.asciidoc

* Update CHANGELOG.next.asciidoc

Co-authored-by: gpop63 <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* add check for nil metadata

* add changelog entry
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.3.0 Automated backport with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metricbeat GCP Module panics on nil Metadata in Metricset
3 participants