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

Refactor: reduce duplication, condense method implementation #14501

Conversation

iliakur
Copy link
Contributor

@iliakur iliakur commented May 3, 2023

What does this PR do?

Motivation

We use essentially the same logic to convert ES health statuses to DD statuses in two places. This PR unifies the two approaches.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

@iliakur iliakur requested a review from a team as a code owner May 3, 2023 12:39
Copy link
Contributor Author

iliakur commented May 3, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Comment on lines +29 to +30
DatadogESHealth = namedtuple('DatadogESHealth', ['status', 'reverse_status', 'tag'])
ES_HEALTH_TO_DD_STATUS = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To reviewer: I'm not happy with these names, alternatives welcome!

@github-actions
Copy link

github-actions bot commented May 3, 2023

Test Results

     20 files       20 suites   6m 8s ⏱️
   108 tests    105 ✔️   3 💤 0
1 090 runs  1 023 ✔️ 67 💤 0

Results for commit 9945a3a.

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #14501 (9945a3a) into master (11e6972) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Flag Coverage Δ
elastic 91.91% <100.00%> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@iliakur iliakur merged commit 6ddcc50 into master May 3, 2023
@iliakur iliakur deleted the ik/Refactor_reduce_duplication_condense_method_implementation branch May 3, 2023 19:14
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.

3 participants