Revert "Add full_hostname host variable"#46478
Conversation
…fied hos…" This reverts commit 6b0011c.
|
@Jordan474 I'm reverting this for now, since apparently 30 minutes of CI time is spent on getfqdn. Any clue where that overhead is coming from? Feel free to resubmit a PR. |
|
We call |
|
Indeed, there are several reports of issues with fqdn on macOS. There seems to be a user-side workaround: I'm wondering if the Note that even on Linux, I probably should have memoized fqdn, because fqdn could query the DNS if |
|
I tested a few options on github latest runners:
"fast" means between 1 to 10 ms. I removed python cold start and overheads before comparing the results. (1): on the windows runner, (2): On macos, the full hostname is just hostname plus EDIT: To clarify, on macos, The @memoized
def _getfqdn():
name = socket.gethostname()
# Local hostname, avoid slow getfqdn on MacOS
if name.endswith(".local"):
return name
return socket.getfqdn(name)I don't think it's worth it implementing a different subprocess for each platform. |
It looks like this commit causes a major performance penalty in unit test time on macOS. Fine with the feature in principle, but has to be redone.
Reverts #45522