Skip to content

Conversation

@rjmholt
Copy link
Collaborator

@rjmholt rjmholt commented Jun 11, 2020

PR Summary

Fixes #12935.

macOS has had issues with DNS in CI, so this PR falls back to using the gateway address when DNS doesn't work.

Using the gateway address doesn't seem to work well on other platforms though, so we still try DNS lookup.

PR Checklist

@ghost ghost assigned anmenaga Jun 11, 2020
@rjmholt rjmholt requested review from SteveL-MSFT, TravisEz13, adityapatwardhan and iSazonov and removed request for adityapatwardhan June 11, 2020 18:26
@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 11, 2020

From CI, it seems that solving the setup issue kicks the can down to a test failure instead where Test-Connection falls over

@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 11, 2020

From the CI, it looks like ifconfig is able to resolve the address properly

@vexx32
Copy link
Collaborator

vexx32 commented Jun 11, 2020

@rjmholt the cmdlet uses the system.net.dns APIs internally quite a bit, so I'd imagine if those APIs themselves are failing it'll most likely fall apart in at least a couple of cases.

Definitely seems like something changed that the .NET Core folks will need to take a look at... 😕


if (-not $?)
{
Get-Error | Out-String | Write-Host
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to use -Because with the first Should test to have this in the test log?

@rjmholt rjmholt marked this pull request as draft June 12, 2020 20:55
@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 12, 2020

Ok the latest change proves that this is a CI configuration issue rather than a .NET issue

@rjmholt rjmholt closed this Jun 12, 2020
@rjmholt
Copy link
Collaborator Author

rjmholt commented Jun 12, 2020

Reopening to run something in CI

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 12, 2020
@rjmholt rjmholt changed the title Remove dependency on DNS in Test-Connection tests, re-enable tests on macOS Remove dependency on DNS for Test-Connection tests on macOS Jun 16, 2020
@rjmholt rjmholt requested a review from PaulHigin June 16, 2020 02:11
@iSazonov iSazonov added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Jun 16, 2020
@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 16, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 16, 2020
@adityapatwardhan
Copy link
Member

@SteveL-MSFT Please update your review

$gatewayAddress = GetGatewayAddress
$publicHostAddress = GetExternalHostAddress -HostName $hostName

$testAddress = if ($publicHostAddress) { $publicHostAddress } else { $gatewayAddress }
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking, but could have used the null conditional assignment operator here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This needs to port back to 6.2 -- deliberately removed new operators in most recent commit

@TravisEz13 TravisEz13 dismissed SteveL-MSFT’s stale review June 16, 2020 19:36

said review was not blocking

@TravisEz13 TravisEz13 changed the title Remove dependency on DNS for Test-Connection tests on macOS Remove dependency on DNS for Test-Connection tests on macOS Jun 16, 2020
@TravisEz13 TravisEz13 merged commit a650709 into PowerShell:master Jun 16, 2020
@TravisEz13 TravisEz13 added this to the 7.1.0-preview.4 milestone Jun 16, 2020
@TravisEz13 TravisEz13 assigned TravisEz13 and unassigned anmenaga Jun 16, 2020
@ghost
Copy link

ghost commented Jun 25, 2020

🎉v7.1.0-preview.4 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 16, 2020

🎉v7.0.3 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test-Connection test setup fails on macOS due to DNS issue

8 participants