Skip to content

Conversation

@jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jan 31, 2024

Previously tests on mac-os > 11 failed when we tried to establish the connection using the hostname from from socket import gethostname. Now this pull request implements a switch to disable resolving the hostname. This is dangerous in distributed environments like HPC clusters, as we want to be able to access python processes on different hosts. So the default behaviour remains the same and from socket import gethostname is used. Only for the tests this option is disabled and the hostname is set to localhost instead. Naively I thought a computer would be able to resolve that its hostname refers to localhost but it seems this behaviour changed in mac-os > 11.

@jan-janssen jan-janssen requested a review from liamhuber January 31, 2024 16:46
@jan-janssen
Copy link
Member Author

@liamhuber Just for you information.

@jan-janssen jan-janssen merged commit eca7c31 into main Jan 31, 2024
@jan-janssen jan-janssen deleted the localhost branch January 31, 2024 16:53
@liamhuber
Copy link
Member

liamhuber commented Jan 31, 2024

Thanks for the heads-up, @jan-janssen. The solution seems reasonable to me. I would suggest though to take the text of your explanatory comment above here and include it in the source code itself, so the intent is really clear. This could be in the docstring or even as a #comment right near where the flag gets set as an attribute.

Edit: sorry, not at flag set, but adjacent to the if not host name clause

@jan-janssen
Copy link
Member Author

This can be reverted once actions/runner-images#8649 is fixed.

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.

3 participants