-
Notifications
You must be signed in to change notification settings - Fork 258
Attempt to fix CI timeouts #1811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ readonly TOOLBX_TEST_SYSTEM_TAGS="${TOOLBX_TEST_SYSTEM_TAGS:-$TOOLBX_TEST_SYSTEM | |
| # Images | ||
| declare -Ag IMAGES=([arch]="quay.io/toolbx/arch-toolbox" \ | ||
| [busybox]="quay.io/toolbox_tests/busybox" \ | ||
| [docker-reg]="quay.io/toolbox_tests/registry" \ | ||
| [docker-reg]="ghcr.io/distribution/distribution:3" \ | ||
| [fedora]="registry.fedoraproject.org/fedora-toolbox" \ | ||
| [rhel]="registry.access.redhat.com/ubi8/toolbox" \ | ||
| [ubuntu]="quay.io/toolbx/ubuntu-toolbox") | ||
|
|
@@ -116,7 +116,9 @@ function _pull_and_cache_distro_image() { | |
| local -i ret_val | ||
|
|
||
| for ((j = 0; j < num_of_retries; j++)); do | ||
| error_message="$( (skopeo copy --dest-compress \ | ||
| error_message="$( (skopeo copy \ | ||
| --command-timeout 10m \ | ||
| --dest-compress \ | ||
| "docker://${image}" \ | ||
| "dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)" | ||
| ret_val="$?" | ||
|
|
@@ -203,6 +205,23 @@ function _setup_docker_registry() { | |
| "${IMAGES[docker-reg]}" | ||
| assert_success | ||
|
|
||
| # Ensure the registry is ready | ||
| local registry_ready=false | ||
| local -i retries | ||
| for ((retries = 0; retries < 30; retries++)); do | ||
| if timeout 5 openssl s_client \ | ||
| -connect "${DOCKER_REG_URI}" \ | ||
| -CAfile "${DOCKER_REG_CERTS_DIR}/domain.crt" \ | ||
| </dev/null >/dev/null 2>&1; then | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wondering if we could retain the standard error stream from After teaching myself enough about
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, we'll continue that over there then. Maybe this PR is OK to be closed? |
||
| registry_ready=true | ||
| break | ||
| fi | ||
| sleep 1 | ||
| done | ||
| if ! $registry_ready; then | ||
| fail "Docker registry at ${DOCKER_REG_URI} did not reach a ready state" | ||
|
Rolv-Apneseth marked this conversation as resolved.
|
||
| fi | ||
|
|
||
| run podman login \ | ||
| --authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ | ||
| --username user \ | ||
|
|
@@ -211,7 +230,9 @@ function _setup_docker_registry() { | |
| assert_success | ||
|
|
||
| # Add fedora-toolbox:34 image to the registry | ||
| run skopeo copy --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ | ||
| run skopeo copy \ | ||
| --command-timeout 60s \ | ||
|
Rolv-Apneseth marked this conversation as resolved.
|
||
| --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \ | ||
| dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \ | ||
| docker://"${DOCKER_REG_URI}"/fedora-toolbox:34 | ||
| assert_success | ||
|
|
@@ -331,7 +352,10 @@ function pull_distro_image() { | |
| fi | ||
|
|
||
| # https://github.com/containers/skopeo/issues/547 for the options for containers-storage | ||
| run skopeo copy "dir:${IMAGE_CACHE_DIR}/${image_archive}" "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}" | ||
| run skopeo copy \ | ||
|
Rolv-Apneseth marked this conversation as resolved.
|
||
| --command-timeout 60s \ | ||
| "dir:${IMAGE_CACHE_DIR}/${image_archive}" \ | ||
| "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}" | ||
|
|
||
| # shellcheck disable=SC2154 | ||
| if [ "$status" -ne 0 ]; then | ||
|
|
@@ -364,6 +388,7 @@ function pull_default_image_and_copy() { | |
|
|
||
| # https://github.com/containers/skopeo/issues/547 for the options for containers-storage | ||
| run skopeo copy \ | ||
| --command-timeout 60s \ | ||
| "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \ | ||
| "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should update the image? We probably should.
As far as I understand, we started using
quay.io/toolbox_testsbecause Docker Hub has relatively restrictive rate limits, and we were occasionally hitting them. @martymichal will correct me if I am wrong.If GitHub's Container Registry is generous enough, then maybe we can switch to it?
Does the GitHub Container Registry have a front-end or catalogue, like Docker Hub does? Something like hub.docker.com/_/registry for
docker.io/library/registry. I am looking for a canonical source of documentation, metadata and the sources for the image.I know this sounds stupid, and I just can't figure it out. If I type
ghcr.ioin Firefox, it takes me to github.com/features/actions. That page has a lot of things but nothing about the OCI images.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I thought it was the updated image that had resolved the issue, but I guess it was just lucky timing haha. Maybe we don't need to update it at all.
But those are good questions about the github container registry. As far as I know they don't have a single front-end/catalogue for all the images they host. But, following the "Packages" linked on the repo, I did find this: https://github.com/distribution/distribution/pkgs/container/distribution
As for the rate limits, I don't see anything mentioned here. I can't find anything else about it online either though.