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

Can't upgrade tfbridge to v3.33.0 or higher due to azcore conflict #197

Closed
viveklak opened this issue Nov 8, 2022 · 2 comments · Fixed by #328
Closed

Can't upgrade tfbridge to v3.33.0 or higher due to azcore conflict #197

viveklak opened this issue Nov 8, 2022 · 2 comments · Fixed by #328
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed

Comments

@viveklak
Copy link
Contributor

viveklak commented Nov 8, 2022

What happened?

This is a follow-up from #192 for which a workaround was added in #196. However, we are currently blocked from taking a new version of the bridge because updating pulumi-terraform-bridge to v3.33.0 causes a build failure:

github.com/hashicorp/terraform-provider-vault/internal/provider
../../../go/pkg/mod/github.com/pulumi/[email protected]/internal/provider/auth_azure.go:185:9: tOpts.TenantID undefined (type policy.TokenRequestOptions has no field or method TenantID)
# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:19:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:62:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:105:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:148:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:191:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:234:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:277:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:320:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:363:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:406:13: undefined: azcore.Poller
../../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/resources/[email protected]/zz_generated_pollers.go:406:13: too many errors

The underlying issue seems to be because of these updates (going from tfbridge 3.32.0 to 3.33.0):

go: downloading github.com/pulumi/pulumi-terraform-bridge/v3 v3.33.0
go: upgraded cloud.google.com/go v0.102.1 => v0.103.0
go: upgraded github.com/Azure/azure-sdk-for-go v61.4.0+incompatible => v66.0.0+incompatible
go: upgraded github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0 => v1.1.1
go: upgraded github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.2 => v1.0.0
go: upgraded github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 => v1.0.0
go: upgraded github.com/Azure/go-autorest/autorest v0.11.24 => v0.11.28
go: upgraded github.com/Azure/go-autorest/autorest/adal v0.9.18 => v0.9.21
go: upgraded github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 => v0.4.6
go: upgraded github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a => v0.0.0-20210307081110-f21760c49a8d

This is because of the bump of pulumi/pkg etc. to v3.44.2 which brought in new versions of the above package in pulumi/pulumi#10900.

Vault terraform provider is still using the older versions of the above libraries which causes the conflict.

Steps to reproduce

cd provider ;  go get -u github.com/pulumi/pulumi-terraform-bridge/v3; make build

Expected Behavior

Build succeeds

Actual Behavior

Build fails

Output of pulumi about

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@viveklak viveklak added needs-triage Needs attention from the triage team kind/bug Some behavior is incorrect or out of spec kind/engineering Work that is not visible to an external user labels Nov 8, 2022
@lblackstone lblackstone removed the needs-triage Needs attention from the triage team label Nov 10, 2022
AaronFriel added a commit to pulumi/pulumi that referenced this issue Jan 24, 2023
Having previously made a pull request removing azure-sdk-for-go as a dependency
of gocloud.dev, this PR updates the CLI to remove the transitive dependency.

Removing the dependency on azure-sdk-for-go reduces module cache weight by
492MiB. That's the apparent size of `~/go/pkg/mod/github.com/!azure` according
to a disk usage utility.

This makes the new largest targets for reducing size:

```
258 MiB google.golang.org/[email protected]
        - required by
250 MiB github.com/aws/[email protected]
        - required by pulumi/pkg/operations, an experimental function, not used
 83 MiB github.com/pierrec/[email protected]+incompatible
        - required by gocloud.dev/secrets/hashivault
 25 MiB github.com/pulumi/pulumi-java
...
```

Returns rapidly diminish with most packages weighing under 1MiB after these.

Follow up work
==============

I've made an upstream issue with gocloud.dev to migrate off aws-sdk-go@v1:
- google/go-cloud#3220

Moving storage backends to plugins would allow us to remove this and many other
dependencies from the Pulumi CLI repository and remove conflicts between the
Pulumi engine and providers. See:
- pulumi/pulumi-vault#197
AaronFriel added a commit to pulumi/pulumi that referenced this issue Jan 24, 2023
Having previously made a pull request removing azure-sdk-for-go as a dependency
of gocloud.dev, this PR updates the CLI to remove the transitive dependency.

Removing the dependency on azure-sdk-for-go reduces module cache weight by
492MiB. That's the apparent size of `~/go/pkg/mod/github.com/!azure` according
to a disk usage utility.

This makes the new largest targets for reducing size:

```
258 MiB google.golang.org/[email protected]
        - required by
250 MiB github.com/aws/[email protected]
        - required by pulumi/pkg/operations, an experimental function, not used
 83 MiB github.com/pierrec/[email protected]+incompatible
        - required by gocloud.dev/secrets/hashivault
 25 MiB github.com/pulumi/pulumi-java
...
```

Returns rapidly diminish with most packages weighing under 1MiB after these.

Follow up work
==============

I've made an upstream issue with gocloud.dev to migrate off aws-sdk-go@v1:
- google/go-cloud#3220

