← Back to issue list

Make ROCK base image registry configurable.

View original Github issue

Metadata

Project
rockcraft
Number
#655
Type
issue
State
open
Author
aznashwan
Labels
—
Created
Updated
Closed
—

Current evaluation

Request to make the hardcoded ECR base image registry configurable to avoid rate-limit failures in CI builds.

Suggested action: needs triage

Reason: The issue is a valid feature request with clear impact (CI builds failing due to ECR rate limits) and identifies the exact code path (`rockcraft/oci.py` line 99 where `REGISTRY_URL` is hardcoded). However, it has no labels, no maintainer response, and no assignee, so it needs triage to be prioritized. The fix is straightforward: make `REGISTRY_URL` configurable via a top-level argument and propagate it to `Image.from_docker_registry()`.

Evaluated by: mr-cal-bot

Impact: 70 Quick Win: 39 Complexity: 30 Confidence: 85 Actionability: 80

Issue body

### What needs to get done [`rockcraft.oci.Image` class](https://github.com/canonical/rockcraft/blob/d09ad13493b8dc0cbb95db7285ef4a6d8a166f67/rockcraft/oci.py#L54) needs extending to add configurable registry URL during the `skopeo copy` of the base image to allow from pulling from non-ECR registries. Will probably need adding a top-level `rockcraft` argument and transparently propagating it down to the actual image URL [composed here](https://github.com/canonical/rockcraft/blob/d09ad13493b8dc0cbb95db7285ef4a6d8a166f67/rockcraft/oci.py#L92) which later gets passed to the `skopeo copy` command. ### Why it needs to get done Although ECR is considerably more lenient than DockeHub in terms of data pull limits for unverified requests, it still has them, leading to errors like these: ```python3 024-07-29 11:06:56.991 Execute process: ['/snap/rockcraft/1783/bin/skopeo', '--insecure-policy', '--override-arch', 'amd64', 'copy', '--retry-times', '5', 'docker://public.ecr.aws/ubuntu/ubuntu:22.04', 'oci:/root/images/ubuntu:22.04'], kwargs={} 2024-07-29 11:10:30.466 Failed to copy image: Command '['/snap/rockcraft/1783/bin/skopeo', '--insecure-policy', '--override-arch', 'amd64', 'copy', '--retry-times', '5', 'docker://public.ecr.aws/ubuntu/ubuntu:22.04', 'oci:/root/images/ubuntu:22.04']' returned non-zero exit status 1. (time="2024-07-29T11:07:28Z" level=warning msg="Failed, retrying in 1s ... (1/5). Error: initializing source docker://public.ecr.aws/ubuntu/ubuntu:22.04: reading manifest 22.04 in public.ecr.aws/ubuntu/ubuntu: toomanyrequests: Data limit exceeded" ``` Depending on the project being rock'd, these limits can be quite the nuisance. The [`canonical/harbor-rocks` repo](https://github.com/canonical/harbor-rocks) for example defines rocks for 10 components x 3 versions x 2 architectures = 60 whole images, and it's virtually guaranteed that 2-3 of the build workflows will fail. It would be nice to be able to use a local registry mirror when `rockcraft build/pack`-ing.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 39
Complexity: 30
Confidence: 85
Actionability: 80
needs triage Request to make the hardcoded ECR base image registry configurable to avoid rate-limit failures in CI builds.
stealth/space-bunny-alpha
Impact: 52
Quick Win: 21
Complexity: 42
Confidence: 94
Actionability: 68
needs triage Requests a configurable ROCK base-image registry to avoid ECR pull-rate failures. The current code still hard-codes public ECR, and the configuration interface remains unspecified.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 30
Confidence: 80
Actionability: 60
needs triage Feature request to make the ROCK base image registry configurable, allowing users to specify a local mirror or alternative registry to avoid ECR rate limits. Currently untriaged and open.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 25
Staleness: 85
Complexity: 45
Confidence: 80
Support Request: 20
needs triage Feature request to make the hardcoded ECR base image registry URL configurable in rockcraft.oci.Image to allow pulling from non-ECR registries and avoid rate-limit failures. Untriaged, no maintainer response, no labels, 763 days old. Code still uses hardcoded REGISTRY_URL = ECR_URL.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 25
Confidence: 85
Support Request: 5
needs triage Feature request to make base image registry configurable in rockcraft to bypass ECR/DockerHub rate limits. Untriaged, inactive for ~2 years with no maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 25
Confidence: 85
Support Request: 0
needs triage Feature request to make the base image registry configurable in rockcraft to bypass ECR rate limits. Untriaged, inactive for nearly two years, awaiting maintainer assessment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 25
Confidence: 80
Support Request: 10
needs triage Feature request to make the base image registry configurable in rockcraft to bypass ECR rate limits. Unlabeled, inactive for over a year with no maintainer response.

Update history

Date Change
updated

Related work

  • Related To: rockcraft#654 (confidence 90%)

    Related issue requesting configurable skopeo credentials for base-image pulls; functionally independent but addresses the same ECR rate-limit problem.

Related issues

No related issues found above the similarity threshold.