Skip to content

[core] Unify the REST User-Agent format - #992

Open
sundapeng wants to merge 1 commit into
apache:mainfrom
sundapeng:rest-user-agent
Open

sundapeng wants to merge 1 commit into
apache:mainfrom
sundapeng:rest-user-agent

Conversation

@sundapeng

@sundapeng sundapeng commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

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

  • The REST client sends paimon-rust/<version>(reqwest), built from the catalog options user-agent.module, user-agent.features and user-agent.extended, which object storage requests read too. The version is a compile-time constant.
  • 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.

Examples:

Client and options User-Agent
REST catalog paimon-rust/0.4.0(reqwest)
user-agent.features=Flink, user-agent.extended=vvr paimon-rust/0.4.0(reqwest;Flink) vvr
header.User-Agent=starrocks/user starrocks/user

Related: #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 the header.User-Agent override; 92 passed, plus rest_api_test (45) and rest_catalog_test (79). Also checked on a live DLF REST catalog: its request log shows the configured features and extended part.
  • cargo fmt --all -- --check and cargo clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings.

API and Format

No.

Documentation

No.

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.
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