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

remove warnings when temporal starts #2317

Merged
merged 3 commits into from
Mar 5, 2021
Merged

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Mar 5, 2021

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.

}

// sometimes it takes a few additional seconds for workflow queue listening to be available
wait(5);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor

@cgardens cgardens left a 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.

@jrhizor jrhizor merged commit 4d95c5e into master Mar 5, 2021
@jrhizor jrhizor deleted the jrhizor/fix-worker-start-error branch March 5, 2021 19:42
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.

3 participants