Rewrite dependency version check as Go tool, extend to main branch#9816
Merged
chaptersix merged 2 commits intomainfrom Apr 22, 2026
Merged
Rewrite dependency version check as Go tool, extend to main branch#9816chaptersix merged 2 commits intomainfrom
chaptersix merged 2 commits intomainfrom
Conversation
chaptersix
commented
Apr 3, 2026
1558a44 to
fdafcf2
Compare
fd8d10d to
e1cb26d
Compare
stephanos
reviewed
Apr 7, 2026
Contributor
Author
|
need to add some integration tests. |
68eb426 to
08cf62c
Compare
spkane31
approved these changes
Apr 22, 2026
Replaces shell-based dependency validation with a Go tool that checks temporal API and SDK dependency versions. On release branches, requires tagged semver releases. On main, verifies pseudo-version commits are on the upstream default branch.
- Add 2-minute context timeout for main branch validation - Change validateMainModule to return error instead of string - Add success print statement in validateMainBranch
7a96d6a to
8994770
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites the release dependency check as a Go tool and extends it to cover the main branch.
The original check was a shell script using
grep/awkto extract versions fromgo.mod. Moving to Go lets us usegolang.org/x/mod/modfile(proper AST parsing),module.IsPseudoVersion/PseudoVersionRev(pseudo-version decomposition), andsemver.IsValid— none of which are feasible to replicate reliably in shell. Using a Go tool is also consistent with the pattern incmd/tools/.The rewrite also extends validation: the original script only enforced tagged releases on
release/*andcloud/*branches. The new tool adds amainbranch policy: pseudo-versions are allowed on main, but the referenced commit must be on the dependency's default branch (not a feature branch or a fork).Policies enforced
release/*andcloud/*: must be tagged semver releasesmain: tagged releases accepted; pseudo-versions must reference a commit on the dependency's default branchWhy
If an API or SDK references a commit that's not on the main branch or a tag, it creates problems when bumping the version later on. There was a recent occurrence of this.
Running locally
Pass the branch you're targeting as
--base-branch. For example, to simulate a PR against a release branch: