Skip to content

fix(jsii-pacmak): remove GOSUMDB=off from Go target#5044

Merged
mergify[bot] merged 1 commit intomainfrom
mrgrain/fix/jsii-pacmak/remove-gosumdb-off
Feb 25, 2026
Merged

fix(jsii-pacmak): remove GOSUMDB=off from Go target#5044
mergify[bot] merged 1 commit intomainfrom
mrgrain/fix/jsii-pacmak/remove-gosumdb-off

Conversation

@mrgrain
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain commented Feb 25, 2026

The GOSUMDB=off environment variable was added in #2616 back in February 2021 as a workaround to reduce eventual consistency issues when newly published Go modules were not yet available in the Go checksum database. At the time, this was a pragmatic fix to avoid transient failures during go mod download.

However, disabling the checksum database prevents the Go toolchain from using sum.golang.org which is required for newer features like automatic toolchain management via the go directive in go.mod. Specifically, GOSUMDB=off breaks the ability of go work use and related commands to download and verify the correct Go runtime version automatically. This is an increasingly important feature as the Go ecosystem moves towards self-managing toolchains.

Beyond the functional issue, the Go module ecosystem has matured significantly since 2021. The checksum database is stable and eventual consistency is no longer a practical concern for published modules. Keeping GOSUMDB=off is both an unnecessary security trade-off (skipping module integrity verification) and now actively prevents useful toolchain features from working.

This change removes the GOSUMDB=off setting from the go() helper function in jsii-pacmak, restoring default Go behavior.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 25, 2026
cwd,
env: {
// disable the use of sumdb to reduce eventual consistency issues when new modules are published
GOSUMDB: 'off',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will turning this off lead to an increase in eventual consistency issues?
Has the go ecosystem/our tooling evolved so we can turn GOSUMDB back on and not have to worry about the initial reason we turned it off resurfacing or do we not care and we are more concerned about being able to handle newer versions of go than an increase in eventual consistency issues?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re adding this AI generated blurb I had removed.

Beyond the functional issue, the Go module ecosystem has matured significantly since 2021. The checksum database is stable and eventual consistency is no longer a practical concern for published modules. Keeping GOSUMDB=off is both an unnecessary security trade-off (skipping module integrity verification) and now actively prevents useful toolchain features from working.

There's no indication on the original PR or issue what the eventual consistency thing actually is. I'm also not aware of any wider problems w.r.t. in the Go ecosystem. The code already runs go mod tidy which is exactly the command that refreshed the checksums.

tl;dr It's unclear what the original problem was. So far I have seen no indication that it still exists. On the other hand we have a real problem to solve. I'm willing to risk this.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 25, 2026

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Feb 25, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 25, 2026

Merging (with squash)...

@mergify mergify bot added the queued label Feb 25, 2026
@mergify mergify bot merged commit 0dbfb03 into main Feb 25, 2026
41 checks passed
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 25, 2026

Merge Queue Status

Rule: default-squash


  • Entered queue2026-02-25 14:48 UTC
  • Checks passed · in-place
  • Merged2026-02-25 14:48 UTC · at 84f61f9c1d08210d661a42a2f66be55f53d059c0

This pull request spent 10 seconds in the queue, with no time running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • status-success=Integration test (jsii-pacmak)
  • status-success=Unit Tests
  • any of [🛡 GitHub branch protection]:
    • check-success = Integration test (jsii-pacmak)
    • check-neutral = Integration test (jsii-pacmak)
    • check-skipped = Integration test (jsii-pacmak)
  • any of [🛡 GitHub branch protection]:
    • check-success = Build
    • check-neutral = Build
    • check-skipped = Build
  • any of [🛡 GitHub branch protection]:
    • check-success = Unit Tests
    • check-neutral = Unit Tests
    • check-skipped = Unit Tests

@mergify mergify bot deleted the mrgrain/fix/jsii-pacmak/remove-gosumdb-off branch February 25, 2026 14:48
@mergify mergify bot removed pr/ready-to-merge This PR is ready to be merged. queued labels Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants