Skip to content

Conversation

@sannya-singal
Copy link
Contributor

Motivation

Fixes docker based tests failing due to missing DockerHub credentials by passing DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD env variables into test containers.

Failing run: https://github.com/localstack/localstack/runs/55590416030

Changes

This PR:

  • Adds DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD flags to both docker-run-tests and docker-run-tests-s3-only

The test-in-docker script in pro is already adapted to pass the docker hub credentials here and the fixture exists that runs the docker login with these creds here.

Related

Fixes FLC-174

@sannya-singal sannya-singal self-assigned this Nov 28, 2025
@sannya-singal sannya-singal added semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Nov 28, 2025
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

S3 Image Test Results (AMD64 / ARM64)

    2 files    2 suites   8m 32s ⏱️
  544 tests 492 ✅  52 💤 0 ❌
1 088 runs  984 ✅ 104 💤 0 ❌

Results for commit 805c346.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Test Results - Preflight, Unit

22 686 tests  ±0   20 918 ✅ ±0   6m 34s ⏱️ +15s
     1 suites ±0    1 768 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 805c346. ± Comparison against base commit ff6e5e0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 17s ⏱️ +2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 805c346. ± Comparison against base commit ff6e5e0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 42m 36s ⏱️
5 477 tests 4 925 ✅ 552 💤 0 ❌
5 483 runs  4 925 ✅ 558 💤 0 ❌

Results for commit 805c346.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   2h 4m 2s ⏱️ -36s
5 103 tests ±0  4 711 ✅ ±0  392 💤 ±0  0 ❌ ±0 
5 105 runs  ±0  4 711 ✅ ±0  394 💤 ±0  0 ❌ ±0 

Results for commit 805c346. ± Comparison against base commit ff6e5e0.

♻️ This comment has been updated with latest results.

@sannya-singal sannya-singal marked this pull request as ready for review November 28, 2025 09:17
Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for finding the location where we perform the login. At first, I thought it's not in there because I looked only at where the client is created.

This should be working fine now!

Copy link
Contributor

@k-a-il k-a-il left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for resolving this issue 💯 I just have a minor question about the S3 tests that I'd like to clarify

Makefile Outdated
# TODO: We need node as it's a dependency of the InfraProvisioner at import time, remove when we do not need it anymore
# g++ is a workaround to fix the JPype1 compile error on ARM Linux "gcc: fatal error: cannot execute ‘cc1plus’" because the test dependencies include the runtime dependencies.
docker run -e LOCALSTACK_INTERNAL_TEST_COLLECT_METRIC=1 --entrypoint= -v `pwd`/.git:/opt/code/localstack/.git -v `pwd`/requirements-test.txt:/opt/code/localstack/requirements-test.txt -v `pwd`/tests/:/opt/code/localstack/tests/ -v `pwd`/target/:/opt/code/localstack/target/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/localstack:/var/lib/localstack \
docker run -e LOCALSTACK_INTERNAL_TEST_COLLECT_METRIC=1 -e DOCKERHUB_USERNAME -e DOCKERHUB_PASSWORD --entrypoint= -v `pwd`/.git:/opt/code/localstack/.git -v `pwd`/requirements-test.txt:/opt/code/localstack/requirements-test.txt -v `pwd`/tests/:/opt/code/localstack/tests/ -v `pwd`/target/:/opt/code/localstack/target/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/localstack:/var/lib/localstack \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these environment variables actually needed for docker-run-tests-s3-only?

If they are needed, we also need to propagate those env varaibles in the step Run S3 Image tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I don't think they are because the S3 only tests won't run services that download Docker images from what I know. /cc @bentsku

Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I've removed the S3 ones as those are unnecessary in the S3 test run as pointed out by @k-a-il and @silv-io. Let's get this merged 💯

And nice TIL about the -e / --env flag passing!


docker-run-tests: ## Initializes the test environment and runs the tests in a docker container
docker run -e LOCALSTACK_INTERNAL_TEST_COLLECT_METRIC=1 --entrypoint= -v `pwd`/.git:/opt/code/localstack/.git -v `pwd`/requirements-test.txt:/opt/code/localstack/requirements-test.txt -v `pwd`/.test_durations:/opt/code/localstack/.test_durations -v `pwd`/tests/:/opt/code/localstack/tests/ -v `pwd`/dist/:/opt/code/localstack/dist/ -v `pwd`/target/:/opt/code/localstack/target/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/localstack:/var/lib/localstack \
docker run -e LOCALSTACK_INTERNAL_TEST_COLLECT_METRIC=1 -e DOCKERHUB_USERNAME -e DOCKERHUB_PASSWORD --entrypoint= -v `pwd`/.git:/opt/code/localstack/.git -v `pwd`/requirements-test.txt:/opt/code/localstack/requirements-test.txt -v `pwd`/.test_durations:/opt/code/localstack/.test_durations -v `pwd`/tests/:/opt/code/localstack/tests/ -v `pwd`/dist/:/opt/code/localstack/dist/ -v `pwd`/target/:/opt/code/localstack/target/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/localstack:/var/lib/localstack \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about the -e flag passing directly your own env var!

https://docs.docker.com/reference/cli/docker/container/run/#env

You can also use variables exported to your local environment:

export VAR1=value1
export VAR2=value2

docker run --env VAR1 --env VAR2 ubuntu env | grep VAR
VAR1=value1
VAR2=value2

When running the command, the Docker CLI client checks the value the variable has in your local environment and passes it to the container. If no = is provided and that variable isn't exported in your local environment, the variable is unset in the container.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :D

@bentsku bentsku merged commit 1924fe9 into main Dec 2, 2025
49 checks passed
@bentsku bentsku deleted the flc-174 branch December 2, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants