Antalya 26.6: Cache vended credentials for REST catalogs - #2156
Conversation
…solution in next commit)
Kept only the source PR's own additions in the conflicted regions; the surrounding "theirs" context (stateless-worker ProfileEvents, the `initializeOrLeaveUnavailable` catalog loading path, and the `ALTER DATABASE ... MODIFY SETTING` / `CatalogState` machinery) belongs to other upstream PRs that are not on antalya-26.6. Adapted: DatabaseDataLake::getCatalog reads vended_credentials_cache_ttl from the plain `settings` member, because antalya-26.6 has no MultiVersion<DatabaseDataLakeSettings> database_settings Dropped: catalog auth-state invalidation of the vended credentials cache (cacheCredentials state-snapshot check and the commitSettingsChanges cache clear) - depends on the RestCatalog CatalogState/prepareSettingsChanges machinery not yet on antalya-26.6
CI triageVerdict: 11 red checks — 0 caused by this PR. Every failure is pre-existing on
Build (amd_msan) / Build (arm_msan) — pre-existing base-branch break
Proof it's pre-existing: the base branch's own MasterCI run 31142308506 (started ~4h before this PR's run) fails with the identical This is what blocks all the msan-dependent jobs (they show as dropped, not run). Fix (belongs on Unit tests (asan_ubsan) / Unit tests (tsan) — pre-existingBoth fail on the same gtest throwing Stateless tests (amd_debug, parallel) — flakySingle failure: Regression: iceberg_1, oauth, s3_export_part, s3_export_partition, swarms — pre-existing (version drift)Every one of these fails at the "feature support validation" gate, not in any actual scenario logic:
The shared regression suite is newer than the 26.6 build and probes features not present in this flavour. These would fail identically on the base branch and are independent of vended-credentials caching (the iceberg/oauth runs never reach the credential path — they bail at the feature check). Grype Scan clickhouse-server — infraNot a vulnerability finding. The scan step crashed before producing output ( PR health checkThe PR itself looks healthy. All build configs with a valid cache — amd/arm debug, release, asan_ubsan, tsan, binary — are green, as are Fast test, the targeted integration and AST fuzzer jobs. No failing check touches the changed files ( One non-CI note for reviewers: the PR description already flags that vended-credentials cache invalidation (auth-state snapshot check + |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add option to cache vended credentials for REST catalogs; add a setting
vended_credentials_cache_ttl(seconds). 300 by default. 0 means no caching (ClickHouse#107960 by @zvonand).Cherry-picked from ClickHouse#107960.
Now, new vended credentials are requested on each metadata request. This PR adds an (optional) cache for creds with configurable TTL.