Skip to content

Conversation

@Sushisource
Copy link
Member

DRAFT just to make sure tests pass & give myself a review pass

What was changed

Change APIs to use struct form instead of string form for worker deployment versions & update protos & use new fields in them.

Why?

Much more usable and less error prone, consistent with other SDKs

Checklist

  1. Closes

  2. How was this tested:
    Existing tests

  3. Any docs updates needed?

@Sushisource Sushisource force-pushed the update-versioning-apis branch 3 times, most recently from 098c12e to b182d26 Compare May 31, 2025 00:39
@Sushisource Sushisource force-pushed the update-versioning-apis branch 2 times, most recently from 0f29dce to 22787a4 Compare June 2, 2025 20:17
@Sushisource Sushisource force-pushed the update-versioning-apis branch from 22787a4 to 9257ab5 Compare June 2, 2025 20:21
Comment on lines 545 to 550
// Ignore connection loss on server shutdown. This helps with quiescing spurious error messages
// upon server shutdown (where server is using the SDK).
st, ok := status.FromError(err)
if ok && st.Code() == codes.Unavailable && strings.Contains(st.Message(), "graceful_stop") {
return
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unrelated, but, just wanted to do it while I was in here - helps shut up some pointless logspew in the dev server.

Copy link
Contributor

Choose a reason for hiding this comment

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

but a normal user would want to get logs if the poller received errors from the server is shutting down

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's a good point. We'd need some kind of indication we're in the server environment.

Copy link
Member Author

@Sushisource Sushisource Jun 3, 2025

Choose a reason for hiding this comment

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

Got some advice from David on what to check

@Sushisource Sushisource marked this pull request as ready for review June 2, 2025 20:33
@Sushisource Sushisource requested a review from a team as a code owner June 2, 2025 20:33
// NOTE: Experimental
WorkflowExecutionOptionsChanges struct {
VersioningOverride *VersioningOverride
VersioningOverride *VersioningOverrideChange
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Add docs and move the comment about nil down here

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you still want it up top for the future, but added it here too.

}
}

func (wd *WorkerDeploymentVersion) ToCanonicalString() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be also private the same way that workerDeploymentVersionFromString is? it is only useful for the deprecated fields, right?

@Sushisource Sushisource force-pushed the update-versioning-apis branch from 812ab1a to 7dcae8f Compare June 3, 2025 22:42
@Sushisource Sushisource force-pushed the update-versioning-apis branch from 7dcae8f to fbddace Compare June 3, 2025 23:00
go.work.sum
*~
*~
internal/cmd/build/*.sqlite*
Copy link
Member

Choose a reason for hiding this comment

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

Is something creating this file? (no comment on the review itself, LGTM)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, when you run the integ tests w/ dev server mode

Copy link
Member

Choose a reason for hiding this comment

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

@Quinn-With-Two-Ns - I see we changed from in-memory mode to DB filename mode via DBFilename: "temporal.sqlite" in #1893. Was that intentional?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

Why? I am concerned successive tests will reuse a DB from a previous test (and in general our tests should be able to run via in memory dev server).

@Sushisource Sushisource enabled auto-merge (squash) June 4, 2025 15:53
@Sushisource Sushisource merged commit a15c294 into master Jun 4, 2025
17 checks passed
@Sushisource Sushisource deleted the update-versioning-apis branch June 4, 2025 19:08
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