Skip to content

Docs: go get of prebuilt aws-go provider fails with "module source tree too large" (500MB Go proxy limit); document GOPRIVATE workaround #387

Description

@so0k

Summary

go get of the prebuilt AWS provider for Go fails for recent major versions because the module source tree exceeds the Go module proxy / checksum-DB limit of 500 MB (524288000 bytes):

> go get github.com/cdktn-io/cdktn-provider-aws-go/aws/v25
go: downloading github.com/cdktn-io/cdktn-provider-aws-go/aws/v25 v25.3.0
go: github.com/cdktn-io/cdktn-provider-aws-go/aws/v25: create zip: module source tree too large (max size is 524288000 bytes)

This is a hard limit on proxy.golang.org and sum.golang.org (and enforced by the Go toolchain when it creates the module zip on the direct fallback). Publishing the module works fine — it's consumption that breaks.

We should document the user-side workaround in the cdktn docs, since there is nothing we can fix on the publishing side.

Workaround

Bypass the proxy and checksum verification for the affected module path:

GOPRIVATE=github.com/cdktn-io/cdktn-provider-aws-go go get github.com/cdktn-io/cdktn-provider-aws-go/aws/v25

Note: GOPROXY=direct alone is not sufficient — checksum verification against sum.golang.org still fails with the same size limit. GOPRIVATE (which implies both GONOPROXY and GONOSUMDB) is required.

Observed behavior per major version (with GOPRIVATE set)

Version Result
aws/v21 ✅ works (even without workaround)
aws/v22 (v22.1.0) ✅ works
aws/v23 (v23.8.0) ✅ works
aws/v24 (v24.12.0) create zip: module source tree too large
aws/v25 (v25.3.0) create zip: module source tree too large

Open question

Even with GOPRIVATE, v24/v25 still fail at the create zip step: in direct mode the Go toolchain itself creates the module zip and applies the same 500 MB limit to the uncompressed file tree, so sufficiently large versions cannot be consumed via go get/go mod at all.

It's not obvious why v22/v23 pass while v24/v25 don't — a checkout of v22 is ~579 MB on disk, which is over the limit. Likely explanation: the on-disk size includes .git (and possibly other files excluded from the module zip), so the actual zipped source tree for v22/v23 is still under 500 MB, while v24/v25 crossed it. Worth verifying and documenting the size trajectory, since every major version gets closer to being completely unconsumable via the Go toolchain.

Proposed actions

  • Add a "Go" caveat section to the prebuilt-providers docs: explain the 500 MB proxy/sumdb limit and the GOPRIVATE workaround, and note that very large versions (currently aws/v24+) cannot be fetched via go get at all.
  • Verify the actual module-zip source-tree sizes per major version to confirm why v22/v23 still pass.
  • Investigate options for keeping the Go package under the limit (e.g. splitting submodules, trimming generated docs from the Go package) or document an alternative consumption path (vendoring / git submodule) for oversized versions.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions