Repository navigation
fix: expose mount only for capable tracked targets - #2283
Merged
TerryHowe merged 1 commit intoOct 24, 2026
Merged
Conversation
Signed-off-by: Emre K <[email protected]>
kocaemre
requested review from
TerryHowe,
Wwwsylvia,
sabre1041,
sajayantony and
shizhMSFT
as code owners
October 23, 2026 22:39
4 tasks
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (71.42%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2283 +/- ##
==========================================
- Coverage 60.81% 60.78% -0.03%
==========================================
Files 140 140
Lines 6091 6092 +1
==========================================
- Hits 3704 3703 -1
- Misses 2166 2167 +1
- Partials 221 222 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What this PR does / why we need it:
NewTargetnow exposesregistry.Mounteronly when its underlying graph target supports mounting. Previously every tracked target advertised it; a mount attempt against a tracked OCI layout would panic on the unchecked assertion. Preserve the existingReferencePushercapability independently of mounting. This is separate from the in-progress oras-go v3 migration (#2002), which also touches these files.Which issue(s) this PR fixes:
Fixes #2278
Please check the following list:
TestNewTarget_mountCapabilityMatchesUnderlyingTargetcovers memory, OCI layout, remote, reference-only, and reference+mounter targets.Verification (Go 1.26.7 Docker):
go test -p 4 ./cmd/oras/internal/display/status/track -run '^TestNewTarget_mountCapabilityMatchesUnderlyingTarget$' -count=1 -v→ memory target reportedregistry.Mounter supported = true, want false(1 failing subtest); remote passed.go test -p 4 ./cmd/oras/internal/display/status/... -count=1→ 5 packages pass.go test -p 4 ./... -count=1→ all reported packages pass.go vet -p 4 ./...andgit diff --check HEAD~1..HEAD→ pass.AI assistance was used to prepare the change and tests; the verification commands above were run in Docker.