Repository navigation
Conversation
Signed-off-by: Erik Sipsma <[email protected]>
👷 Deploy request for cloak-docs accepted.
|
TomChv
left a comment
There was a problem hiding this comment.
This FAQ is well redacted and answered to important points of Dagger Cloak.
I left 2 small comments but this is a very useful piece of documentation 🚀
| 1. Calling an API should not feel very different than just calling functions in the language you choose to use. The conversion of those function calls to language-agnostic API calls should be fully hidden behind the Dagger SDK. | ||
| - We support this through code-generated SDKs, which implement typed interfaces to extension APIs. | ||
|
|
||
| ## FAQ |
There was a problem hiding this comment.
I do not know if that's accurate but that may help to add a section to explain how you can (will) connect Dagger 2.0 to Dagger 3.0.
If I understand well, Cue can just be another supported language, I think it's interesting to talk about that.
| - This freedom leaves both caller and callee to choose whichever language fits their particular job the best without having to think about interoperability. | ||
| - Rather than reimplementing the same automation in every possible programming language, it only needs to be implemented once and s then re-usable by all. | ||
| - Strengths of different languages thus enhance each other rather than creating silos. | ||
| - If Python has the world's greatest library for accomplishing X, an extension author should feel free to import+use it; they will be making that functionality available for anyone else in Go, Typescript, Bash and any other Dagger-supported language along the way. |
There was a problem hiding this comment.
Does that mean you can call the library outside Dagger container?
For instance directly call kubectl Go SDK or AWS Python SDK instead of CLI?
There was a problem hiding this comment.
Yes, you can see some example that do some work on the host directly with some Go package, and my Go extension was called. It was itself doing some Go code directly.
But it could have been called by a python code loading some env with pure python code and sending that to the Go extension.
There was a problem hiding this comment.
Go code calling the extension: https://github.com/dagger/cloak/pull/191/files#diff-a0005cdb0414f59fb56c24e008b5abdbc5167b1ff6d0683fd078fe020da0e81dR46
The extension called: https://github.com/dagger/cloak/pull/191/files#diff-de000dd72fc1ae924965a9ca3cc9eddf762864de4f3c78dab61ad7a62f8e4248R20
But they could be different languages altogether.
Also, it is an old code. Much has changed since.
There was a problem hiding this comment.
That's impressive :O
But then how do you manage os compatibilities? If you execute operations on host, there's no buildkit nor qemu involved so how will it be managed? Imagine a Go extension that only work on Armv8 for some reason, what will happens on Windows?
There was a problem hiding this comment.
It's a chance than in general Go is pretty portable :p But yeah, it could be an issue.
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
|
@vikram-dagger is this something that would be useful to reopen & merge? |
Signed-off-by: Erik Sipsma [email protected]
There are a few questions that come up from external users a lot around "why cloak", "why graphql", etc.
This is my first rough pass at trying to capture the main design goals of cloak specifically and why graphql ended up being a good fit for the API framework.
Please feel free to be brutally honest if something doesn't make sense, is too vague, is too wordy, is missing entirely, etc. These sort of high-level why questions are a bit tricky to get right, especially when my head has been buried in all of it for a while and I'm now trying to introduce it all to someone potentially for the first time.
Related: #3014
Also related: many discord questions, questions during demos, etc.