Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

duffle push should add invocation image digest to bundle.json if it doesn't exist #690

Open
michelleN opened this issue Apr 1, 2019 · 6 comments · May be fixed by #691
Open

duffle push should add invocation image digest to bundle.json if it doesn't exist #690

michelleN opened this issue Apr 1, 2019 · 6 comments · May be fixed by #691
Assignees
Labels

Comments

@michelleN
Copy link
Contributor

michelleN commented Apr 1, 2019

No description provided.

@michelleN michelleN self-assigned this Apr 1, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 1, 2019
@michelleN michelleN linked a pull request Apr 1, 2019 that will close this issue
@ghost ghost added the review label Apr 1, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 1, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 1, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 4, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 5, 2019
michelleN pushed a commit to michelleN/duffle that referenced this issue Apr 5, 2019
@jeremyrickard
Copy link
Member

I think that we should instead implement this as part of duffle push

@jeremyrickard jeremyrickard changed the title duffle build should add a digest to invocation image duffle push should push invocation add invocation image digest to bundle.json if it doesn't exist Aug 12, 2019
@jeremyrickard
Copy link
Member

jeremyrickard commented Aug 12, 2019

Per a conversation with @radu-matei in #cnab

1.) When we duffle push a bundle that hasn't been pushed, we should first:

  • Push the invocation image
  • Obtain the digest
  • Modify the bundle.json to have the digest correctly (and update the reference to be a digested reference)
  • Push the bundle

2.) When we duffle push a bundle to another registry, we should

  • Not update the bundle.json digest references
  • Push the invocation image to the new registry
  • Generate a relocation file
  • Push the bundle

@glyn
Copy link
Contributor

glyn commented Aug 13, 2019

I don't think it is necessary to generate a relocation mapping file when we duffle push a bundle to another registry. According to a cnab-to-oci issue, the relocation mapping file can be generated as needed from the registry.

(Also, I'm a little confused because I don't see duffle push at master. Is there a pre-req to this issue? Presumably duffle push isn't a 1.0 feature because it depends on the stilll-to-be-written CNAB registries spec.)

@glyn glyn changed the title duffle push should push invocation add invocation image digest to bundle.json if it doesn't exist duffle push should add invocation image digest to bundle.json if it doesn't exist Aug 13, 2019
@jeremyrickard
Copy link
Member

@glyn yes, duffle push is not in master. @radu-matei has been working on a version of it in another PR #681 and I wanted to capture this. The original issue was quite old, so I wanted to update it with discussion from slack.

@glyn
Copy link
Contributor

glyn commented Aug 13, 2019

We should also keep in mind cases where the bundle is never pushed, for example:

  1. Build a bundle
  2. docker push the invocation image
  3. Export the bundle as a thick bundle

Exporting the bundle will effectively "freeze" the invocation image and therefore its content digest. But the bundle may still have an undigested reference to the invocation image and could therefore end up executing a different image.

@radu-matei
Copy link
Member

Circling back on the point of generating a relocation map as part of the push process I think I agree with @glyn - we can generate the relocation map based on the information in the OCI registry - stored bundle.json and the OCI index.

#828 deals with the workflow build -> export.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants