Conversation
This was referenced Sep 28, 2026
REST catalog requests went out with the python-requests default User-Agent, and PVFS set the option header.HTTP_USER_AGENT, which sent a header literally named HTTP_USER_AGENT instead of the User-Agent. REST requests now carry Paimon's unified User-Agent format, module(python-requests/<version>[;features]) [extended], built from the catalog-wide options user-agent.module, user-agent.features and user-agent.extended, which object storage requests share. The module defaults to pypaimon/<version>. A user-set header.User-Agent still takes precedence; its option key is fixed to header.User-Agent. PVFS puts PythonPVFS first in the features instead of replacing the User-Agent.
sundapeng
force-pushed
the
pypaimon-rest-user-agent
branch
from
September 29, 2026 01:08
4c68984 to
066970a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
pypaimon's REST client sends the python-requests default User-Agent, so its catalog requests can't be told apart from other Python clients. PVFS sets the option
header.HTTP_USER_AGENT, which sends a header literally namedHTTP_USER_AGENTinstead of the User-Agent.REST requests now carry Paimon's unified User-Agent format,
<module>(<transport>[;<feature>...])[ <extended>], the one object storage requests adopt as well (#10307):user-agent.module,user-agent.featuresanduser-agent.extended, shared with object storage requests.pypaimon/<version>, transportpython-requests/<version>. The version is the onebuild_infoembeds at build time.header.User-Agentstill replaces the whole value. The option key is fixed toheader.User-Agent.PythonPVFSfirst in the features instead of replacing the User-Agent.Examples:
pypaimon/2.2.dev(python-requests/2.34.2)user-agent.features=Flink,user-agent.extended=vvrpypaimon/2.2.dev(python-requests/2.34.2;Flink) vvrheader.User-Agent=starrocks/userstarrocks/useruser-agent.features=Flinkpypaimon/2.2.dev(python-requests/2.34.2;PythonPVFS;Flink)Related: #10307 (Python OSS), which adds the same
build_info.version(); #10308 (Java REST), apache/paimon-rust#992 (Rust REST).Tests
rest_user_agent_test.py: 11 new cases, several against a local HTTP server; 135 tests passed together with the existing REST, token loader, API and PVFS tests. Also checked on a live DLF REST catalog: its request log shows the configured features and extended part.