plusplusjiajia opened a new pull request, #899:
URL: https://github.com/apache/iceberg-cpp/pull/899
Stacked on #898 — until that merges, this PR's diff includes it; the
commit to review is the last one.
Adds the plumbing for replacing vended storage credentials, deliberately
without any policy:
- `StorageCredentialRefresher` (a callback returning the vended list) and
a default-no-op `SetCredentialRefresher` hook on `SupportsStorageCredentials`.
- `LoadCredentialsResponse` and its parsing. `storage-credentials` is
required here per the REST spec, unlike LoadTable where it stays optional:
reading a malformed response as "no credentials" would look like a refresh that
succeeded and dropped them. Parse errors deliberately do not carry the response
body — it contains
the credentials themselves.
- `RestCatalog::MakeCredentialRefresher` builds the callback from the
LoadCredentials endpoint with the table session, capturing the catalog so the
session's owner outlives copied FileIOs. Both paths that cannot build one say
so in the log, since the consequence only surfaces much later as credentials
expiring mid-job.
- `ResolvingFileIO` forwards an installed refresher to resolved delegates,
rebuilding cached ones on a late install; retired delegates and the outgoing
callback destruct outside the lock, per the discipline #898 establishes.
Nothing invokes the refresher yet; the policy that does arrives in the
final PR of this series (#892).
`MakeCredentialRefresher` itself has no unit test — `HttpClient` is
concrete, with no seam to fake. It was verified end-to-end against a live
credential-vending catalog: endpoint advertised, GET succeeding, response
parsing, and IO continuing on the replacements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]