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

Remove deprecated SDK meta version function usage #432

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

optik-aper
Copy link
Member

@optik-aper optik-aper commented Nov 14, 2023

Description

Resolve the deprecation lint error:

Golangci-Lint: vultr/config.go#L32
SA1019: meta.SDKVersionString is deprecated: Use Go standard library [runtime/debug] package build information instead. (staticcheck)

These changes will lookup the module by the path, then set the User-Agent string to Terraform/ plus whatever is returned from the module. For example:

User-Agent=Terraform/v2.30.0

If for some reason it cannot determine the version number, it will default to v0.0.0 for the sake of consistency

Checklist:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you linted your code locally prior to submission?
  • Have you successfully ran tests with your changes locally?

Testing

Set the debug output, run a command and check the value passed in the output file.

export TF_LOG_PATH=...
export TF_LOG=debug
terraform apply

@optik-aper optik-aper added dependencies automation Build/release workflow related labels Nov 14, 2023
@optik-aper optik-aper self-assigned this Nov 14, 2023
Copy link
Contributor

@christhemorse christhemorse left a comment

Choose a reason for hiding this comment

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

Looks good!

@optik-aper optik-aper merged commit ed86784 into vultr:master Nov 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Build/release workflow related dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants