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

Bump Go version to fix macOS resolver issue #1941

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

pziggo
Copy link
Contributor

@pziggo pziggo commented Jul 13, 2023

With Go version < 1.20, Go is using the internal Go DNS resolver by default
which only considers the file /etc/resolv.conf similar to glibc's behaviour.
But macOS also supports additional configurations under /etc/resolver which
is often used for local development to use proper name resolution.

The behaviour has been changed beginning with Go version 1.20
(see also https://go-review.googlesource.com/c/go/+/446178)

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #1940

Release note for CHANGELOG:

Add support for macOS resolver configuration

Output from acceptance testing:

$ go version
go version go1.20.6 darwin/amd64
$ make testacc TESTARGS='-run=TestAccXXX'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -run=TestAccXXX -timeout 30m ./...
?       github.com/hashicorp/terraform-provider-vault   [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/coverage      [no test files]
?       github.com/hashicorp/terraform-provider-vault/cmd/generate      [no test files]
?       github.com/hashicorp/terraform-provider-vault/generated [no test files]
ok      github.com/hashicorp/terraform-provider-vault/codegen   (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role        (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/helper    [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/consts   [no test files]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template    (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation      (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/group   [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/identity/mfa     [no test files]
?       github.com/hashicorp/terraform-provider-vault/internal/pki      [no test files]
ok      github.com/hashicorp/terraform-provider-vault/internal/identity/entity  (cached) [no tests to run]
?       github.com/hashicorp/terraform-provider-vault/schema    [no test files]
ok      github.com/hashicorp/terraform-provider-vault/internal/provider (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/testutil  (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/util      (cached) [no tests to run]
ok      github.com/hashicorp/terraform-provider-vault/vault     0.955s [no tests to run]
...

With Go version < 1.20, Go is using the internal Go DNS resolver by default
which only considers the file /etc/resolv.conf similar to glibc's behaviour.
But macOS also supports additional configurations under /etc/resolver which
is often used for local development to use proper name resolution.

The behaviour has been changed beginning with Go version 1.20
(see also https://go-review.googlesource.com/c/go/+/446178)

Fixes hashicorp#1940
@hashicorp-cla
Copy link

hashicorp-cla commented Jul 13, 2023

CLA assistant check
All committers have signed the CLA.

@heatherezell
Copy link

Thank you for this! OS X resolver issues have been a bit of a bear for a while. Our engineering team is including it in a review of dependencies, and we're tracking this PR with that. Thanks again!

@fairclothjm fairclothjm modified the milestones: Future, 3.19.0 Jul 14, 2023
Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @pziggo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing support for /etc/resolver DNS resolution configuration on macOS
4 participants