Skip to content

[Metricbeat] GCP refactor getFilterForMetric ifelse to switch#33047

Merged
gpop63 merged 3 commits intoelastic:mainfrom
gpop63:gcp-metrics_req_ifelse_to_switch
Sep 15, 2022
Merged

[Metricbeat] GCP refactor getFilterForMetric ifelse to switch#33047
gpop63 merged 3 commits intoelastic:mainfrom
gpop63:gcp-metrics_req_ifelse_to_switch

Conversation

@gpop63
Copy link
Contributor

@gpop63 gpop63 commented Sep 11, 2022

What does this PR do?

Refactors getFilterForMetric if else cases to switch cases as requested by @endorama #32964 (comment)

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 Sep 11, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 11, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @gpop63? 🙏.
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

@mergify mergify bot assigned gpop63 Sep 11, 2022
@gpop63 gpop63 added Team:Cloud-Monitoring Label for the Cloud Monitoring team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 11, 2022
@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 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-09-12T10:51:28.072+0000

  • Duration: 51 min 4 sec

Test stats 🧪

Test Results
Failed 0
Passed 1316
Skipped 87
Total 1403

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

- Fix and improve AWS metric period calculation to avoid zero-length intervals {pull}32724[32724]
- Add network name to data.json {pull}32986[32986]
- Add missing cluster metadata to k8s module metricsets {pull}32979[32979]
- GCP refactor getFilterForMetric ifelse to switch {pull}33047[33047]
Copy link
Contributor

Choose a reason for hiding this comment

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

This changeset does not require a changelog, as no functionality changes, so you could remove this.

@mergify
Copy link
Contributor

mergify bot commented Sep 12, 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 gcp-metrics_req_ifelse_to_switch upstream/gcp-metrics_req_ifelse_to_switch
git merge upstream/main
git push upstream gcp-metrics_req_ifelse_to_switch

@gpop63 gpop63 marked this pull request as ready for review September 12, 2022 18:40
@gpop63 gpop63 requested a review from a team as a code owner September 12, 2022 18:40
@gpop63 gpop63 merged commit 833963b into elastic:main Sep 15, 2022
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* refactor getFilterForMetric ifelse to switch

* add changelog entry

* Revert "add changelog entry"

This reverts commit ba6fec4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Cloud-Monitoring Label for the Cloud Monitoring team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants