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

JSONFormatter use getfqdn #2038

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

jonathangreen
Copy link
Member

Description

Use getfqdn always, since it falls back to gethostname.

See python docs:

Return a fully qualified domain name for name. If name is omitted or empty, it is interpreted as the local host. ... In case no fully qualified domain name is available and name was provided, it is returned unchanged. If name was empty or equal to '0.0.0.0', the hostname from gethostname() is returned.

Motivation and Context

This constantly causes noise in the coverage of our test runs, because sometimes this if is hit and sometimes it isn't. Depending on the CI workers the tests run on.

How Has This Been Tested?

  • Tested that this makes no difference in our production environment. Both getfqdn and gethostname always return the same thing.

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jonathangreen jonathangreen requested a review from a team September 6, 2024 17:20
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.72%. Comparing base (f8440a8) to head (e6c621d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2038   +/-   ##
=======================================
  Coverage   90.72%   90.72%           
=======================================
  Files         342      342           
  Lines       40572    40568    -4     
  Branches     8796     8795    -1     
=======================================
- Hits        36808    36805    -3     
  Misses       2503     2503           
+ Partials     1261     1260    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

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

👍🏽

@jonathangreen jonathangreen merged commit 69f6e3e into main Sep 6, 2024
20 checks passed
@jonathangreen jonathangreen deleted the chore/json-formatter-hostname branch September 6, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants