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

Fix register search attributes when starting server #653

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

rodrigozhou
Copy link
Contributor

@rodrigozhou rodrigozhou commented Sep 4, 2024

What was changed

Fix register search attributes when starting server

Why?

Currently, search attributes are registered after the server is ready, which can cause race condition with other processes waiting for the server to become ready too. This PR fixes this by registering the search attributes together with the namespaces.

Address temporalio/temporal#6195

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@rodrigozhou rodrigozhou requested a review from cretz September 4, 2024 00:26
@CLAassistant
Copy link

CLAassistant commented Sep 4, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Thanks! LGTM, but not approving because we cannot merge an untagged server version.

go.mod Outdated
go.temporal.io/sdk v1.27.0
go.temporal.io/server v1.24.2
google.golang.org/grpc v1.65.0
go.temporal.io/server v1.26.0-120.0.20240904002151-40431ec95546
Copy link
Member

Choose a reason for hiding this comment

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

We won't be able to merge this until it is in a tagged version. If it only lands in a non-stable tagged version (i.e. 1.26 series and not one of the 1.25 patches), we will need to change the branch this is targeting to next (once that branch is created).

Copy link
Collaborator

Choose a reason for hiding this comment

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

The branch exists (it's called next-server).

Copy link
Member

@cretz cretz Sep 4, 2024

Choose a reason for hiding this comment

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

👍 So once this is in a tagged non-GA version, this can be updated and the target if this PR can be changed to target that branch (or we can close and recreate the PR if preferred).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the base branch to next-server.

@rodrigozhou rodrigozhou changed the base branch from main to next-server September 4, 2024 16:52
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/server-search-attr branch from 94db02c to 92b8f1b Compare September 4, 2024 16:54
@cretz
Copy link
Member

cretz commented Sep 5, 2024

LGTM, but not marking this approved until on tagged server. There seem to be other tests the latest server is breaking.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/server-search-attr branch from 92b8f1b to 171be43 Compare September 26, 2024 20:36
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/server-search-attr branch 2 times, most recently from 98b686c to 7d57555 Compare October 30, 2024 20:58
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/server-search-attr branch from 7d57555 to 0145783 Compare November 14, 2024 23:29
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.

This LGTM. We have now resolved to not make future server tags depending on SDK/API commit hashes. So when next-server makes it into main we should of course have stable tags for everything.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/server-search-attr branch from 81f11b8 to 00ea0c7 Compare November 18, 2024 22:44
@rodrigozhou rodrigozhou merged commit 17aa5b6 into next-server Nov 18, 2024
6 checks passed
@rodrigozhou rodrigozhou deleted the rodrigozhou/server-search-attr branch November 18, 2024 23:30
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.

4 participants