-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
remove warnings when temporal starts #2317
Conversation
} | ||
|
||
// sometimes it takes a few additional seconds for workflow queue listening to be available | ||
wait(5); |
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 there any other api call we can use to check this as opposed to just a hardcoded wait?
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.
Tagged Davin for that; I wasn't able to find one. I'm not sure what we could do besides maybe attempt to start a worker and retry while hiding the exception.
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 seems right. we didn't run into this problem since our temporal cluster was deployed once via helm manually and not touched after (except for manuel upgrades etc)
I spent some time looking at temporal docs + GRPC calls and wait does seem like the simplest solution for now.
|
||
while (!getNamespaces().contains("default")) { | ||
LOGGER.warn("Waiting for default namespace to be initialized in temporal..."); | ||
wait(5); |
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.
could we do 2 instead of 5? i feel like increments of 5 seconds is a long time given current startup speeds.
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.
not ideal, but better than what we have now.
I couldn't find a way of making a blocking call that fails until the temporal service is ready. However, from testing it's always ready a couple seconds after the default namespace is detected from the API.
This definitely isn't clean but it prevents the scary looking errors about missing default namespaces.
@davinchia do you know of a better way to do this?
For context: when starting Airbyte w/ Temporal for the first time, we were getting "namespace default does not exist" errors which were due to the temporal service not being initialized. This only happens on initial startup. There's a window after the namespace listing call succeeds and returns "default" that the
WorkerFactory
still fails with a "namespace default does not exist" error.