-
Notifications
You must be signed in to change notification settings - Fork 199
doc: add scenario doc for attaching files to a multi-platform image #1682
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1682 +/- ##
==========================================
+ Coverage 85.13% 85.20% +0.06%
==========================================
Files 129 129
Lines 5780 5780
==========================================
+ Hits 4921 4925 +4
+ Misses 613 609 -4
Partials 246 246 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I am hoping we can expand this scenario - Enable users to attach the same annotations to multiple manifests or index. For e.g.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice summary on the scenarios. They can be summarized as the following two types of scenarios:
- Propagation (cascading updates)
- Individual updates
@sajayantony How does |
Enabling oras to create some kind of temporary manifest that can be piped into commands was the idea.
For e.g. manifest data can be something like. artifactType: application/sbom+json
annotations:
key1:value1 The remaining information like subject and created time etc. can be filled by attach oras attach example.com/hello-world:latest --platform linux/amd64 --manifest-data $manifest sbom.json
oras attach example.com/hello-world:latest --platform arm/amd64 --manifest-data $manifest sbom.json
oras attach example.com/hello-world-nightly:latest --platform linux/amd64 --manifest-data $manifest sbom.json
oras attach example.com/hello-world-nightly:latest --platform arm/amd64 --manifest-data $manifest sbom.json Another option would be to enable annotation only but then I think enabling construction of these types is more generic. For example. oras index create can also take these data structure to compose using annotations and/or artifacts. |
@sajayantony What would be the expected result of these If so, is it equivalent to supplying artifactType="application/sbom+json"
annotation="key1=value1"
oras attach example.com/hello-world:latest --platform linux/amd64 --artifact-type $artifactType --annotation $annotation
oras attach example.com/hello-world:latest --platform arm/amd64 --artifact-type $artifactType --annotation $annotation
oras attach example.com/hello-world-nightly:latest --platform linux/amd64 --artifact-type $artifactType --annotation $annotation
oras attach example.com/hello-world-nightly:latest --platform arm/amd64 --artifact-type $artifactType --annotation $annotation |
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
Signed-off-by: Feynman Zhou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A proposal document introducing scenarios for attaching files (e.g., EoL annotations) to multi-platform images via the ORAS CLI.
- Adds a new markdown file outlining upward and downward annotation propagation scenarios.
- Describes example workflows for marking outdated platform-specific and multi-platform images.
- Illustrates current limitations and manual steps required with
oras attach
.
Comments suppressed due to low confidence (1)
docs/proposals/oras-attach-multi-platform.md:37
- There's a missing 'to' in 'she has execute'; it should read 'she has to execute multiple commands.'
Alice has to manually retrieve the new digests and run `oras attach` twice: once for the old digest of the parent image index and once for the platform-specific image. If multiple platform-specific images require updates, she has execute multiple commands.
Signed-off-by: Feynman Zhou <[email protected]>
Set environment variables: | ||
|
||
``` | ||
ARTIFACT_TYPE=application/vnd.demo.artifact.lifecycle | ||
ANNOTATION_KEY=vnd.demo.artifact.lifecycle.end-of-life.date | ||
ANNOTATION_VALUE=2025-03-20T01:20:30Z | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it might be a bit abrupt to set the environment variables here without using them immediately. Should we move this section downward to be closer to the oras attach
commands that utilize these variables?
|
||
Since the patched image has a new digest, the parent image index also receives an updated digest. When a platform-specific image is marked as EoL, dependent services stop using it, and vulnerability scanning tools can recognize it as deprecated through the lifecycle metadata. | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the diagram, it's not clear that which on is a1a1
and which one is b1b1
.
A new image index is created: | ||
|
||
```console | ||
demo/alpine:z1z1 (image index) | ||
-> demo/alpine:r1r1 (linux/amd64) | ||
-> demo/alpine:c1c1 (linux/arm64) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: So b1b1
now becomes r1r1
and a1a1
now becomes z1z1
? Does it mean that the image tags are updated after the images are patched? It might be strange as tags are usually reused while digests change.
Would it be better to use demo/alpine@sha256:a1a1
to represent the images?
|
||
#### Scenario B: attach a referrer to an index to downward propagate to all child images | ||
|
||
In addition, if a vulnerability is detected and affects images of all platforms, the parent index and each child image are patched, generating new digest of each. The outdated multi-platform image and each child image are marked as invalid using an EoL annotation similar as above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between scenario A and B? It looks like it's the same that some platform-specific images are vulnerable and the affected index needs to be patched as well? 🤔
Close this PR as the corresponding issue #1531 has been moved to ORAS v1.4.0. |
Why is this closed just because of scheduling? |
@TerryHowe This doc does not cover the end-to-end scenarios of attaching referrers to an image index and listing them. I plan to refactor this doc and target resolving two issues #1741 #1531 in my new proposal. cc @Wwwsylvia |
What this PR does / why we need it:
Add a scenario doc for attaching files to a multi-platform image. We need to discuss and align on the scenarios first.
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 #1531
Please check the following list: