Skip to content

Skip legacy IMDS expiry extension on new refresh path - #3769

Open
alexgromero wants to merge 1 commit into
boto:feature/credential-refreshfrom
alexgromero:cred-refresh/imds-cleanup
Open

Skip legacy IMDS expiry extension on new refresh path#3769
alexgromero wants to merge 1 commit into
boto:feature/credential-refreshfrom
alexgromero:cred-refresh/imds-cleanup

Conversation

@alexgromero

Copy link
Copy Markdown
Contributor

Issue #, if available:
Python-9032

Overview

Updates the IMDS credential-fetching path to use the new shared credential refresh behavior when DEFAULT_NEW_CREDENTIAL_REFRESH is enabled.

On the flag-off path, IMDS keeps the existing legacy expiry-extension behavior. On the flag-on path, IMDS no longer calls _evaluate_expiration(), returns the real IMDS expiry, and relies on the shared RefreshableCredentials refresh-window behavior instead.

Testing

Also updates the flag-on test suite in tests/unit/test_credential_refresh.py to reflect the intended GA migration shape:

  • keep mirrored classes as pass when unchanged
  • use additive subclass coverage where existing tests still apply
  • fully copy the IMDS fetcher test class where legacy expiry-extension tests need to be removed/replaced

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@alexgromero
alexgromero requested a review from a team as a code owner August 6, 2026 21:09
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