You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(auth): use injected executor for token refresh - #1033
Replace the auth-specific token refresh scheduler with an internal utility that shares one process-lifetime timer and submits due work through a caller-owned Executor.
Accept borrowed executors through RestCatalog::Make(config, client_factory, auth_executor, metrics_executor) and the optional final argument of AuthSession::MakeOAuth2. Without an auth executor, background refresh is disabled.
Keep cancellation and shutdown scoped to each scheduler. A single session control mutex serializes task installation and closing; HTTP and dispatch retries retain separate budgets.
Keep the shared timer alive during static destruction. Its process lifetime removes the need for global shutdown, self-ownership and join/detach layers.
Use file-local executor mocks and standard futures in tests. No new shared test helper, and no changes to the existing ThreadExecutor.
Validation:
REST tests: 484 passed, 1 existing skip. Scheduler tests: 6 passed, including static-destruction, cancellation/rejection, callback teardown and active-submit shutdown regressions.
Scheduler suite passed 20 shuffled ASAN/UBSAN repetitions; four key OAuth/catalog tests passed 30 shuffled repetitions.
Core/REST shared libraries built successfully. Repository clang-tidy checks (LLVM 21) and pre-commit passed.
Destruction order can invalidate callback state before worker joins
src/iceberg/test/auth_manager_test.cc:704
Shutdown() now joins only the timer thread, not executor workers. A worker can set fired and pause before cv.notify_one(); the waiting thread can observe fired and finish the test, destroying cv before ThreadExecutor's destructor joins that worker. Declare the callback state before the executor so its workers are joined before their captured objects are destroyed.
When submission of an HTTP retry is rejected, this handler reschedules through ScheduleRefreshAfter(), whose callback calls DoRefresh() and resets the HTTP attempt counter to zero. Alternating accepted and rejected submissions while token requests fail can therefore bypass kMaxRetries indefinitely. Retry dispatch of the pending DoRefreshAttempt, preserving its attempt, backoff, and refresh_started_at, while retaining the bounded dispatch-retry backoff.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
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
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.
Replace the auth-specific token refresh scheduler with an internal utility that shares one process-lifetime timer and submits due work through a caller-owned
Executor.RestCatalog::Make(config, client_factory, auth_executor, metrics_executor)and the optional final argument ofAuthSession::MakeOAuth2. Without an auth executor, background refresh is disabled.ThreadExecutor.Validation: