Conversation
REST catalog requests went out without a User-Agent. They now send Paimon's unified User-Agent format, module(transport;features) extended, by default paimon-rust/<version>(reqwest). The parts come from the catalog options user-agent.module, user-agent.features and user-agent.extended, which object storage requests share. A user-set header.User-Agent option still takes precedence and is the only User-Agent sent. The DLF ECS token client sends the default.
5714b6f to
70cf3bf
Compare
|
Requirement fit: SUPPORTED — request attribution in REST catalog logs has end-to-end operational value. Implementation: FINDINGS at [P2] Refresh the User-Agent after merging Verification: 92/92 API unit tests, 45/45 REST API integration tests, and 79/79 REST catalog integration tests passed. The temporary config-negotiation regression failed with the header mismatch above; the test edit was restored. Diff check and current-main merge-tree passed; all 14 head CI checks are green. |
The REST client was built from the initial options only, so user-agent.* options delivered through /v1/config were ignored. RESTApi::new now rebuilds the default User-Agent from the merged options after bootstrap; an explicit header.User-Agent still takes precedence per request.
|
Thanks, good catch. The REST client was built from the initial options only, so |
|
Re-reviewed Validation on the updated head: 94 API unit tests, 46 REST API integration tests (including the original reproducer), and 79 REST catalog integration tests passed. Current-main merge check is clean. No further actionable code finding from this follow-up; remaining CI runs should finish before merge. |
Purpose
REST catalog requests from paimon-rust carry no
User-Agent, since reqwest sets none by default, so these clients can't be attributed in the catalog server's request logs.REST requests now carry Paimon's unified User-Agent format,
<module>(<transport>[;<feature>...])[ <extended>], the one object storage requests adopt as well (#991).Brief change log
paimon-rust/<version>(reqwest), built from the catalog optionsuser-agent.module,user-agent.featuresanduser-agent.extended, which object storage requests read too. The version is a compile-time constant.header.User-Agentoption still takes precedence and is the only User-Agent sent.Examples:
paimon-rust/0.4.0(reqwest)user-agent.features=Flink,user-agent.extended=vvrpaimon-rust/0.4.0(reqwest;Flink) vvrheader.User-Agent=starrocks/userstarrocks/userRelated: #991 (object storage User-Agent), apache/paimon#10308 (Java REST), apache/paimon#10309 (Python REST).
Tests
api::unit tests: new cases on a local HTTP endpoint for the default, the new options and theheader.User-Agentoverride; 92 passed, plusrest_api_test(45) andrest_catalog_test(79). Also checked on a live DLF REST catalog: its request log shows the configured features and extended part.cargo fmt --all -- --checkandcargo clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings.API and Format
No.
Documentation
No.