From adbed36dd9fc71fc9ac0cfee32e8dd90d93ac36a Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 21 Jan 2021 19:34:47 +0000 Subject: [PATCH 1/3] tests: Avoid double docker pull on Azure Pipes --- .ci/prep_azure.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.ci/prep_azure.py b/.ci/prep_azure.py index e236e3e7..80dbf485 100755 --- a/.ci/prep_azure.py +++ b/.ci/prep_azure.py @@ -86,12 +86,4 @@ if need_to_fix_psycopg2: batches.append(venv_steps) - -if ci_lib.have_docker(): - batches.extend( - ['docker pull %s' % (ci_lib.image_for_distro(distro),)] - for distro in ci_lib.DISTROS - ) - - ci_lib.run_batches(batches) From 1c7e1078092f0581676aa2cc0f83c218084a1a32 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 22 Jan 2021 00:31:19 +0000 Subject: [PATCH 2/3] tests: Use AWS Elastic Container registry for test images This replaces use of Docker Hub, which now rate limits API calls and causing CI builds to fail. refs #791 --- .ci/ci_lib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/ci_lib.py b/.ci/ci_lib.py index f735f6a1..285d7f19 100644 --- a/.ci/ci_lib.py +++ b/.ci/ci_lib.py @@ -184,7 +184,11 @@ def get_docker_hostname(): def image_for_distro(distro): - return 'mitogen/%s-test' % (distro.partition('-')[0],) + """Return the container image name or path for a test distro name. + + The returned value is suitable for use with `docker pull`. + """ + return 'public.ecr.aws/n5z0e8q9/%s-test' % (distro.partition('-')[0],) def make_containers(name_prefix='', port_offset=0): From 25446cd69814d9c8c10f0d20047af12f3ee47662 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 22 Jan 2021 23:31:21 +0000 Subject: [PATCH 3/3] tests: Throttle docker pulls for Ansible tests I hope this will prevent AWS Elastic Container Registry returning 429: Too Many Requests error, due to the burst of activity from multiple VMs, when a CI build begins. --- .ci/ansible_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/ansible_install.py b/.ci/ansible_install.py index 906961db..bb659f8a 100755 --- a/.ci/ansible_install.py +++ b/.ci/ansible_install.py @@ -17,7 +17,7 @@ batches = [ ] batches.extend( - ['docker pull %s' % (ci_lib.image_for_distro(distro),)] + ['docker pull %s' % (ci_lib.image_for_distro(distro),), 'sleep 1'] for distro in ci_lib.DISTROS )