← 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

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.

Suggested action: needs triage

Reason: The issue has no labels, no assignee, and no maintainer response in 763 days. The code at rockcraft/oci.py:46 still hardcodes REGISTRY_URL = ECR_URL with no configurable alternative, confirming the feature was never implemented. The author's comment references issue #654 as related-in-cause but functionally independent, and no maintainer has acknowledged or prioritized either.

Impact: 45 Quick Win: 24.75 Staleness: 85 Complexity: 45 Confidence: 80 Support Request: 20

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.8-27b
Impact: 45
Quick Win: 24.75
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 75
Support Request: 0
close stale Extend rockcraft.oci.Image to accept a configurable registry URL for skopeo copy, bypassing ECR rate limits and enabling local mirrors. Open, unassigned, and stale after 686 days. Needs triage and implementation.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/rockcraft#654 (confidence 85%)

    Author explicitly states this issue is 'related in cause' to #654 (configurable skopeo credentials for base image pulls) but functionally independent. Both address ECR rate-limit failures during base image pulls.

Related issues

Issue Project State Summary Similarity
#184 Cache retrieved base during build rockcraft open Feature request to cache the fetched base image during rockcraft pack to avoid Docker Hub pull rate limits. Maintainers discussed caching strategies in Feb 2023; project has since moved to ECR registry and added an image service, but no explicit base-image caching was implemented.
73%
#654 Allow for configurable `skopeo` credentials during pulling of the ROCK base image. rockcraft open Feature request to add configurable skopeo credentials (via --src-creds) when pulling the ROCK base image from ECR, to work around registry rate limits. Open 763 days, no maintainer response, no labels; related issue #655 (configurable registry) also open and untriaged.
70%