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

RFE: Use a HOSTNAME environment variable instead of socket.getfqdn() in ResultLog #1615

Closed
hroncok opened this issue Jul 14, 2020 · 4 comments · Fixed by #1616
Closed

RFE: Use a HOSTNAME environment variable instead of socket.getfqdn() in ResultLog #1615

hroncok opened this issue Jul 14, 2020 · 4 comments · Fixed by #1616
Labels
feature:new something does not exist yet, but should

Comments

@hroncok
Copy link
Contributor

hroncok commented Jul 14, 2020

Hello. When I build Fedora RPM Python packages locally, I have a setup with disabled network -- to make sure the package will build fine in the official Fedora build system, which is "offline".

My setup (common to other Fedora packagers) times out when the code within runs DNS queries. tox, even when invoked very simply (e.g. via tox -l), calls socket.getfqdn():

"host": socket.getfqdn(),

As a result, the invocation hangs for ~1 minute, then proceeds. This is a tad inconvenient, especially since tox might be invoked multiple times in some of our packages.

I respect that this network setup is not the most common one. However, would you accept a pull request that prefers the value of the HOSTNAME environment variable if set, over a call to socket.getfqdn()?

@hroncok hroncok added the feature:new something does not exist yet, but should label Jul 14, 2020
@gaborbernat
Copy link
Member

gaborbernat commented Jul 14, 2020

I respect that this network setup is not the most common one. However, would you accept a pull request that prefers the value of the HOSTNAME environment variable if set, over a call to socket.getfqdn()?

Sounds good.

hroncok added a commit to hroncok/tox that referenced this issue Jul 14, 2020
…sultLog

This makes it possible to prevent an undesired DNS query.

Fixes tox-dev#1615
@hroncok
Copy link
Contributor Author

hroncok commented Jul 14, 2020

Ready for inspection in #1616

gaborbernat pushed a commit that referenced this issue Jul 14, 2020
…sultLog (#1616)

This makes it possible to prevent an undesired DNS query.

Fixes #1615
@hroncok
Copy link
Contributor Author

hroncok commented Jul 14, 2020

Thank you for accepting my change.

@gaborbernat
Copy link
Member

gaborbernat commented Jul 14, 2020

Thanks for the PR.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
ssbarnea pushed a commit to ssbarnea/tox that referenced this issue Apr 19, 2021
…sultLog (tox-dev#1616)

This makes it possible to prevent an undesired DNS query.

Fixes tox-dev#1615
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature:new something does not exist yet, but should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants