Skip to content

Conversation

@rodrigozhou
Copy link
Contributor

What changed?

Validate the API and SDK versions are tagged versions.

Why?

Prevent releasing server with untagged depedencies.

How did you test it?

Potential risks

Documentation

Is hotfix candidate?

@rodrigozhou rodrigozhou requested a review from a team as a code owner April 29, 2025 20:54
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/gha-validate-dep-version branch from cd76dba to a87e4b2 Compare April 29, 2025 21:19
@rodrigozhou rodrigozhou requested a review from bergundy April 30, 2025 16:21
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

SEMVER_RE='^v[0-9]+\.[0-9]+\.[0-9]+$'
MODULES=( "go.temporal.io/api" "go.temporal.io/sdk" )
for module in "${MODULES[@]}"; do
read -r _ version <<< "$(go list -m "$module")"
Copy link
Member

Choose a reason for hiding this comment

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

This is simpler with:

go list -f '{{.Version}}' -m "$module" | grep -qP '^v\d+\.\d+\.\d+$'

You would still want to print out the version later though...

I would also check that the module isn't replaced:

go list -f '{{.Replace}}' -m "$module" | grep -q '<nil>'

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/gha-validate-dep-version branch from a87e4b2 to 9b0a8c5 Compare April 30, 2025 22:50
@rodrigozhou rodrigozhou requested a review from bergundy April 30, 2025 22:50
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Please address the comment about the skep_deps_check parameter before merging.

@rodrigozhou rodrigozhou merged commit 1ec5349 into main May 1, 2025
52 checks passed
@rodrigozhou rodrigozhou deleted the rodrigozhou/gha-validate-dep-version branch May 1, 2025 02:21
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.

3 participants