Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #1

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7dd0378
feat: add option to skip referrers GC (#515)
qweeah May 31, 2023
b4400e1
build(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0 (#524)
dependabot[bot] Jun 25, 2023
2e7b65f
fix(oci): create blobs dir and define blobs dir name constant (#520)
sparr Jun 25, 2023
6b5bd4b
fix: improve errors for `ReadAll` and `loadIndexfile` (#526)
sparr Jun 27, 2023
4763cd4
refactor: upgrade go mod to `image-spec v1.1.0-rc4` and fix the missi…
Wwwsylvia Jul 3, 2023
babfc51
chore: enable workflows for release branches (#537)
Wwwsylvia Jul 4, 2023
f0a9c59
feat: support Image Index with a subject (#548)
Wwwsylvia Jul 12, 2023
9b52269
feat: add a PackOption to support packing image manifests that confor…
Wwwsylvia Jul 21, 2023
2c23ef6
feat: update Referrers API for distribution-spec v1.1.0-rc3 (#553)
Wwwsylvia Jul 25, 2023
79d7081
feat: update the implementation of pushing manifest for distribution-…
Wwwsylvia Jul 26, 2023
6ec43e7
feat: update the implementation of deleting manifest for distribution…
Wwwsylvia Jul 27, 2023
3a2e0c1
docs: update links (#563)
Wwwsylvia Aug 2, 2023
b59a33e
feat: report warnings (#560)
Wwwsylvia Aug 2, 2023
d5cefe9
docs: add e2e examples for oras-go (#561)
wangxiaoxuan273 Aug 4, 2023
933ae41
docs: display larger example (#564)
wangxiaoxuan273 Aug 7, 2023
bbe92af
fix: pack should not set `artifactType` when config is specified (#565)
Wwwsylvia Aug 7, 2023
ea07bf6
build(deps): bump apache/skywalking-eyes from 0.4.0 to 0.5.0 (#569)
dependabot[bot] Aug 21, 2023
e6d40b6
refactor: add `PackManifest` and deprecate `Pack` (#570)
Wwwsylvia Aug 22, 2023
60da91b
refactor: refactor unexported pack methods (#573)
Wwwsylvia Aug 24, 2023
47d028a
feat: validate input media type for `oras.PackManifest ` (#574)
Wwwsylvia Aug 24, 2023
0582b77
Add SECURITY.md file (#579)
Aug 29, 2023
92eb05c
build(deps): bump actions/checkout from 3 to 4 (#585)
dependabot[bot] Sep 5, 2023
4a52cfd
build: bump go version (#587)
Wwwsylvia Sep 5, 2023
c130949
feat: merge package `credentials` back from `oras-credentials-go` (#589)
Wwwsylvia Sep 8, 2023
577bffe
fix: push an empty index when deleting the last referrer with SkipRef…
Wwwsylvia Sep 12, 2023
9f83e67
feat: Add 'MemoryStore' (#602)
uanid Sep 20, 2023
cb8c8bc
refactor: make credentials.NewMemoryStore return an interface (#605)
Wwwsylvia Sep 25, 2023
e5cabfa
fix: Avoid a copy of sync.Mutex in Repository (#603)
ktarplee Sep 26, 2023
2d371a0
fix: correctly handle OnCopySkipped (#609)
Wwwsylvia Sep 26, 2023
a428ca6
feat: support per-host scope hints (#604)
Wwwsylvia Sep 27, 2023
6456d16
feat: support deletion for memory resolver (#607)
wangxiaoxuan273 Oct 2, 2023
7eef77e
feat: support deletion for OCI storage (#608)
wangxiaoxuan273 Oct 7, 2023
6dfbe52
build(deps): bump golang.org/x/sync from 0.3.0 to 0.4.0 (#611)
dependabot[bot] Oct 8, 2023
86176e8
build: bump `github.com/opencontainers/image-spec` to `v1.1.0-rc5` (#…
Wwwsylvia Oct 12, 2023
e8e4f84
fix: package `credentials` to support legacy auth keys in docker conf…
Wwwsylvia Oct 15, 2023
459a246
feat: support deletion for memory graph (#606)
wangxiaoxuan273 Oct 16, 2023
0f1dc30
perf: reduce auth request count for manifest delete (#618)
Wwwsylvia Oct 18, 2023
bdea1ff
fix: error handling when delete non-existent target (#627)
wangxiaoxuan273 Oct 25, 2023
062ed0e
chore: add reference details to errors (#628)
sajayantony Oct 26, 2023
e52a0b8
feat: minimal change to support cross-repo blob mounting (#631)
ktarplee Nov 3, 2023
9febd7b
build(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0 (#637)
dependabot[bot] Nov 7, 2023
548c41d
test code cov
qweeah Dec 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ coverage:
status:
project:
default:
target: 70%
target: 80%
if_ci_failed: error
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,24 @@ name: build

on:
push:
branches: main
branches:
- main
- release-*
pull_request:
branches: main
branches:
- main
- release-*

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.19', '1.20']
go-version: ['1.20', '1.21']
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }} environment
uses: actions/setup-go@v4
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ name: CodeQL

on:
push:
branches: main
branches:
- main
- release-*
pull_request:
branches: main
branches:
- main
- release-*
schedule:
- cron: '34 13 * * 3'

Expand All @@ -31,11 +35,11 @@ jobs:
security-events: write
strategy:
matrix:
go-version: ['1.19', '1.20']
go-version: ['1.20', '1.21']
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }} environment
uses: actions/setup-go@v4
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ name: License Checker

on:
push:
branches: main
branches:
- main
- release-*
pull_request:
branches: main
branches:
- main
- release-*

permissions:
contents: write
Expand All @@ -28,13 +32,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check license header
uses: apache/skywalking-eyes/header@v0.4.0
uses: apache/skywalking-eyes/header@v0.5.0
with:
mode: check
config: .github/licenserc.yml
- name: Check dependencies license
uses: apache/skywalking-eyes/dependency@v0.4.0
uses: apache/skywalking-eyes/dependency@v0.5.0
with:
config: .github/licenserc.yml
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ The ORAS Go library follows [Semantic Versioning](https://semver.org/), where br

The version `2` is actively developed in the [`main`](https://github.com/oras-project/oras-go/tree/main) branch with all new features.

> [!Note]
> The `main` branch follows [Go's Security Policy](https://github.com/golang/go/security/policy) and supports the two latest versions of Go (currently `1.20` and `1.21`).

Examples for common use cases can be found below:

- [Copy examples](https://pkg.go.dev/oras.land/oras-go/v2#pkg-examples)
Expand Down
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

Please follow the [security policy](https://oras.land/docs/community/reporting_security_concerns) to report a security vulnerability or concern.
5 changes: 2 additions & 3 deletions content.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"oras.land/oras-go/v2/internal/docker"
"oras.land/oras-go/v2/internal/interfaces"
"oras.land/oras-go/v2/internal/platform"
"oras.land/oras-go/v2/internal/registryutil"
"oras.land/oras-go/v2/internal/syncutil"
"oras.land/oras-go/v2/registry"
"oras.land/oras-go/v2/registry/remote/auth"
Expand Down Expand Up @@ -91,7 +90,7 @@ func TagN(ctx context.Context, target Target, srcReference string, dstReferences
if err != nil {
return ocispec.Descriptor{}, err
}
ctx = registryutil.WithScopeHint(ctx, ref, auth.ActionPull, auth.ActionPush)
ctx = auth.AppendRepositoryScope(ctx, ref, auth.ActionPull, auth.ActionPush)
}

desc, contentBytes, err := FetchBytes(ctx, target, srcReference, FetchBytesOptions{
Expand Down Expand Up @@ -149,7 +148,7 @@ func Tag(ctx context.Context, target Target, src, dst string) (ocispec.Descripto
if err != nil {
return ocispec.Descriptor{}, err
}
ctx = registryutil.WithScopeHint(ctx, ref, auth.ActionPull, auth.ActionPush)
ctx = auth.AppendRepositoryScope(ctx, ref, auth.ActionPull, auth.ActionPush)
}
desc, rc, err := refFetcher.FetchReference(ctx, src)
if err != nil {
Expand Down
19 changes: 17 additions & 2 deletions content/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,33 @@ func Successors(ctx context.Context, fetcher Fetcher, node ocispec.Descriptor) (
}
nodes = append(nodes, manifest.Config)
return append(nodes, manifest.Layers...), nil
case docker.MediaTypeManifestList, ocispec.MediaTypeImageIndex:
case docker.MediaTypeManifestList:
content, err := FetchAll(ctx, fetcher, node)
if err != nil {
return nil, err
}

// docker manifest list and oci index are equivalent for successors.
// OCI manifest index schema can be used to marshal docker manifest list
var index ocispec.Index
if err := json.Unmarshal(content, &index); err != nil {
return nil, err
}
return index.Manifests, nil
case ocispec.MediaTypeImageIndex:
content, err := FetchAll(ctx, fetcher, node)
if err != nil {
return nil, err
}

var index ocispec.Index
if err := json.Unmarshal(content, &index); err != nil {
return nil, err
}
var nodes []ocispec.Descriptor
if index.Subject != nil {
nodes = append(nodes, *index.Subject)
}
return append(nodes, index.Manifests...), nil
case spec.MediaTypeArtifactManifest:
content, err := FetchAll(ctx, fetcher, node)
if err != nil {
Expand Down
Loading
Loading