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

Bump the dnspython version to 2.4.2 #16150

Merged
merged 4 commits into from
Nov 6, 2023

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Nov 6, 2023

What does this PR do?

Bump the dnspython version to 2.4.2 on Python 3.

I also paramtrized a test and adapted the mocks

Motivation

  • It was pinned here but in fact they changed the type of items from a list to a dict
  • Noticed bumping the Python version to 3.11

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

@FlorentClarret FlorentClarret force-pushed the florentclarret/dns_check/bump_dnspython branch 2 times, most recently from c11180e to 8defd4d Compare November 6, 2023 09:50
Copy link

github-actions bot commented Nov 6, 2023

Test Results

  8 files    8 suites   49s ⏱️
13 tests 13 ✔️ 0 💤 0
56 runs  52 ✔️ 4 💤 0

Results for commit 31ac0e7.

♻️ This comment has been updated with latest results.

@FlorentClarret FlorentClarret force-pushed the florentclarret/dns_check/bump_dnspython branch from 8defd4d to 733aed4 Compare November 6, 2023 11:07
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #16150 (31ac0e7) into master (3b5473e) will increase coverage by 0.10%.
Report is 4 commits behind head on master.
The diff coverage is 90.90%.

Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
dns_check 93.33% <90.90%> (-0.58%) ⬇️
hive ?
hivemq ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?
tomcat ?

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

@FlorentClarret FlorentClarret force-pushed the florentclarret/dns_check/bump_dnspython branch 3 times, most recently from d233c39 to e3bf2e6 Compare November 6, 2023 13:31
@FlorentClarret FlorentClarret marked this pull request as ready for review November 6, 2023 13:39
@FlorentClarret FlorentClarret requested a review from a team as a code owner November 6, 2023 13:39
@FlorentClarret FlorentClarret force-pushed the florentclarret/dns_check/bump_dnspython branch 2 times, most recently from b4e9c41 to 8d4de32 Compare November 6, 2023 13:51
@FlorentClarret FlorentClarret force-pushed the florentclarret/dns_check/bump_dnspython branch from 8d4de32 to 561ad77 Compare November 6, 2023 13:52
assert answer.rrset.items[0].to_text()

items = list(answer.rrset.items.keys()) if PY3 else answer.rrset.items
assert items[0].to_text()
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if what was originally intended was something like

Suggested change
assert items[0].to_text()
assert any(it.to_text() for it in items)

That would make it independent of whether it's a list or a dict, and would seem easier to understand (otherwise, some comment explaining why the first element is so important here would be in order).

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have the background, let's do it that way

Copy link
Contributor

Choose a reason for hiding this comment

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

Now items can be answer.rrset.items without needing to check PY3, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦

dns_check/datadog_checks/dns_check/dns_check.py Outdated Show resolved Hide resolved
@FlorentClarret FlorentClarret merged commit 092730e into master Nov 6, 2023
34 checks passed
@FlorentClarret FlorentClarret deleted the florentclarret/dns_check/bump_dnspython branch November 6, 2023 14:42
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