Moving storage backends to plugins would allow us to remove this and many other
dependencies from the Pulumi CLI repository and remove conflicts between the
Pulumi engine and providers. See:
- pulumi/pulumi-vault#197
AaronFriel added a commit to pulumi/pulumi that referenced this issue Jan 24, 2023
Having previously made a pull request removing azure-sdk-for-go as a dependency
of gocloud.dev, this PR updates the CLI to remove the transitive dependency.

Removing the dependency on azure-sdk-for-go reduces module cache weight by
492MiB. That's the apparent size of `~/go/pkg/mod/github.com/!azure` according
to a disk usage utility.

This makes the new largest targets for reducing size:

```
258 MiB google.golang.org/[email protected]
        - required by
250 MiB github.com/aws/[email protected]
        - required by pulumi/pkg/operations, an experimental function, not used
 83 MiB github.com/pierrec/[email protected]+incompatible
        - required by gocloud.dev/secrets/hashivault
 25 MiB github.com/pulumi/pulumi-java
...
```

Returns rapidly diminish with most packages weighing under 1MiB after these.

Follow up work
==============

I've made an upstream issue with gocloud.dev to migrate off aws-sdk-go@v1:
- google/go-cloud#3220

Moving storage backends to plugins would allow us to remove this and many other
dependencies from the Pulumi CLI repository and remove conflicts between the
Pulumi engine and providers. See:
- pulumi/pulumi-vault#197
bors bot added a commit to pulumi/pulumi that referenced this issue Jan 24, 2023
11963: chore: Update gocloud.dev, removing azure-sdk-for-go dep r=AaronFriel a=AaronFriel

Having previously made a pull request removing azure-sdk-for-go as a dependency of gocloud.dev, this PR updates the CLI to remove the transitive dependency.

Removing the dependency on azure-sdk-for-go reduces module cache weight by 492MiB. That's the apparent size of `~/go/pkg/mod/github.com/!azure` according to a disk usage utility.

This makes the new largest targets for reducing size:

```
258 MiB google.golang.org/[email protected]
        - required by
250 MiB github.com/aws/[email protected]
        - required by pulumi/pkg/operations, an experimental function, not used
 83 MiB github.com/pierrec/[email protected]+incompatible
        - required by gocloud.dev/secrets/hashivault
 25 MiB github.com/pulumi/pulumi-java
...
```

Returns rapidly diminish with most packages weighing under 1MiB after these.

Follow up work
==============

I've made an upstream issue with gocloud.dev to migrate off aws-sdk-go@v1:
- google/go-cloud#3220

Moving storage backends to plugins would allow us to remove this and many other dependencies from the Pulumi CLI repository and remove conflicts between the Pulumi engine and providers. See:
- pulumi/pulumi-vault#197


Co-authored-by: Aaron Friel <[email protected]>
@jazzyfresh
Copy link

encountered this in pulumi-consul as well, but for the tfexec package

@t0yv0
Copy link
Member

t0yv0 commented Sep 20, 2023

I've bumped into this today again and tried a few resolutions.

Unfortunately upstream provider is very much behind the latest Azure SDKs.

-	github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0
-	github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.2
-	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.3.1
-	github.com/Azure/go-autorest/autorest v0.11.24
+	github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2
+	github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1
+	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1

I've tried upgrading the provider on our end, that is possible, azureAccessCredentialsDataSourceRead function needs to be rewritten against new Azure SDK APIs, that looked like a day of work with testing, not entirely trivial.

The other way to solve this is if we could get a form of pulumi/pulumi#12139

The source of the conflict now is a diamond dependency where we are inheriting one version of azcore through upstream, and another version of azcore through a transitive dependency to pulumi filestate, which is coupled to pulumi/pkg dependency, but is not really in use for this project. Breaking that cycle somehow so that bridge and bridged providers do not pull in ascore dependency would pave a way forward and be generally beneficial.

guineveresaenger added a commit to pulumi/ci-mgmt that referenced this issue Sep 21, 2023
Due to pulumi/pulumi-vault#197, pulumi-vault
cannot currently benefit from automation per this repository. Putting it
in a separate folder to await the resolution of the blocking issue and
avoid noise and spurious p1s caused by attempts to upgrade the bridge.

Upstream upgrades will continue to run automatically as per current
state of pulumi-vault's Workflow files.
guineveresaenger added a commit to pulumi/ci-mgmt that referenced this issue Sep 21, 2023
Due to pulumi/pulumi-vault#197, pulumi-vault
cannot currently benefit from automation per this repository. Putting it
in a separate folder to await the resolution of the blocking issue and
avoid noise and spurious p1s caused by attempts to upgrade the bridge.

Upstream upgrades will continue to run automatically as per current
state of pulumi-vault's Workflow files.

Resolution for pulumi/pulumi-vault#310.
iwahbe added a commit that referenced this issue Nov 9, 2023
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants