badalprasadsingh commented on code in PR #2456: URL: https://github.com/apache/iceberg-go/pull/2456#discussion_r4501992698
########## CONTRIBUTING.md: ########## @@ -62,9 +62,20 @@ Integration tests require Docker and are gated behind a build tag: ```bash docker compose -f internal/recipe/docker-compose.yml up -d rest object-store create-bucket --wait +eval "$(make integration-env)" Review Comment: P1: on Docker Desktop (macOs, windows), this sets `AWS_S3_ENDPOINT` to the container ip, something which the host can't reach, so every S3 call hangs and then times out the 9000 port is published so better use `http://localhost:9000`, as `recipe.Start` does, or make `integration-env` print it ```bash export AWS_S3_ENDPOINT=http://localhost:9000 AWS_REGION=us-east-1 ``` ########## CONTRIBUTING.md: ########## @@ -62,9 +62,20 @@ Integration tests require Docker and are gated behind a build tag: ```bash docker compose -f internal/recipe/docker-compose.yml up -d rest object-store create-bucket --wait +eval "$(make integration-env)" go test -tags integration ./... Review Comment: only rest and object store are up, thus it fails: `catalog/hive`, `io/gocloud/azure`, `io/gocloud/gcs`, `catalog/hadoop` and table better run only the packages this stack serves: ```bash go test -tags integration ./catalog/rest/... ./catalog/sql/... ./table/maintenance/... ./io/gocloud/s3/... ``` ########## CONTRIBUTING.md: ########## @@ -62,9 +62,20 @@ Integration tests require Docker and are gated behind a build tag: ```bash docker compose -f internal/recipe/docker-compose.yml up -d rest object-store create-bucket --wait +eval "$(make integration-env)" go test -tags integration ./... ``` +`make integration-env` prints the environment the tests need, including `AWS_S3_ENDPOINT` (the local object store) and `AWS_REGION`, so run it after the containers are up. Without `AWS_S3_ENDPOINT`, the S3-backed tests send requests to real AWS S3 and fail (for example with a `301 PermanentRedirect`). + +Some integration tests need services that this command does not start (Hive, Azure, GCS and Spark). To run the suites CI runs, start everything and use the make target instead: + +```bash +make integration-setup +eval "$(make integration-env)" +make integration-test +``` Review Comment: readme's "Integration tests" section already covers all these better: link to it instead of a second copy ########## CONTRIBUTING.md: ########## @@ -62,9 +62,20 @@ Integration tests require Docker and are gated behind a build tag: ```bash docker compose -f internal/recipe/docker-compose.yml up -d rest object-store create-bucket --wait +eval "$(make integration-env)" go test -tags integration ./... ``` +`make integration-env` prints the environment the tests need, including `AWS_S3_ENDPOINT` (the local object store) and `AWS_REGION`, so run it after the containers are up. Without `AWS_S3_ENDPOINT`, the S3-backed tests send requests to real AWS S3 and fail (for example with a `301 PermanentRedirect`). + +Some integration tests need services that this command does not start (Hive, Azure, GCS and Spark). To run the suites CI runs, start everything and use the make target instead: + +```bash +make integration-setup +eval "$(make integration-env)" Review Comment: same as the previous comment -- 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]
