Repository navigation
fix(outdated): key the per-run ref listing on host type and provider (#4560) - #4622
Merged
Daniel Meppiel (danielmeppiel) merged 3 commits intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
Daniel Meppiel (danielmeppiel) merged 3 commits into
Conversation
…4560) The apm outdated ls-remote cache key now includes the manifest host_type and the provider the host resolves to (classify_host_provider: kind and credential purpose), so two dependencies on the same host and path with a different provider never share a cached listing and each runs its own provider and credential resolution. The cache stays per-run and token-free. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 13:05
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The cache duplicates the canonical provider-identity projection, risking divergence from future identity changes, and needs delegation plus regression and static-guard coverage.
1 open issue
What changed in this PR
Fixes #4560 by separating apm outdated ref-cache entries for dependencies with different host types or resolved providers, while preserving per-run deduplication for identical dependencies.
Changes:
- Adds host type and resolved provider identity to the token-free cache key.
- Adds regression tests for provider isolation and identical-dependency reuse.
- Documents the user-visible fix in the changelog.
| File | Description |
|---|---|
tests/unit/deps/test_outdated_ref_cache.py |
Tests separate provider listings and continued deduplication. |
src/apm_cli/deps/outdated_ref_cache.py |
Extends cache identity and handles unclassifiable providers. |
CHANGELOG.md |
Records the corrected ref-listing isolation. |
Review effort: Balanced
apm-spec-waiver: apm outdated cache-key correctness only; no OpenAPM-observable behaviour change Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-p1-4560-outdated-cache-key
branch
from
November 21, 2026 13:11
6a6c47b to
e35dd0e
Compare
…4560) Delegate the cache key's provider identity to core/host_providers.effective_host_provider_identity (keeping the ValueError fallback), register the cache as a consumer of the host-credential-resolution owner and extend its static guard. apm-spec-waiver: apm outdated cache-key correctness only; no OpenAPM-observable behaviour change Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-p1-4560-outdated-cache-key
branch
November 21, 2026 15:50
Merged
3 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Cache-key correctness for
apm outdated. The per-rungit ls-remotededup insrc/apm_cli/deps/outdated_ref_cache.pykeyed listings on host, repo URL, port, insecure flag and ref family only. Its key (_identity_key) now also includes the manifesthost_typeand the provider the host resolves to throughclassify_host_provider(provider kind and credential purpose). Two dependencies on the same host and path with a different provider therefore never share a cached listing, and each runs its own provider and credential resolution. Identical dependencies still share one listing. The cache stays per-run and token-free; the module docstring states the full key. An unclassifiable host/type pair keeps its own bucket so the wrapped downloader reports its error exactly as without the cache.Issue and approved scope
Issue: Fixes #4560
Human scope-approval comment: #4560 (comment)
Does this PR complete the issue, or what remains? Completes it. Install-path ref reuse (
install/helpers/ref_reuse) was not changed (out of scope).Dependency order: none (independent of open PRs).
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
tests/unit/deps/test_outdated_ref_cache.py::test_same_host_and_path_with_another_provider_gets_its_own_listing: same host and path,host_typeunset vsgitlab: different keys, the wrapped downloader is called once for each, and each gets its own listing. Fails on main (1 failed).test_identical_typed_deps_still_share_one_listing: dedup control, one call for two identical typed deps.pytest -q tests/unit/deps/test_outdated_ref_cache.py-> all passed (existing outdated cache tests green).uvx [email protected] check/format,scripts/lint_architecture_boundaries.py --root ., complexity ratchet vs main,tests.quality.taxonomy --changed,scripts/check_test_assertions.py-> clean.Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
apm-spec-waiver: apm outdated cache-key correctness only; no OpenAPM-observable behaviour change