ci: Switch to gcr.io mirror to avoid rate limits #31906

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2502-ci-rate changing 17 files +17 −17
  1. maflcko commented at 2:56 pm on February 19, 2025: member

    dockerhub seems to have recently started to increase their rate limits further, beyond what is documented, even to the extent where pulling the same image twice at the same time results in a ban. See #31797 (comment)

    Fix all issues by just using another mirror, as documented in https://cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images

    Fixes https://github.com/bitcoin/bitcoin/issues/31797

  2. ci: Switch to gcr.io mirror to avoid rate limits fa8de4706a
  3. DrahtBot commented at 2:56 pm on February 19, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31906.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK 0xB10C

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31802 (Add bitcoin-{node,gui} to release binaries for IPC by Sjors)
    • #30975 (ci: build multiprocess on most jobs by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. DrahtBot added the label Tests on Feb 19, 2025
  5. 0xB10C commented at 4:00 pm on February 19, 2025: contributor

    An alternative would probably be to configure the docker deamons of the self-hosted runners to use the mirror?

    in e.g. /etc/docker/daemon.json

    0{
    1  "registry-mirrors": ["https://mirror.gcr.io"]
    2}
    

    or in /etc/containers/registries.conf.d/gcr.conf for podman

    0[[registry]]
    1location = "https://mirror.gcr.io"
    2prefix = "docker.io"
    
  6. in ci/test/00_setup_env_native_asan.sh:9 in fa8de4706a
     5@@ -6,7 +6,7 @@
     6 
     7 export LC_ALL=C.UTF-8
     8 
     9-export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
    10+export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
    


    0xB10C commented at 4:02 pm on February 19, 2025:
    the ASAN job (and others) currently runs on a GitHub hosted runner and these are exempt from the rate-limiting: https://github.com/actions/runner-images/issues/1445#issuecomment-714832439
  7. maflcko commented at 4:31 pm on February 19, 2025: member

    An alternative would probably be to configure the docker deamons of the self-hosted runners to use the mirror?

    I haven’t tested this and it seems like more hassle along with the risk of reintroducing the bug fixed in #28330. I guess the bug is fixed in the meantime via CI_IMAGE_PLATFORM, but I haven’t tried it.

    Though, I don’t mind either way. I am happy to close this pull and review a different one, if someone creates one.

  8. maflcko commented at 1:21 pm on February 20, 2025: member

    An alternative would probably be to configure the docker deamons of the self-hosted runners to use the mirror?

    I haven’t tested this

    I tested it and your suggestion failed locally for me:

    0# podman pull docker.io/ubuntu/24.04
    1Error: loading drop-in registries configuration "/etc/containers/registries.conf.d/gcr.conf": invalid location 'https://mirror.gcr.io': URI schemes are not supported
    2# cat /etc/containers/registries.conf.d/gcr.conf
    3[[registry]]
    4location = "https://mirror.gcr.io"
    5prefix = "docker.io"
    

    (then removing https, it will still fail due to pulling from docker.io)

    Also, I don’t see any benefit over this pull request? This pull request is a single (hopefully) one-time change, fixing the problem for all CI workers, CI machines, and other current (and future) CI deployments.

  9. 0xB10C commented at 4:44 pm on February 20, 2025: contributor

    Agree that this is the better than having to modify all CI machines and deployments. I did some light testing on my runners and didn’t see any problems in fetching the images. The CI passing here indicate the same. While switching the GitHub Actions tasks to the new images probably isn’t necessary due to being exempt from the rate-limiting (https://github.com/bitcoin/bitcoin/pull/31906#discussion_r1961960848), I don’t think it hurts.

    ACK fa8de4706a01322fd8ab8e491d297b97f001ecff

  10. fanquake merged this on Feb 20, 2025
  11. fanquake closed this on Feb 20, 2025

  12. maflcko deleted the branch on Feb 20, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-02-22 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me