Repository navigation
feat(restore): select artifacts to restore with --include patterns - #2405
Merged
TerryHowe merged 2 commits intoNov 28, 2026
Merged
Conversation
Add a repeatable --include [<registry>/]<repository>[:<tag>] flag that selects the artifacts to restore by their source reference. '*' matches any sequence of characters within the repository or the tag. The repository part matches the stored <registry>/<repository> in full or without its registry, and only a repository part of '*' matches tag-only entries from earlier backups. Selection runs before mapping, so the collision check only considers selected artifacts. Patterns that match nothing fail before anything is pushed, with suggestions for stored repositories of the same name. The output reports how many tags are selected and which repositories are skipped. Fixes oras-project#2367 Signed-off-by: orion777-cmd <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2405 +/- ##
==========================================
+ Coverage 90.55% 90.62% +0.06%
==========================================
Files 158 163 +5
Lines 7483 8114 +631
==========================================
+ Hits 6776 7353 +577
- Misses 416 444 +28
- Partials 291 317 +26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TerryHowe
marked this pull request as ready for review
November 28, 2026 13:40
TerryHowe
requested review from
TerryHowe,
Wwwsylvia,
sabre1041,
sajayantony and
shizhMSFT
as code owners
November 28, 2026 13:40
TerryHowe
reviewed
Nov 28, 2026
…n --include pattern Signed-off-by: orion777-cmd <[email protected]>
This was referenced Nov 29, 2026
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:
Implements Mode 2 from #2358: a repeatable
--include [<registry>/]<repository>[:<tag>]flag selects the artifacts to restore by their source reference, following the pattern rules in #2367. The target argument is unchanged.--dry-run. Without--include, the output is unchanged.A few choices the issue left open, happy to change any of them:
--includeonly when--includeis used.Skipped N repository(ies) not selected by --include: .... Restored ones are shown by the existing per-tag lines.Opened as a draft while #2358 is still a draft.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #2367
Please check the following list: