Skip to content

Conversation

@ayush-panta
Copy link
Contributor

@ayush-panta ayush-panta commented Jan 12, 2026

Description of changes: During testing for macOS keychain integration with Finch, container tests failed to login to the test registry set up in common tests. These failed both locally and on CI. I noticed that, unlike similar registry container setup in Finch VM E2E tests, this setup did not have any grace period to allow the registry to become accessible. Upon adding 20 seconds of wait time, tests pass locally. To add the wait, I follow the pattern in Finch E2E tests.

Testing done: Prior to adding a grace period, we see this error in Finch locally (with the same failures in CI):

% go test -v ./e2e/container -timeout 20m -args -ginkgo.focus="log in a container registry|log out a container registry" -ginkgo.v
Summarizing 6 Failures:
  [FAIL] Finch Container Development E2E Tests log in a container registry when the private registry is running and an image is built [It] should push an image after successfully logging in the registry with a correct credential
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122
  [FAIL] Finch Container Development E2E Tests log in a container registry when the private registry is running and an image is built [It] should push an image after successfully logging in the registry with a correct credential
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122
  [FAIL] Finch Container Development E2E Tests log in a container registry when the private registry is running and an image is built [It] should push an image after successfully logging in the registry with a correct credential
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122
  [FAIL] Finch Container Development E2E Tests log in a container registry when the private registry is running and an image is built [It] should push an image after successfully logging in the registry with a correct credential
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122
  [FAIL] Finch Container Development E2E Tests log in a container registry when the private registry is running and an image is built [It] should push an image after successfully logging in the registry with a correct credential by -password-stdin
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122
  [FAIL] Finch Container Development E2E Tests log out a container registry when the private registry is running and an image is built [It] should fail to push an image after logging out the registry
  /Users/ayushkp/Documents/finch-creds/finch/common-tests/command/command.go:122

Ran 11 of 294 Specs in 234.848 seconds
FAIL! -- 5 Passed | 6 Failed | 0 Pending | 283 Skipped

with a common error pattern:

time="2026-01-12T05:44:26Z" level=warning msg="WARNING! Using --password via the CLI is insecure. Use --password-stdin."
  time="2026-01-12T05:44:26Z" level=error msg="failed to call tryLoginWithRegHost" error="failed to call rh.Client.Do: Get \"http://localhost:52981/v2/\": dial tcp 127.0.0.1:52981: connect: connection refused" i=0
  time="2026-01-12T05:44:26Z" level=fatal msg="failed to call rh.Client.Do: Get \"http://localhost:52981/v2/\": dial tcp 127.0.0.1:52981: connect: connection refused"
  [FAILED] in [It] - /Users/ec2-user/go/pkg/mod/github.com/runfinch/common-tests@v0.10.1/command/command.go:122 @ 01/12/26 05:44:26.541

Upon adding some wait time, we see the following locally:

% go test -v ./e2e/container -timeout 20m -args -ginkgo.focus="log in a container registry|log out a container registry" -ginkgo.v

Ran 11 of 294 Specs in 428.633 seconds
SUCCESS! -- 11 Passed | 0 Failed | 0 Pending | 283 Skipped
--- PASS: TestContainer (428.64s)
PASS
ok  	github.com/runfinch/finch/e2e/container	429.333s
  • I've reviewed the guidance in CONTRIBUTING.md

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: ayush-panta <ayushkp@amazon.com>
@ayush-panta ayush-panta requested a review from a team as a code owner January 12, 2026 08:02
@ayush-panta ayush-panta changed the title fix: add 20s grace period to allow registry to start up fix: add grace period to allow registry to start up Jan 12, 2026
Signed-off-by: ayush-panta <ayushkp@amazon.com>
@ayush-panta ayush-panta merged commit cfbacce into main Jan 12, 2026
6 checks passed
@ayush-panta ayush-panta deleted the add-registry-startup-time branch January 12, 2026 22:37
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.

3 participants