Skip to content

fix(go): pin data modules to reachable release tags - #753

Open
sharma0vineet wants to merge 1 commit into
masterfrom
fix/go-mod-unreachable-pseudo-versions
Open

sharma0vineet wants to merge 1 commit into
masterfrom
fix/go-mod-unreachable-pseudo-versions

Conversation

@sharma0vineet

Copy link
Copy Markdown
Member

Problem

The Auto-Generate Go Packages run failed on the Update go.mod for all changed packages step:

github.com/razorpay/i18nify/i18nify-data/go/business_entity@v0.0.0-20260630122543-7e86a2db2139:
  invalid version: unknown revision 7e86a2db2139

packages/i18nify-go/go.mod referenced two data modules by pseudo-version whose underlying commits no longer exist:

Module Stale ref Reachable?
i18nify-data/go/business_entity v0.0.0-20260630122543-7e86a2db2139 no
i18nify-data/go/country/subdivisions v0.0.0-20260818095336-eb167d02b811 no

Both SHAs came from PR branches that were squash-merged, so the original commits were garbage collected and the refs became unresolvable.

The release path of the workflow runs go mod tidy, which resolves the entire module graph — so the dead business_entity ref failed a run that was only meant to bump country/subdivisions. The downstream Release i18nify-go job never ran as a result.

The subdivisions entry was masked in that run (the release step rewrites it to a tag before tidy), but it is equally unreachable and would break any non-release CI path.

Fix

Pin both modules to their published release tags:

  • business_entityv1.0.0
  • country/subdivisionsv1.0.8

Verification

go mod tidy, go build ./... and go test ./... all pass locally:

ok  	.../modules/bankcodes                        2.000s
ok  	.../modules/business_entity                  0.614s
ok  	.../modules/country_metadata                 0.896s
ok  	.../modules/country_subdivisions             2.186s
ok  	.../modules/country_subdivisions/zipcode     3.205s
ok  	.../modules/currency                         1.651s
ok  	.../modules/phonenumber                      2.451s

Follow-up (not in this PR)

This is the same class of failure as #749. .github/scripts/go/update-dependencies.sh pins to branch HEAD SHAs, so every squash-merge can orphan the ref it just wrote. Worth hardening separately:

  1. Prefer the release tag whenever i18nify-data/go/<pkg>/vX.Y.Z exists, instead of writing a pseudo-version.
  2. Add a CI guard that runs git cat-file -e <sha> over every pseudo-version in go.mod, so this fails fast with a clear message rather than a cryptic go mod tidy error weeks later.

🤖 Generated with Claude Code

The i18nify-go go.mod referenced two data modules by pseudo-version
whose underlying commits no longer exist in the repository:

  business_entity      v0.0.0-20260630122543-7e86a2db2139
  country/subdivisions v0.0.0-20260818095336-eb167d02b811

Both SHAs came from PR branches that were squash-merged, so the
original commits were garbage collected and the refs became
unresolvable. This broke the release path of the "Auto-Generate Go
Packages" workflow, where `go mod tidy` resolves the full module graph:

  business_entity@v0.0.0-20260630122543-7e86a2db2139:
    invalid version: unknown revision 7e86a2d

Pin both modules to their published release tags (v1.0.0 and v1.0.8)
instead. Verified with `go mod tidy`, `go build ./...` and
`go test ./...` — all packages build and pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cfbd645

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This branch has not been deployed

No deployments
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.

1 participant