feat(credentials): Add configurable refresh_buffer_seconds to CredentialProvider#5952
Closed
namo507 wants to merge 1 commit intoaden-hive:mainfrom
Closed
feat(credentials): Add configurable refresh_buffer_seconds to CredentialProvider#5952namo507 wants to merge 1 commit intoaden-hive:mainfrom
namo507 wants to merge 1 commit intoaden-hive:mainfrom
Conversation
…r_seconds attribute - Changed should_refresh() to use getattr(self, "refresh_buffer_seconds", 300) instead of hardcoded timedelta(minutes=5) - Backward compatible: defaults to 300 seconds (5 min) if attribute not set - Resolves: aden-hive#5945 This is part of the feat/configurable-credential-refresh-buffer PR proposal.
PR Closed - Requirements Not MetThis PR has been automatically closed because it doesn't meet the requirements. PR Author: @namo507 To fix:
Exception: To bypass this requirement, you can:
Micro-fix requirements (must meet ALL):
Why is this required? See #472 for 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
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.
Summary
Makes the credential refresh buffer configurable instead of hardcoded at 5 minutes. Addresses #5945.
Changes
should_refresh()inCredentialProviderto usegetattr(self, "refresh_buffer_seconds", 300)instead of a hardcodedtimedelta(minutes=5)refresh_buffer_secondsisn't set on the provider instanceself.refresh_buffer_seconds = <int>in their__init__to customizeRelated issue: Closes #5945
Test plan
timedelta(seconds=300)behavior)refresh_buffer_seconds=600triggers refresh earlierrefresh_buffer_seconds=60for short-lived SSO tokensNotes
This unblocks teams using enterprise SSO tokens (15-30 min expiry) and long-lived API keys (24h+) that need different buffer tuning per provider.