Repository navigation
docs: Add a first draft of the Go SDK tech preview docs #3360 - #3406
Conversation
There was a problem hiding this comment.
This is implemented as a partial so it can be reused. Maybe we can add it to our release process so this always reflects the latest tag.
There was a problem hiding this comment.
I think once we get to GA (or whenever the Go SDK gets a stable release), we can remove the version specifier since the latest tag will be automatically pulled
https://go.dev/doc/modules/release-workflow#pre-release
There was a problem hiding this comment.
I'm not sure if this is part of the installation steps or not. I had difficulty running the tutorial steps without it. TBD /cc @kpenfound
There was a problem hiding this comment.
This will be while we are in the preview stage. The number following alpha will definitely change. cc @shykes @mircubed @aluzzardi
FWIW https://github.com/dagger/dagger/blob/main/website/plugins/docusaurus-plugin-dagger-version/index.js . This will be more useful:
❯ curl https://dl.dagger.io/dagger/versions/0.3
0.3.0-alpha.1
There was a problem hiding this comment.
This is the URL for the landing page of the Go SDK tech preview docs. Please lmk if it needs to be changed.
There was a problem hiding this comment.
I have modified Solomon's original diagram slightly here. Please let me know if further changes are needed.
There was a problem hiding this comment.
Please review these questions and answers and let me know if we need to add or update them.
Note that this FAQ is presented at the root level in the navigation tree and not under the "Dagger SDK for Go" node because the questions we have to date seem to be more about Dagger 0.3 than specifically about the Go SDK.
There was a problem hiding this comment.
We have previously agreed that this would be called "Go SDK for Dagger". However the convention seems to be "PRODUCT SDK for Go" rather than the other way around. Therefore I have changed it accordingly. Please let me know if you prefer the original version.
There was a problem hiding this comment.
Good question...
-
No matter what, when the context is unambiguously Dagger-specific, we should use the short form "Go SDK". For example in our navbar.
-
I'm not sure what the correct long form is. But Stripe has a Stripe iOS SDK mentions, maybe we could have a "Dagger Go SDK" ?
There was a problem hiding this comment.
I've kept mention of GraphQL to a minimum, and only in this FAQ. Please let me know if we need to make this more visible.
There was a problem hiding this comment.
This plugin is required when embedding partials into markdown.
|
It's important to note that there are two places which link specifically to the version tag of the SDK:
We may want to consider adjusting these to be more generic (in the case of the link at least) or including a step in our SDK release process to update these tags |
|
Note to self - we should add a Q&A about where they should go to ask for help or support. I'll add it once this PR gets merged |
a05cbcb to
2ae343d
Compare
@mircubed if you have this information already, I can add it in my next revision. |
|
I believe the linter failure is not justified in this case. There is no code block on line 124. The linter appears to be incorrectly identifying the second level of list nesting (4 spaces) as a code block (also usually 4 spaces). This error has occurred in other PRs as well. If others agree, we should consider disabling linter rule MD046. |
Here you go: Q - I am stuck. How can I get help? |
9189468 to
6de049d
Compare
Added |
|
Thanks @vikram-dagger ! |
There was a problem hiding this comment.
| script["your Go application"] -. Dagger SDK ..-> engine["Dagger Engine"] | |
| tool["your go tool"] -..-> goSDK["Dagger Go SDK"] |
There was a problem hiding this comment.
A few important details:
- Let's use "tool" instead of "application", will be less confusing in context (there is probably a Go application nearby, but we don't touch it)
- Make the diagram specifically about this SDK ("your go tool", "go SDK"...)
- In this first launch, the engine will not yet be released as a standalone component, therefore we are keeping it out of the spotlight for now. Better to have a simplified diagram that matches the simplified story, and gradually add detail as we launch more pieces.
There was a problem hiding this comment.
| engine -..-> A1 & B1 & C1 | |
| goSDK -..-> A1 & B1 & C1 |
There was a problem hiding this comment.
Since we don't want to version this page, should we consider removing the version-specific part?
In other words:
| go get go.dagger.io/dagger@v0.3.0-alpha.1 | |
| go get go.dagger.io/dagger |
There was a problem hiding this comment.
This would be ideal, but:
- My understanding from @kpenfound 's README at https://github.com/kpenfound/dagger-demos/tree/main/go/getting-started#add-dagger was that the tag is necessary, at least for the alpha.
- An alternative approach is the one suggested by@gerhard above which uses our custom dagger-version plugin.
Please let me know if it's OK to drop the tag and I'll update accordingly.
There was a problem hiding this comment.
This wont work until we have a non-prerelease tag, right?
There was a problem hiding this comment.
| # Dagger SDK for Go | |
| # Dagger Go SDK |
Per discussion: let's give this a try if you agree.
There was a problem hiding this comment.
Agreed, done.
There was a problem hiding this comment.
| label: "Dagger SDK for Go", | |
| label: "Go SDK", |
Short form, per discussion
There was a problem hiding this comment.
| 1. Run the application by executing the command below. | |
| 1. Run the tool by executing the command below. |
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
| The application displays the string `Hello`. | |
| The tool displays the string `Hello`. |
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
| ## Step 3: Run the application with Dagger | |
| ## Step 3: Run the tool with Dagger |
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
| ## Step 3: Run the application with Dagger | |
| ## Step 3: add a pipeline to your tool |
Not sure about the exact wording.
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
At this point I am pretty confused. My earlier corrections about "tool" vs "application" assumed this guide is helping write my first tool. With perhaps a sample app involved (something to build, test or deploy).
But it appears that both tool and application are mixed together in this guide?
If that's the case, I think we should avoid this. It's confusing to the end user because it doesn't set expectation for the real world, where tool and application will definitely be separate.
Sorry if I missed something here.
There was a problem hiding this comment.
The original idea was to support users who are starting "from scratch" ie. without a ready-made Go application. Step 1 walked the user through creating a sample Go application, and subsequent steps used this application in the Go CI/CD "tool". Step 1 included a note to skip it if the reader already had a Go application in hand.
To avoid creating the confusion you mention, I've restructured the content as follows:
- moved the "create sample application" step out of the main tutorial flow into an appendix
- included an explicit requirement that the reader should have a Go application with tests, and pointed to the appendix to create one if this is not the case
- included an additional note before Step 1 explaining this requirement further
- restructured the steps so they focus only on the tool and not the application
- used the wording "Go tool" and "Go CI/CD tool" to distinguish it from the "Go application" being built
Please review once again and let me know if this makes it clearer.
6de049d to
b1d07e5
Compare
There was a problem hiding this comment.
I wasn't sure of the minimum version needed. Please suggest corrections as needed.
There was a problem hiding this comment.
This would be ideal, but:
- My understanding from @kpenfound 's README at https://github.com/kpenfound/dagger-demos/tree/main/go/getting-started#add-dagger was that the tag is necessary, at least for the alpha.
- An alternative approach is the one suggested by@gerhard above which uses our custom dagger-version plugin.
Please let me know if it's OK to drop the tag and I'll update accordingly.
There was a problem hiding this comment.
Agreed, done.
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
See detailed comment on this change below
There was a problem hiding this comment.
The original idea was to support users who are starting "from scratch" ie. without a ready-made Go application. Step 1 walked the user through creating a sample Go application, and subsequent steps used this application in the Go CI/CD "tool". Step 1 included a note to skip it if the reader already had a Go application in hand.
To avoid creating the confusion you mention, I've restructured the content as follows:
- moved the "create sample application" step out of the main tutorial flow into an appendix
- included an explicit requirement that the reader should have a Go application with tests, and pointed to the appendix to create one if this is not the case
- included an additional note before Step 1 explaining this requirement further
- restructured the steps so they focus only on the tool and not the application
- used the wording "Go tool" and "Go CI/CD tool" to distinguish it from the "Go application" being built
Please review once again and let me know if this makes it clearer.
shykes
left a comment
There was a problem hiding this comment.
Thanks @vikram-dagger !
-
On the getting started: let's leave as-is, @kpenfound is working on updating his code, he has some ideas to improve it. Let's keep your last version for now and wait for his update - then resume review and discussions :)
-
Can you remove the changes affecting the current docs from this PR, so we can merge it as-is, and continue iterating on top? For example I will start editing the intro text to match my messaging work, etç.
TLDR: if you can make it such that merging this PR doesn't affect the current docs in any way (plus the CI checks pass) then we should merge ASAP and continue iterating in follow-up PRs.
Thanks!
64bc5c3 to
ee554c4
Compare
|
Thanks for the suggestion @shykes !
The only change to the current 0.2 docs was the addition of a callout box in the 0.2 index page pointing to the Go SDK docs. I have reverted this change. I noticed also that the CI check is passing now. |
These docs are added in the v0.3 directory. After this change, the docs will contain: - Introduction for Go SDK docs dagger#3361 - Installation instructions dagger#3362 - Get started guide dagger#3363 - FAQ dagger#3177 - Link to auto-generated SDK reference docs dagger#3364 Closes dagger#3360 Closes dagger#3361 Closes dagger#3362 Closes dagger#3363 Closes dagger#3177 Closes dagger#3364 Signed-off-by: Vikram Vaswani <[email protected]>
ee554c4 to
174ef05
Compare
|
Were you expecting these changes to be published @shykes @vikram-dagger? If not, then this behaves as expected: My understanding was that we auto-publish as we are slowly taking the new 0.3 docs live, but are not making them widely public just yet. cc @mircubed |

These docs are added in the v0.3 directory.
After this change, the docs will contain:
Closes #3360
Closes #3361
Closes #3362
Closes #3363
Closes #3177
Closes #3364
Signed-off-by: Vikram Vaswani [email protected]