Skip to content

Retry initialize if it fails#292

Open
assensamuelsson wants to merge 1 commit intoBonnierNews:mainfrom
assensamuelsson:retry-initialize
Open

Retry initialize if it fails#292
assensamuelsson wants to merge 1 commit intoBonnierNews:mainfrom
assensamuelsson:retry-initialize

Conversation

@assensamuelsson
Copy link
Copy Markdown
Contributor

@assensamuelsson assensamuelsson commented Feb 9, 2026

Retry initialize if it failed to check out a valid project id.

I've seen several times in my service that we can't fetch the project id from the metadata server fast enough meaning many of our logs will not be properly annotated. In this case I think it makes sense to retry the initialize.

We could instead increase the timeout but it will never be completely robust in case of latency issues.

I'm aware that this causes a fetch request every time when developing locally. Should we expose a config for this somehow or make it clear in docs that it is a good idea to set the env var GCP_PROJECT when running locally?

@assensamuelsson assensamuelsson requested a review from a team as a code owner February 9, 2026 19:26
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.

1 participant