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

Pinned go-autorest to v13.3.3 #211

Closed
wants to merge 1 commit into from

Conversation

cuonglm
Copy link

@cuonglm cuonglm commented Feb 14, 2020

Azure/go-autorest version less than v12.0.0 causes ambiguous imports.
Though it's not agola direct dependency, it causes problem when others
use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: Azure/go-autorest#414

@cuonglm cuonglm requested a review from sgotti February 14, 2020 04:47
Azure/go-autorest version less than v12.0.0 causes ambiguous imports.
Though it's not agola direct dependency, it causes problem when others
use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: Azure/go-autorest#414
@sgotti
Copy link
Member

sgotti commented Feb 14, 2020

@cuonglm Usually this kind of dependency issues could be fixed on the final package and not in an upstream one. Can you provide a reproducer of your issue? We have some external components relying on the agola client and haven't see the issue you're reporting (please also note that the agola api is not stable).

@cuonglm
Copy link
Author

cuonglm commented Feb 14, 2020

@cuonglm Usually this kind of dependency issues could be fixed on the final package and not in an upstream one. Can you provide a reproducer of your issue? We have some external components relying on the agola client and haven't see the issue you're reporting (please also note that the agola api is not stable).

This only applies if external component also depends on go-autorest. You can try this PR. Check out the PR, then:

$ go1.13.8 get agola.io/agola@v0.4.0
go: finding agola.io v0.4.0
$ go1.13.8 mod tidy
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob imports
	github.com/Azure/azure-storage-blob-go/azblob tested by
	github.com/Azure/azure-storage-blob-go/azblob.test imports
	github.com/Azure/go-autorest/autorest/adal: ambiguous import: found github.com/Azure/go-autorest/autorest/adal in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/adal)
	github.com/Azure/go-autorest/autorest/adal v0.5.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest/adal@v0.5.0)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest: ambiguous import: found github.com/Azure/go-autorest/autorest in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest)
	github.com/Azure/go-autorest/autorest v0.9.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest/azure: ambiguous import: found github.com/Azure/go-autorest/autorest/azure in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/azure)
	github.com/Azure/go-autorest/autorest v0.9.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0/azure)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest/azure/cli imports
	github.com/Azure/go-autorest/autorest/date: ambiguous import: found github.com/Azure/go-autorest/autorest/date in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/date)
	github.com/Azure/go-autorest/autorest/date v0.1.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest/date@v0.1.0)

@sgotti
Copy link
Member

sgotti commented Feb 14, 2020

@cuonglm go-autorest is a dep of the k8s go client and not directly used by agola so it doesn't makes sense to pin it in agola go.mod.

I created a test example that uses agola and go autorest as dependencies and it built without issues so I don't know which are the issues on your projects (do you have a simpler reproducer that doesn't require adding agola as a gitea dependency?) but I suppose you should just fix the auto rest version on your side.

@cuonglm cuonglm closed this Feb 14, 2020
@cuonglm cuonglm deleted the feature/upgrade-go-autorest branch March 12, 2020 10:54
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

Successfully merging this pull request may close these issues.

2 participants