dhruvarya-db opened a new pull request, #3421: URL: https://github.com/apache/iceberg-rust/pull/3421
## Which issue does this PR close? - Follows the REST spec change in apache/iceberg#17727 (recommended `User-Agent` format for REST clients). ## What changes are included in this PR? The spec now asks clients to send `User-Agent` and says the Iceberg library token MUST be present whenever the header is sent. It lists `iceberg-rust` as this library's token. The REST catalog sent `iceberg-rs/<version>`, and a `header.user-agent` property replaced it entirely, which dropped the library token. - The default is now `iceberg-rust/<version>`. - A `header.user-agent` value is kept, and the library token is inserted after the caller's product tokens and before any trailing `(comment)`. For example, `DataFusion/50.0.0 (rust 1.95)` becomes `DataFusion/50.0.0 iceberg-rust/<version> (rust 1.95)`. This applies to OAuth token requests as well, since they use the same header path. `X-Client-Version` is unchanged; the spec PR leaves it out of scope. ## Are these changes tested? Yes, unit tests in `catalog.rs`: a configured `header.user-agent` keeps the library token, and the token placement for empty, multi-product, and comment-bearing values. The existing header tests were updated for the new token. ## AI Disclosure Drafted with an AI assistant and reviewed by me. Points to check: - This is a user-visible change: servers or log pipelines that match on `iceberg-rs/` will see `iceberg-rust/` instead. - The comment split is on the first `(`. Product tokens can't contain `(` under RFC 7230, but a malformed user value containing `(` mid-token would have the library token inserted at that position. - There's no de-duplication: a user value that already contains an `iceberg-rust/` token gets a second one. -- 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]
