GCP auth: resilient metadata token refresh with proper signal masking#384
Open
s1dd54rt5 wants to merge 1 commit into
Open
GCP auth: resilient metadata token refresh with proper signal masking#384s1dd54rt5 wants to merge 1 commit into
s1dd54rt5 wants to merge 1 commit into
Conversation
- Start the GCS metadata token refresh thread even when the initial fetch fails, so transient startup failures (DNS, routing, metadata warm-up) do not permanently prevent configuring the bearer-token secret in a valid GCP environment. - Block SIGINT/SIGTERM via pthread_sigmask before creating the refresh thread so it inherits the blocked mask, ensuring shutdown signals are delivered to the main thread (matching pgserver's approach).
sfc-gh-mslot
reviewed
Jun 5, 2026
|
|
||
|
|
||
| static void * | ||
| gcs_metadata_secret_refresh_main(void *arg) |
Collaborator
There was a problem hiding this comment.
Thanks for looking into this!
Better GCP support is definitely something we need, but I feel like this is not the right place to solve this problem. We use pgduck_server primarily as a dumb Postgres interface to DuckDB, more fine-grained secret configuration usually happens outside of it or in the DuckDB extensions.
Would it be helpful to support https://duckdb.org/community_extensions/extensions/gcs ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start the GCS metadata token refresh thread even when the initial fetch fails, so transient startup failures (DNS, routing, metadata warm-up) do not permanently prevent configuring the bearer-token secret in a valid GCP environment.
Block SIGINT/SIGTERM via pthread_sigmask before creating the refresh thread so it inherits the blocked mask, ensuring shutdown signals are delivered to the main thread (matching pgserver's approach).
Description
Please explain what this PR changes and why.
Checklist
DCO Reminder (important)
This project uses the Developer Certificate of Origin (DCO).
DCO is a simple way for you to confirm that you wrote your code and that you have the right to contribute it.
If the DCO check fails, please sign off your commits.
How to sign off
For your last commit:
git commit --amend -s
git push --force
For multiple commits:
git rebase --signoff main
git push --force
More info: https://developercertificate.org/