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

provider: Use real Terraform version in UA header #437

Merged
merged 1 commit into from
Aug 24, 2019
Merged

Conversation

radeksimko
Copy link
Contributor

@radeksimko radeksimko commented Aug 1, 2019

The existing implementation leverages Terraform's version package as Terraform currently provides the SDK for interacting with core and is therefore imported by the provider, including the version package.

The side effect of this is that provider reports version of vendored Terraform (i.e. plugin SDK), not the version which actually talks to the provider's gRPC server and parses the configuration.

This PR is leveraging recent changes introduced in 0.12 to fix that and report accurate version.


This also changes the header from the following

Terraform/X.Y.Z terraform-provider-cloudflare/X.Y.Z

to

HashiCorp Terraform/X.Y.Z (+https://www.terraform.io) terraform-provider-cloudflare/X.Y.Z

to align UA string with hashicorp/terraform#22272

@jacobbednarz
Copy link
Member

@radeksimko Looks like hashicorp/terraform#22272 has landed, is this ready for merge now?

@radeksimko
Copy link
Contributor Author

radeksimko commented Aug 19, 2019

We are in the process of resolving some upstream dependency issues before we cut the next version and update this PR, please hold.

hashicorp/terraform#22490

@ghost ghost added size/XXL and removed size/L labels Aug 22, 2019
@radeksimko radeksimko marked this pull request as ready for review August 22, 2019 07:47
@ghost ghost added size/S and removed size/XXL labels Aug 23, 2019
@radeksimko
Copy link
Contributor Author

@patryk I have updated the description of the PR so you can understand the full impact which may not be immediately obvious + I rebased to the latest master.

Could you please confirm you're ok with it and happy for me to merge?

Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

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

LGTM

@radeksimko radeksimko merged commit 7b74d95 into master Aug 24, 2019
@radeksimko radeksimko deleted the f-user-agent branch August 24, 2019 07:50
@patryk
Copy link
Contributor

patryk commented Aug 26, 2019

Thanks @radeksimko, great to see it in!

boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants