Skip to content
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

Versioning 3 #1744

Merged
merged 27 commits into from
Dec 12, 2024
Merged

Versioning 3 #1744

merged 27 commits into from
Dec 12, 2024

Conversation

antlai-temporal
Copy link
Contributor

What was changed

This PR implements a new deployment based approach for Worker Versioning in go.

This is an umbrella PR, with several PRs in the versioning-3 branch already reviewed:

#1675
#1692
#1708
#1722
#1727
#1733
#1742

It is marked as draft, missing some system tests, and waiting on a CLI release that provides the new server.

But even in draft mode, it should be reasonably stable, please give feedback... Thanks!

@Quinn-With-Two-Ns
Copy link
Contributor

Overall the client API makes sense to me, I didn't review the underlying gRPC api to ensure the API is being invoked or mocked correctly.

@antlai-temporal antlai-temporal marked this pull request as ready for review December 9, 2024 20:01
@antlai-temporal antlai-temporal requested a review from a team as a code owner December 9, 2024 20:01
client/client.go Outdated Show resolved Hide resolved
client/client.go Show resolved Hide resolved
client/client.go Show resolved Hide resolved
internal/deployment_client.go Show resolved Hide resolved
internal/deployment_client.go Show resolved Hide resolved
internal/internal_deployment_client.go Show resolved Hide resolved
internal/deployment_client.go Outdated Show resolved Hide resolved
internal/deployment_client.go Outdated Show resolved Hide resolved
internal/internal_workflow_execution_options.go Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
func (iter *deploymentListIteratorImpl) HasNext() bool {
if iter.err == nil &&
(iter.response == nil ||
(iter.nextDeploymentIndex >= len(iter.response.Deployments) && len(iter.response.NextPageToken) > 0)) {
Copy link

Choose a reason for hiding this comment

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

ListDeployments uses visibility.ListWorkflowExecutions under the hood directly, the same way that ListSchedules does, so the contents of a page and the nextPageToken are handled the same for ListDeployments and ListSchedules. Because of this, I believe that there is no risk of an empty page followed by a non-empty page.

Copy link

Choose a reason for hiding this comment

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

In the elastic search visibility store implementation, next page token is only non-nil if the number of entries on the page == pageSize: https://github.com/temporalio/temporal/blob/main/common/persistence/visibility/store/elasticsearch/visibility_store.go#L839-L848

Copy link

Choose a reason for hiding this comment

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

@cretz @antlai-temporal hope this helps

Copy link

Choose a reason for hiding this comment

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

same in the sql visibility store implementation, next page token is only non-nil if the number of entries on the page == pageSize: https://github.com/temporalio/temporal/blob/main/common/persistence/visibility/store/sql/visibility_store.go#L233-L248

Copy link
Member

Choose a reason for hiding this comment

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

I believe that there is no risk of an empty page followed by a non-empty page

Sounds good. Just wanted to make sure there was no post-visibility item filtering done server side that would affect this.

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.

Looks good, just waiting for CLI RC release and this to be updated accordingly

@antlai-temporal
Copy link
Contributor Author

@cretz Integration tests against the new cli ok...

@antlai-temporal antlai-temporal merged commit ccb28ef into master Dec 12, 2024
14 checks passed
@antlai-temporal antlai-temporal deleted the versioning-3 branch December 12, 2024 21:44
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