Skip to content

test/system: Ensure that the local temporary Docker registry is ready#1817

Merged
debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready
Jul 9, 2026
Merged

test/system: Ensure that the local temporary Docker registry is ready#1817
debarshiray merged 1 commit into
containers:mainfrom
debarshiray:wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready

Conversation

@debarshiray

Copy link
Copy Markdown
Member

... before proceeding to avoid potential races.

Some changes by Debarshi Ray.

#1811

debarshiray pushed a commit to debarshiray/toolbox that referenced this pull request Jul 6, 2026
... before proceeding to avoid potential races.

Some changes by Debarshi Ray.

containers#1811
containers#1817

Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
@debarshiray debarshiray force-pushed the wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready branch from d484a38 to fd7a49d Compare July 6, 2026 00:32

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new helper function _wait_for_docker_registry to wait for the local Docker registry to become ready before attempting to log in. The review feedback suggests executing this helper function using BATS' run and assert_success for consistent error handling, and simplifying the double subshell redirection used to capture stderr from the openssl command.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread test/system/libs/helpers.bash
Comment thread test/system/libs/helpers.bash Outdated

@Rolv-Apneseth Rolv-Apneseth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some very minor suggestions but LGTM

Comment thread test/system/libs/helpers.bash Outdated
Comment thread test/system/libs/helpers.bash Outdated
debarshiray pushed a commit to debarshiray/toolbox that referenced this pull request Jul 8, 2026
... before proceeding to avoid potential races.

Some changes by Debarshi Ray.

containers#1811
containers#1817

Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
@debarshiray debarshiray force-pushed the wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready branch from fd7a49d to e764906 Compare July 8, 2026 23:22
@debarshiray

Copy link
Copy Markdown
Member Author

Thanks for taking a look, @Rolv-Apneseth !

@Rolv-Apneseth Rolv-Apneseth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

debarshiray pushed a commit to debarshiray/toolbox that referenced this pull request Jul 9, 2026
... before proceeding.  This will avoid potential races.

Some changes by Debarshi Ray.

containers#1811
containers#1817

Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
@debarshiray debarshiray force-pushed the wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready branch from e764906 to 1a1b2e4 Compare July 9, 2026 14:25
... before proceeding.  This will avoid potential races.

Some changes by Debarshi Ray.

containers#1811
containers#1817

Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
@debarshiray debarshiray force-pushed the wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready branch from 1a1b2e4 to 6129f60 Compare July 9, 2026 16:42
@Rolv-Apneseth

Copy link
Copy Markdown
Contributor

Looking good. Once this is merged feel free to close #1811

@debarshiray debarshiray merged commit 6129f60 into containers:main Jul 9, 2026
2 of 3 checks passed
@debarshiray debarshiray deleted the wip/rishi/test-system-libs-helpers-ensure-docker-registry-is-ready branch July 9, 2026 20:36
@debarshiray

Copy link
Copy Markdown
Member Author

Thanks for all the reviews and suggestions!

@debarshiray

Copy link
Copy Markdown
Member Author

Build failed. https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/f35197a268ad4738a5386f6c3c85e20e

[...]

system-test-fedora-43-commands-options FAILURE in 2m 59s

Aha, it was one of those rare occurrences in the wild of port 50000 being unavailable on the host:

fedora-43 | not ok 1 setup_suite
fedora-43 | # (from function `assert_success' in file test/system/libs/bats-assert/src/assert.bash, line 114,
fedora-43 | #  from function `_setup_docker_registry' in file test/system/libs/helpers.bash, line 205,
fedora-43 | #  from function `setup_suite' in test file test/system/setup_suite.bash, line 70)
fedora-43 | #   `_setup_docker_registry' failed
fedora-43 | #
fedora-43 | # -- command failed --
fedora-43 | # status : 126
fedora-43 | # output (3 lines):
fedora-43 | #   Error: pasta failed with exit code 1:
fedora-43 | #   Listen failed for HOST TCP port */50000: Address already in use
fedora-43 | #   Couldn't listen on requested ports
fedora-43 | # --
fedora-43 | #

While trying to trigger the error paths locally to test the changes in this pull request, I found that one way to trigger this is to simultaneously run the test suite more than once.

Do you want to attempt a fix for this, @Rolv-Apneseth ?

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jul 9, 2026
@Rolv-Apneseth

Copy link
Copy Markdown
Contributor

Do you want to attempt a fix for this, @Rolv-Apneseth ?

Sure yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants