You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/11 01:26:06 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #5238: Core - Add build information to all requests sent by HTTPClient

kbendick commented on code in PR #5238:
URL: https://github.com/apache/iceberg/pull/5238#discussion_r917481771


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -110,7 +115,10 @@ public <T extends RESTResponse> T execute(RESTCatalogAdapter.HTTPMethod method,
 
     this.restCatalog = new RESTCatalog(context, (config) -> adaptor);
     restCatalog.setConf(conf);
-    restCatalog.initialize("prod", ImmutableMap.of(CatalogProperties.URI, "ignored", "credential", "catalog:12345"));
+    restCatalog.initialize("prod", ImmutableMap.of(
+        CatalogProperties.URI, "ignored", "credential", "catalog:12345",
+        String.format("header.%s", HTTPClientFactory.CLIENT_GIT_COMMIT_SHORT_HEADER), IcebergBuild.gitCommitShortId(),
+        String.format("header.%s", HTTPClientFactory.CLIENT_VERSION_HEADER), IcebergBuild.version()));

Review Comment:
   These don't really need to be set because `HTTPClientFactory` isn't used here - the underlying JDBC client is what builds this.
   
   We can however still override the version etc by sending back a configuration property of `header.X-Client-Version` with the desired value to be used as the value (though I don't see any reason to do that).



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org