kevinjqliu commented on code in PR #19260:
URL: https://github.com/apache/iceberg/pull/19260#discussion_r4763069518


##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -46,13 +44,13 @@ ENV 
CATALOG_URI=jdbc:sqlite:/tmp/iceberg_catalog.db?journal_mode=WAL
 ENV CATALOG_JDBC_USER=user
 ENV CATALOG_JDBC_PASSWORD=password
 ENV CATALOG_JDBC_STRICT__MODE=true
-ENV REST_PORT=8181
+ENV CATALOG_REST_PORT=8181
 
 # Healthcheck for the iceberg rest service
 HEALTHCHECK --retries=10 --interval=1s \
-  CMD curl --fail http://localhost:$REST_PORT/v1/config || exit 1
+  CMD curl -fsS -o /dev/null "http://localhost:${CATALOG_REST_PORT}/v1/config"; 
|| exit 1
 
-EXPOSE $REST_PORT
+EXPOSE $CATALOG_REST_PORT

Review Comment:
   `REST_PORT` was never used by `RESTCatalogServer` (it only existed in the 
`Dockerfile`). Instead, `RESTCatalogServer` reads the `rest.port` property, 
which maps to the `CATALOG_REST_PORT` env var 
(`RCKUtils.environmentCatalogConfig()` strips `CATALOG_` and replaces `_` with 
`.`).
   
   Replacing `REST_PORT` with `CATALOG_REST_PORT` keeps the server, `EXPOSE`, 
and `HEALTHCHECK` in sync when overriding the port.
   
   Also switched to `curl -fsS -o /dev/null` so the 1s healthcheck stays quiet 
on success instead of dumping `/v1/config` into `docker inspect`, while still 
logging errors.



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

Reply via email to