-
Notifications
You must be signed in to change notification settings - Fork 563
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
Pushcontainer image ref #338
Conversation
Signed-off-by: Sam Alba <sam.alba@gmail.com>
Signed-off-by: Sam Alba <sam.alba@gmail.com>
I think there’s a typo in your example? I’m assuming the first two lines should actually be:
Is that right? |
@aluzzardi wdyt? |
Yes correct, I made a typo. The example in the PR is correct. I updated my comment. |
Overall, I think this fixes the immediate issue. However I think it's a bit limiting, due to how The drawbacks are:
But you can workaround all those problems by using small pipelines and |
I think we can remove all those drawbacks by supporting a field Example:
And this can be added later without breaking the existing code. I would use this. |
Yep. Make sense. Also, food for thoughts: If we're adding a e.g.
|
Since @aluzzardi proposal with the annotation would not change the use of |
I’m OK with merging it but just a heads up I would like to take @aluzzardi ‘s proposal even further, which will break configurations based on this PR. If you would rather not break configurations post merge, then we should wait a little longer before merging... |
Question @samalba: in your example, is |
Yes, for this example, just exported the digest is supposed to give the same full-ref. I usually prefer to take the full-ref from buildkit instead, in case the URL the full image url would change during the push (not supposed to). |
Here’s what I think we can do once
Example:
Benefits:
|
I agree with the benefits, but I see some downsides:
|
I didn’t understand this one sorry.
I think once we have some usage data, we can add sugar, for example: Example 1: export json-typed scalar without jq. This actually would work out of the box.
Example 2: optionally specify an export key in exec.
|
This is a proposal that fixes #303
The change allows certain ops to export meta data to the image fs, under
/dagger/
. We could reuse the same mechanism forfetch-git
to write things like/dagger/commit
or/dagger/remote
, etc...I was initially not ok to alter the pushed image, but after testing it, I think it's fine as the pushed image does not contain the meta-data. It's only available within the
#up
pipeline.Also, I like the fact that it does not break the current
op.#Export
api which I like (IMHO).I've also updated the jamstack example to try it in a real use case: