-
Notifications
You must be signed in to change notification settings - Fork 276
💥 [Breaking] Update versioning APIs to use struct #1962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
098c12e to
b182d26
Compare
0f29dce to
22787a4
Compare
22787a4 to
9257ab5
Compare
| // 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 | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| // NOTE: Experimental | ||
| WorkflowExecutionOptionsChanges struct { | ||
| VersioningOverride *VersioningOverride | ||
| VersioningOverride *VersioningOverrideChange |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
internal/worker_deployments.go
Outdated
| } | ||
| } | ||
|
|
||
| func (wd *WorkerDeploymentVersion) ToCanonicalString() string { |
There was a problem hiding this comment.
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?
812ab1a to
7dcae8f
Compare
7dcae8f to
fbddace
Compare
| go.work.sum | ||
| *~ | ||
| *~ | ||
| internal/cmd/build/*.sqlite* |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
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).
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
Closes
How was this tested:
Existing tests
Any docs updates needed?