← Back to issue list

Build cache invalidation misses direct URL dependency change

View original Github issue

Metadata

Project
charmcraft
Number
#2218
Type
issue
State
open
Author
dimaqq
Labels
—
Created
Updated
Closed
—

Current evaluation

Direct URL dependency changes in requirements.txt don't invalidate build cache; charm built with stale rc2 instead of rc3. No maintainer response or labels.

Suggested action: needs triage

Reason: No labels, comments, or maintainer assessment exist. The issue has a clear reproducer and environment details, but the root cause is unconfirmed; current charm_builder._calculate_dependencies_hash reads full requirement file text, so the reported package-name-only caching may already be addressed, yet no resolving commit is cited.

Evaluated by: mr-cal-bot

Impact: 50 Quick Win: 16 Complexity: 55 Confidence: 45 Actionability: 70

Issue body

### Bug Description When `requirements.txt` contains entries like: `ops[tracing] @ https://github.com/dimaqq/operator/archive/refs/tags/2.20.0-rc3.zip` It seems that the build cached based on the package name `ops[tracing]` and not the URL. ### To Reproduce - `ops[tracing] @ https://github.com/dimaqq/operator/archive/refs/tags/2.20.0-rc2.zip` in `requirements.txt` - build the charm - bump the RC from 2 to 3: - `ops[tracing] @ https://github.com/dimaqq/operator/archive/refs/tags/2.20.0-rc3.zip` in `requirements.txt` - build the charm The charm is built with `-rc2` content instead of `-rc3`. ### Environment charmcraft 3.4.3.post54+g462296b4 LXD Ubuntu 24.04 ### charmcraft.yaml ```yaml --- name: hexanator type: charm title: Charmed Gubernator summary: High-performance, distributed rate-limiting service description: This is a charm for Gubernator, a high-performance, distributed rate-limiting service. # charmcraft 3.0 base: ubuntu@24.04 build-base: ubuntu@24.04 platforms: amd64: arm64: # Work-around from https://discourse.charmhub.io/t/charmcraft-3-0-in-the-beta-channel/13469/5?u=dimaqq parts: charm: plugin: charm source: . build-packages: - rustc - cargo containers: gubernator: resource: gubernator resources: gubernator: type: oci-image description: Gubernator Rock with Pebble upstream-source: docker.io/gubernator-io/gubernator:3.0.0 links: source: https://github.com/gubernator-io/gubernator provides: rate-limit: interface: http description: tells the consumer application how to call gubernator requires: ingress: interface: ingress limit: 1 description: tells the load balancer how to call gubernator charm-tracing: interface: tracing limit: 1 optional: true send-ca-cert: interface: certificate_transfer limit: 1 optional: true charm-libs: - lib: traefik_k8s.ingress version: '2' ``` ### Relevant log output ```shell nothing special ```

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest
Impact: 50
Quick Win: 16
Complexity: 55
Confidence: 45
Actionability: 70
needs triage Direct URL dependency changes in requirements.txt don't invalidate build cache; charm built with stale rc2 instead of rc3. No maintainer response or labels.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 48
Complexity: 15
Confidence: 85
Actionability: 80
keep open Build cache misses direct URL dependency changes due to pip's internal package cache serving stale versions when package name stays the same but URL changes
qwen/qwen3.8-27b
Impact: 50
Quick Win: 20
Staleness: 75
Complexity: 60
Confidence: 70
Support Request: 10
needs triage Charmcraft build cache invalidation misses direct URL dependency changes in requirements.txt, causing stale packages to be used. Unlabelled, no maintainer response, inactive for over a year.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 55
Confidence: 80
Support Request: 5
needs triage Build cache invalidation fails when direct URL dependencies in requirements.txt change, causing stale packages to be used. Unlabelled, no maintainer response, inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 50
Confidence: 85
Support Request: 10
close stale Charmcraft build cache ignores direct URL changes in requirements.txt, reusing stale packages. Reported for v3.4.3 with clear reproduction steps, but remains untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Build cache incorrectly ignores direct URL changes in requirements.txt, causing outdated dependencies to be used. Untriaged with no maintainer comments after 480 days.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.