Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Sushisource
Copy link
Member

What was changed

Refactor versioning to use latest SDK & avoid string-based deployment versions

Why?

Consistent with SDK refactorings

Checklist

  1. Closes [CLI] Update protos, use buildid/deployment name args & support versioning overrides when starting workflows #804

  2. How was this tested:
    Existing tests

  3. Any docs updates needed?

go.mod Outdated
Comment on lines 21 to 22
// Set to released version once available
go.temporal.io/sdk v1.34.1-0.20250609225810-918fea843587
Copy link
Member Author

Choose a reason for hiding this comment

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

We'll need to use the newest SDK release before merging next-server into main

Copy link
Member

Choose a reason for hiding this comment

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

Usually we don't even want unreleased dependencies in next-server. Can this PR wait to be merged until the SDK has been released?

@Sushisource Sushisource force-pushed the versioning-refactor branch 2 times, most recently from 98d2cfb to d53a50c Compare June 9, 2025 23:38
@Sushisource Sushisource force-pushed the versioning-refactor branch from d53a50c to f337211 Compare June 10, 2025 00:02
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

LGTM, but would rather not merge even to next-server until dependency tagged unless there is something urgent requiring it be usable in CLI before even usable in SDK.

go.mod Outdated
Comment on lines 21 to 22
// Set to released version once available
go.temporal.io/sdk v1.34.1-0.20250609225810-918fea843587
Copy link
Member

Choose a reason for hiding this comment

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

Usually we don't even want unreleased dependencies in next-server. Can this PR wait to be merged until the SDK has been released?

@Sushisource
Copy link
Member Author

LGTM, but would rather not merge even to next-server until dependency tagged unless there is something urgent requiring it be usable in CLI before even usable in SDK.

Sure, we can wait until SDK is released. Some non-Go SDKs already have this released

(Only for pinned).
- name: versioning-override-build-id
type: string
description: Build Id component of override Pinned Version for a Worker Deployment
Copy link

@drewhoskins-temporal drewhoskins-temporal Jun 11, 2025

Choose a reason for hiding this comment

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

This description could use a de-mangling.
How about
Override the build ID to move your running Workflow to another build within its Worker Deployment. The workflow must already be pinned or you must also pass --versioning-override-behavior pinned

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, that isn't quite right. You can only use this option if you pass pinned. I'll rephrase it though.

- pinned
- auto_upgrade
- name: versioning-override-pinned-version
- name: versioning-override-deployment-name

Choose a reason for hiding this comment

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

Suggest: Override when you want to move your running Workflow to a different Worker Deployment. The workflow must already be pinned or you must also pass --versioning-override-behavior pinned

Choose a reason for hiding this comment

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

Is it allowable to just pass in the build ID without this one if they're not changing deployments? (I hope so.) I didn't see a test for that case but forgive me if I missed it.

Copy link
Member Author

@Sushisource Sushisource Jun 11, 2025

Choose a reason for hiding this comment

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

I don't know if server will accept that. I can try.

I added a test for this. Server accepts it, but the override doesn't include the deployment name any more afterward (it does include the non-override deployment name, which is the same, so maybe that's fine).

Comment on lines 554 to 557
// TODO: Unclear why this just is not showing up in the response
// require.NotNil(t, versioningInfo.VersioningOverride)
// TODO: Fix
// require.Equal(t, version2, versioningInfo.VersioningOverride.PinnedVersion)
Copy link
Member Author

@Sushisource Sushisource Jun 9, 2025

Choose a reason for hiding this comment

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

VersioningOverride is just not showing up in the response any more for some reason. Any idea here @ShahabT @carlydf ? Specifically this is for the test which batch-updates workflows. Seems like the override just might not be getting applied when run as a batch?

Copy link
Member Author

Choose a reason for hiding this comment

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

Carly told me this is a bug they've discovered in server

Copy link
Member Author

Choose a reason for hiding this comment

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

Can confirm this is fixed now

Co-authored-by: Carly de Frondeville <[email protected]>
@Sushisource Sushisource merged commit 348f106 into next-server Jul 7, 2025
7 checks passed
@Sushisource Sushisource deleted the versioning-refactor branch July 7, 2025 23:10
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.

5 participants