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

Error: Incompatible provider version since version ~> 0.3 #76

Open
eexit opened this issue May 11, 2023 · 16 comments
Open

Error: Incompatible provider version since version ~> 0.3 #76

eexit opened this issue May 11, 2023 · 16 comments

Comments

@eexit
Copy link
Collaborator

eexit commented May 11, 2023

Hello,

Since version ~> 0.3, I'm getting incompatible provider error:

│ Error: Incompatible provider version
│ 
│ Provider registry.terraform.io/ugns/bref v0.3.2 does not have a package
│ available for your current platform, linux_amd64.
│ 
│ Provider releases are separate from Terraform CLI releases, so not all
│ providers are available for all platforms. Other versions of this provider
│ may have different platforms supported.

Provider config:

bref = {
      source  = "ugns/bref"
      version = "~> 0.3"
}

We are using:

Terraform v1.4.4 on linux_amd64

Any clue?

Thanks!

@eexit eexit changed the title Error: Incompatible provider version Error: Incompatible provider version since version ~> 0.3 May 11, 2023
@jbouse
Copy link
Member

jbouse commented May 11, 2023

Hmm... that is interesting. I see the linux_386, linux_amd64, linux_arm, and linux_arm64 artifacts on the release...

@jbouse
Copy link
Member

jbouse commented May 11, 2023

I am thinking this may be an issue with the Terraform Registry since changing the organization from UGNS to ugns. When I go to the site it's still showing it capitalized but when I try to test locally performing the terraform init I get the same result.

@jbouse
Copy link
Member

jbouse commented May 11, 2023

Indications due seem to agree with that theory... The last version I'm able to set is version = "0.2.0" which was the last version before I changed the organization name to lowercase. I'll try to open a ticket with the registry.

@eexit
Copy link
Collaborator Author

eexit commented May 11, 2023

Indications due seem to agree with that theory... The last version I'm able to set is version = "0.2.0" which was the last version before I changed the organization name to lowercase. I'll try to open a ticket with the registry.

Yes, we had to pin to that version on our side.

Thanks!

@jbouse
Copy link
Member

jbouse commented May 11, 2023

I've got a ticket opened with Terraform Registry, and as soon as I have some resolution, I'll let you know.

Thank you for your contribution.

@jbouse
Copy link
Member

jbouse commented May 12, 2023

Just an update... Still radio silence from Hashicorp but I have confirmed the issue is on their side with my org change from UGNS to ugns... When I tried to access the new v0.3.3 release via https://registry.terraform.io/v1/providers/ugns/bref/0.3.3/download/linux/amd64 I get the error message of {"errors":["signing key A616887B07872891 not found for UGNS"]} which is the right GPG key signing the release but it's registed with the ugns namespace and I can no longer add it back under UGNS namespace. It appears like they [Hashicorp] are treating the namespace as both case-insensitive and case-sensitive under different contexts. Even if you add it as UGNS/bref in the required_providers source you will note the init process will display it attempting to download as ugns/bref.

❯ TF_LOG=debug tf init
2023-05-12T01:41:13.037-0400 [INFO]  Terraform version: 1.3.6
2023-05-12T01:41:13.037-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2023-05-12T01:41:13.037-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.15.0
2023-05-12T01:41:13.037-0400 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-05-12T01:41:13.037-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2023-05-12T01:41:13.037-0400 [DEBUG] using github.com/zclconf/go-cty v1.12.1
2023-05-12T01:41:13.037-0400 [INFO]  Go runtime version: go1.19.3
2023-05-12T01:41:13.037-0400 [INFO]  CLI args: []string{"terraform", "init"}
2023-05-12T01:41:13.037-0400 [DEBUG] Attempting to open CLI config file: /home/jbouse/.terraformrc
2023-05-12T01:41:13.037-0400 [INFO]  Loading CLI configuration from /home/jbouse/.terraformrc
2023-05-12T01:41:13.037-0400 [INFO]  Loading CLI configuration from /home/jbouse/.terraform.d/credentials.tfrc.json
2023-05-12T01:41:13.037-0400 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-05-12T01:41:13.037-0400 [DEBUG] ignoring non-existing provider search directory /home/jbouse/.terraform.d/plugins
2023-05-12T01:41:13.037-0400 [DEBUG] ignoring non-existing provider search directory /home/jbouse/.local/share/terraform/plugins
2023-05-12T01:41:13.037-0400 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2023-05-12T01:41:13.037-0400 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2023-05-12T01:41:13.038-0400 [INFO]  CLI command args: []string{"init"}

