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

Do not use check inheritance #9433

Merged
merged 3 commits into from
May 27, 2021
Merged

Do not use check inheritance #9433

merged 3 commits into from
May 27, 2021

Conversation

hithwen
Copy link
Contributor

@hithwen hithwen commented May 27, 2021

Having inheritance on a check will cause the agent to not load it properly. The issue presents in this case when there is more than one instance of the check. The first instance will load the child class and the second instance will fail to find the parent class

The fix here (we can think of something more elegant for long term) is to pass the parent class to the now not children classes and explicitly call it instead of using self

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #9433 (2453234) into master (e9d9395) will increase coverage by 0.01%.
The diff coverage is 96.00%.

Flag Coverage Δ
tls 97.04% <96.00%> (+0.87%) ⬆️

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

Impacted Files Coverage Δ
tls/datadog_checks/tls/tls_remote.py 81.19% <92.30%> (+1.02%) ⬆️
tls/datadog_checks/tls/tls.py 96.21% <100.00%> (-0.06%) ⬇️
tls/datadog_checks/tls/tls_local.py 100.00% <100.00%> (ø)
tls/tests/test_local.py 100.00% <100.00%> (ø)
tls/tests/test_remote.py 100.00% <100.00%> (+1.38%) ⬆️
tls/datadog_checks/tls/utils.py 100.00% <0.00%> (+9.30%) ⬆️

@hithwen hithwen merged commit 7c35a2a into master May 27, 2021
@hithwen hithwen deleted the js/incident-10754-fix-tls branch May 27, 2021 17:30
ofek pushed a commit that referenced this pull request May 27, 2021
* Do not use check inheritance
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.

2 participants