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

Remove Agent 5 conditional imports #5322

Merged
merged 3 commits into from
Jan 3, 2020
Merged

Conversation

mgarabed
Copy link
Member

What does this PR do?

Reduce try/except blocks which were guarding against Agent 5 usage. Since Agent 5 is currently on a separate branch, these guards are no longer necessary.

Motivation

Code cleanup.

Additional Notes

There are some #TODOs in datadog_checks/base/checks/base.py which also look ripe for removal, but its not clear how much of the stanzas are specific to Agent 5.

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

@mgarabed mgarabed requested review from a team as code owners December 23, 2019 18:51
@codecov
Copy link

codecov bot commented Dec 23, 2019

Codecov Report

Merging #5322 into master will decrease coverage by 0.65%.
The diff coverage is 71.42%.

Impacted Files Coverage Δ
...dog_checks_base/datadog_checks/base/checks/base.py 80.16% <ø> (ø) ⬆️
datadog_checks_base/datadog_checks/base/config.py 100% <ø> (ø) ⬆️
...ase/datadog_checks/base/utils/subprocess_output.py 0% <0%> (ø) ⬆️
...checks_base/datadog_checks/base/checks/__init__.py 100% <100%> (+14.28%) ⬆️
.../datadog_checks/base/checks/prometheus/__init__.py 100% <100%> (ø) ⬆️
datadog_checks_base/tests/conftest.py 33.33% <0%> (-66.67%) ⬇️
datadog_checks_dev/datadog_checks/dev/docker.py 45.76% <0%> (-17.1%) ⬇️
...atadog_checks_base/datadog_checks/base/__init__.py 73.33% <0%> (-13.34%) ⬇️
datadog_checks_base/tests/test_http.py 88.96% <0%> (-9.25%) ⬇️
datadog_checks_base/tests/test_winpdh.py 90.9% <0%> (-6.82%) ⬇️
... and 133 more

Copy link
Contributor

@ofek ofek left a comment

Choose a reason for hiding this comment

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

🥇

@mgarabed mgarabed changed the title [WIP] Remove Agent5 conditional imports Remove Agent5 conditional imports Jan 2, 2020
@ofek ofek changed the title Remove Agent5 conditional imports Remove Agent 5 conditional imports Jan 3, 2020
@ofek ofek merged commit e035a32 into master Jan 3, 2020
@ofek ofek deleted the mgarabed/subprocess-cleanup branch January 3, 2020 00:36
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