Initializing the backend...
2023-05-12T01:41:13.040-0400 [DEBUG] New state was assigned lineage "4a006c60-2fa4-a033-6256-98d0925ee549"
2023-05-12T01:41:13.040-0400 [DEBUG] checking for provisioner in "."
2023-05-12T01:41:13.043-0400 [DEBUG] checking for provisioner in "/usr/bin"

Initializing provider plugins...
- Finding ugns/bref versions matching "0.3.3"...
2023-05-12T01:41:13.043-0400 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2023-05-12T01:41:13.308-0400 [DEBUG] GET https://registry.terraform.io/v1/providers/ugns/bref/versions
2023-05-12T01:41:13.473-0400 [DEBUG] GET https://registry.terraform.io/v1/providers/ugns/bref/0.3.3/download/linux/amd64
╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/ugns/bref v0.3.3 does not have a package available for your
│ current platform, linux_amd64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available
│ for all platforms. Other versions of this provider may have different platforms supported.

@eexit
Copy link
Collaborator Author

eexit commented May 12, 2023

Have you tried to set a new PGP key? Maybe it's needed when renaming an org. No idea. Will this break previous versions if you do so?

Thanks for the update 👍🏻

@jbouse
Copy link
Member

jbouse commented May 12, 2023

The key is uploaded and listed under the ugns namespace, but it is trying to look for it under the UGNS namespace. I can not upload any keys to the UGNS namespace now that I've changed it to lowercase.

@jbouse
Copy link
Member

jbouse commented May 15, 2023

Going back into my Hashicorp support tickets this was original an issue I opened up 2 years ago with them when I changed the organization case to be lowercase and they still haven't resolved it because I'm not paying them for support.

@eexit
Copy link
Collaborator Author

eexit commented May 15, 2023

Oh gosh... and I guess reverting to uppercase won't solve the issue either?

Thanks for the update!

@jbouse
Copy link
Member

jbouse commented May 15, 2023

Probably not... it also only affects providers, not modules, as only the provider releases are GPG signed. My modules are a mix of uppercase and lowercase, depending on when they were set up (before or after the change), and they work fine. I'm only having this issue with my provider.

@jbouse
Copy link
Member

jbouse commented May 16, 2023

So looks like Hashicorp won't ever get to resolving this issue with name changes or ability to remove the provider/module so it could be re-published, so that leaves me with the option of change my organization name or change the repo name... I created a fork of this repo as terraform-provider-brefphp and published that and it is working fine now... https://registry.terraform.io/providers/ugns/brefphp/latest

@eexit
Copy link
Collaborator Author

eexit commented May 16, 2023

Hi @jbouse,

Thank you!
It would be worth trying deleting the repo and re-creating? Maybe that's the workaround?

@jbouse
Copy link
Member

jbouse commented May 16, 2023

No, because the issue is on Hashicorp's side, not GitHub's... GitHub operates in a case-insensitive manner in this regard, and UGNS/terraform-provider-bref and ugns/terraform-provider-bref go to the same destination... The Hashicorp Registry does the same, sort of, in that UGNS/bref and ugns/bref display the same information, the issue is when you go to require the provider it looks for the GPG key with the namespace in a case-sensitive manner, so UGNS vs. ugns are two entirely different meanings in this regard.

Deleting the GitHub repo will stay the same because the Hashicorp Registry already believes it has been published, and Hashicorp doesn't provide any means to unpublish/delete once published. What they need is a means to update the namespace, but they don't offer the community with any viable support. They only offer support if you pay for service, which completely disregards the community producing providers that don't pay despite encouraging community development.

@eexit
Copy link
Collaborator Author

eexit commented May 16, 2023

Sorry, I meant the registry, not the Github repo.

@jbouse
Copy link
Member

jbouse commented May 16, 2023

If I could delete the registry and then re-publish, that would solve the issue, but Hashicorp doesn't provide any means to delete once published. Once it's set up and published the first time, the only option you're given is to synchronize the webhook, nothing to update the namespace or delete the provider/module entirely.

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

No branches or pull requests

2 participants