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

Cant 'go get' anymore #18209

Closed
pangteypiyush opened this issue May 23, 2022 · 10 comments · Fixed by #18214
Closed

Cant 'go get' anymore #18209

pangteypiyush opened this issue May 23, 2022 · 10 comments · Fixed by #18214
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team pillar-acquisition This issue is related to the ability to acquire new customers, one of our core engineering pillars.

Comments

@pangteypiyush
Copy link

Bug Report

  • What happened?
    Trying to go get subscription module
go get -u -v github.com/Azure/azure-sdk-for-go/services/subscription/mgmt/2020-09-01/subscription
go: downloading github.com/Azure/azure-sdk-for-go v64.2.0+incompatible
go: github.com/Azure/azure-sdk-for-go/services/subscription/mgmt/2020-09-01/subscription: create zip: module source tree too large (max size is 524288000 bytes)
  • What did you expect or want to happen?
    Finish without an error.
    The last version which I didnt had this issue:
go get github.com/Azure/azure-sdk-for-go@v50.2.0
go: added github.com/Azure/azure-sdk-for-go v50.2.0+incompatible
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 23, 2022
@OscarVanL
Copy link

I get this problem too when doing go list -u -m -json all

go: loading module retractions for github.com/Azure/azure-sdk-for-go@v16.2.1+incompatible: verifying go.mod: github.com/Azure/azure-sdk-for-go@v64.2.0+incompatible/go.mod: reading https://sum.golang.org/lookup/github.com/!azure/azure-sdk-for-go@v64.2.0+incompatible: 410 Gone
        server response: not found: create zip: module source tree too large (max size is 524288000 bytes)

@jhendrixMSFT jhendrixMSFT self-assigned this May 23, 2022
@jhendrixMSFT jhendrixMSFT added pillar-acquisition This issue is related to the ability to acquire new customers, one of our core engineering pillars. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 23, 2022
@ghost ghost added the needs-team-attention This issue needs attention from Azure service team or SDK team label May 23, 2022
@jhendrixMSFT
Copy link
Member

I believe we will need to prune old API versions to reduce the repo size.

@jhendrixMSFT
Copy link
Member

While we're working on removing old content, you should be able to use v64.1.0 instead (unless you need something specific in v64.2.0).

@ceejatec
Copy link

@jhendrixMSFT That's unfortunately not true - we have a module which references v64.1.0 in its go.mod, but when running go list -mod=readonly -m -u -json all in that directory, we get the above error message anyway. I don't know why go is still trying to download that newer version.

@ceejatec
Copy link

Only workaround I've found so far is to set the GONOSUMDB environment variable to github.com/Azure/azure-sdk-for-go.

@jhendrixMSFT
Copy link
Member

Thanks for the data-point. It works for me, so there must be some other bit we don't yet understand. At any rate, we should have an update out soon that shrinks the size under the 500MB limit.

@lootek
Copy link

lootek commented May 24, 2022

While we're working on removing old content, you should be able to use v64.1.0 instead (unless you need something specific in v64.2.0).

No, we're still not able to freeze the version in go.mod due to an error:

go.mod:75:2: replace github.com/Azure/azure-sdk-for-go: version "v64.1.0" invalid: should be v0 or v1, not v64

Unless you add +incompatible because this repo does not follow Go directory naming rules for modules-based versioning.

The workaround that worked was to replace to freeze to the latest commit hash or to the prerelease instead (it's an ugly and hopefully a temporary one though):

github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v64.1.0+incompatible

Tryiing to use the newest prerelease v64.2.0+incompatible fails as well:

verifying go.mod: github.com/Azure/azure-sdk-for-go@v64.2.0+incompatible/go.mod: reading https://sum.golang.org/lookup/github.com/!azure/azure-sdk-for-go@v64.2.0+incompatible: 410 Gone
	server response: not found: create zip: module source tree too large (max size is 524288000 bytes)

And, v65 does not work as well:

go.mod:74:2: replace github.com/Azure/azure-sdk-for-go: version "v65.0.0" invalid: should be v0 or v1, not v65

@jhendrixMSFT
Copy link
Member

The v65.0.0 release didn't get tagged for some reason. I just tagged it now so that part should be resolved.

@prochac
Copy link

prochac commented Jul 1, 2022

May I ask, why is the repo so heavy?
After running go clean --modcache and redownloading all modules I use,
Azure SDK makes 34% of my $GOPATH/go/mod size.
Only competitor is github.com/aws/aws-sdk-go with 10%.

@jhendrixMSFT
Copy link
Member

Azure uses date-based API versions in the query string to partition updates to a service that aren't backward-compatible (I don't believe AWS has such a mechanism). Our legacy SDK, which predates Go modules, releases all of these API versions side-by-side to reduce/remove breaking changes across service updates. You can see an example of this here. Unfortunately, it does mean that the repo grows over time. We have a work item to eliminate old/unused API versions to reduce the size, it just hasn't happened yet.

Going forward, our new SDKs use Go modules to manage breaking changes, so we won't be releasing all API versions side-by-side.

tillberg added a commit to tillberg/registry that referenced this issue Jan 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team pillar-acquisition This issue is related to the ability to acquire new customers, one of our core engineering pillars.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants