-
Notifications
You must be signed in to change notification settings - Fork 54
[discuss] duffle.json vs bundle.json #609
Comments
A bundle.json is the input file for the build system ( |
IIRC there was a discussion in an earlier thread to consolidate the two, though I can’t seem to find that right now. |
As @bacongobbler pointed out, To specifically address your comment on matching the schema for the In an ideal world, any user working with a bundle should be shielded from knowing anything about the CNAB schema (unless they really want / need to. We also don't want users to hand-craft or edit bundle files, as it invalidates a signature), and interact with some high level tooling that understands the CNAB schema - and as of writing this comment, Docker App is adding support for outputting bundles, and there is another declarative tool for building bundles, Porter. While both of these are in early stage, they show how separate tools can implement the spec to output bundles, each of them with their specific way defining input data for building the bundle. That being said, we understand the confusion generated by having a |
Thanks for the comments @bacongobbler and @radu-matei. Got the point that duffle can build multiple invocation images from a single build. De-coupling the CNAB spec from the user does make sense, however although not exactly the same, duffle.json is quite similar to bundle.json. If its possible to provide the user with a rich experience of creating bundle using the duffle tool, where user does not need to go and re-edit duffle.json by hand, that would improve the user experience and completely hide the spec details from the user in my opinion. |
If we're talking about the process of authoring bundles using Duffle, would snippets and helper commands in the Duffle VS Code extension help? Another idea I've been giving a little thought would be helper commands in Duffle itself - something along the lines of:
Would a combination of these make the experience better? Thanks! |
also i think a bundle.json is required for |
"A bundle.json is the input file for the build system (duffle build) that will build a CNAB’s bundle.json." <- is that a typo @bacongobbler ? |
Yes, sorry. I meant duffle.json |
I think the critical item here is the point that only Duffle uses a duffle.json file, correct? The spec can note that while CNAB-compliant tools require only a bundle.json file, tools may have other files for their own use. Here, we can note the opposite in docs. :-) |
okay, yeah that makes sense. I guess as long as we note it in big letters, since duffle looks like the defacto tool , it should be enough to disambiguate that way . Thanks @bacongobbler and @squillace for all your help on this ! BTW my related issue is solved, so its clear to me now... |
I think this deserves some clarification in the CNAB spec and in the duffle docs before we close. I'll see about that. |
Thanks @squillace. Including that duffle tool uses on duffle.json while CNAB spec requires bundle.json seems the correct clarification in this regard, which should go to the docs. |
@jayunit100 yes, a |
Considering how similar It seems like having the small amount of extra config in a separate file would be less confusing than copying literally the entire |
Porter uses its config file to abstract away from how CNAB works under the hood. However, having duffle use bundle.json directly makes sense since it is the reference implementation. Unless we are going to take a very different direction with duffle's UX, abstracting isn't really the right thing to be doing. Working directly with the bundle.json is less confusing than editing the duffle.json and also having the bundle.json as an output to deal with too. It improves people's understanding of the CNAB spec and also prevents us from papering over problems with the format in the duffle.json file format. 😀 |
Currently, issuing a
duffle create <name>
will create a duffle.json, which has several differences between the bundle.json in the original CNAB specification. One such difference I noted isinvocationImages
element is an object with an abstraction for cnab type in the duffle.json, as shown below:while in the bundle.json its an array of invocation images:
What is the rationale behind this difference/having an abstraction? I would have thought since duffle is an implementation of the CNAB spec, it can directly output a bundle identifier which exactly matches bundle.json defined in the CNAB spec.
The text was updated successfully, but these errors were encountered: