Closed hazim1093 closed 2 weeks ago
/test-examples="examples/app/v1beta1/roleassignment.yaml"
Hi @turkenf, I tried it out and after updating the dependency to the stated version, I am getting the following error:
17:40:29 [ .. ] go generate linux_amd64
# github.com/hashicorp/terraform-provider-azuread/internal/provider
../../../../go/pkg/mod/github.com/upbound/terraform-provider-azuread@v0.0.0-20240827105353-b0f94b9249b7/internal/provider/provider.go:303:49: not enough arguments in call to environments.FromEndpoint
have (context.Context, string)
want (context.Context, string, string)
apis/generate.go:25: running "go": exit status 1
17:40:32 [FAIL]
make[1]: *** [go.generate] Error 1
make: *** [generate] Error 2
Hi @turkenf, did you get the time to look at this?
Hi @hazim1093, I haven't had a chance to look at it yet due to priorities. When I can, I'll let you know. Thank you for your patience.
@hazim1093 I was able to successfully run make generate
. The error you get is due to outdated version of github.com/hashicorp/go-azure-sdk/sdk
in go.mod
. Strangely, go mod tidy
did not handle that indirect dep update as it is. Tried to push the change to your branch, but I am not permitted, so here are the steps
as Fatih mentioned, replace terraform-provider-azuread
dependency to the fork @upjet-v2.53.1 if not already in go.mod
go mod edit -replace=github.com/hashicorp/terraform-provider-azuread=github.com/upbound/terraform-provider-azuread@upjet-v2.53.1
open go.mod
in your text editor, remove the line
github.com/hashicorp/go-azure-sdk v0.20231018.1171511 // indirect
then, run
go mod tidy
This correctly updates the version for go-azure-sdk
dependency and generation succeeds when:
make generate
Hi @turkenf, I tried it out and after updating the dependency to the stated version, I am getting the following error:
17:40:29 [ .. ] go generate linux_amd64 # github.com/hashicorp/terraform-provider-azuread/internal/provider ../../../../go/pkg/mod/github.com/upbound/terraform-provider-azuread@v0.0.0-20240827105353-b0f94b9249b7/internal/provider/provider.go:303:49: not enough arguments in call to environments.FromEndpoint have (context.Context, string) want (context.Context, string, string) apis/generate.go:25: running "go": exit status 1 17:40:32 [FAIL] make[1]: *** [go.generate] Error 1 make: *** [generate] Error 2
Thanks @erhancagirici.
I've updated the go-azure-sdk/sdk
as you mentioned, but I still the same errors during make lint
.
make generate
works fine, make reviewable
fails due to lint failing.
@hazim1093 can you provide me push access to your fork/branch or make the following changes?
First, please rebase the PR to the latest main.
while bumping go-azure-sdk/sdk
seems like your commit also bumped the following. Those should stay like below:
k8s.io/apimachinery v0.29.4
k8s.io/client-go v0.29.4
sigs.k8s.io/controller-runtime v0.17.3
then go mod tidy
. I am able to successfully build & lint & run tests.
If this does not work for you, please provide access and I can push.
Thank you for your effort in this PR @hazim1093, to move faster, closing in favor of https://github.com/crossplane-contrib/provider-upjet-azuread/pull/167
Description of your changes
Updated Terraform provider version to 2.53.1
I have:
make reviewable
to ensure this PR is ready for review.make lint
seems to fail onmain
as well for meHow has this code been tested
make crddiff
&make test
locally