Skip to content

docs: Add a first draft of the Go SDK tech preview docs #3360 - #3406

Merged
shykes merged 1 commit into
dagger:mainfrom
vikram-dagger:3360-go-sdk-tech-preview-docs
Oct 18, 2022
Merged

shykes merged 1 commit into
dagger:mainfrom
vikram-dagger:3360-go-sdk-tech-preview-docs

Conversation

@vikram-dagger

@vikram-dagger vikram-dagger commented Oct 17, 2022 •

Copy link
Copy Markdown
Contributor

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]

Comment thread docs/v0.3/partials/_install-sdk-go.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/v0.3/partials/_install-sdk-go.md Outdated

@vikram-dagger vikram-dagger Oct 17, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gerhard gerhard Oct 17, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the URL for the landing page of the Go SDK tech preview docs. Please lmk if it needs to be changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. WDYT @shykes?

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have modified Solomon's original diagram slightly here. Please let me know if further changes are needed.

Comment thread docs/v0.3/sdk/go/xfgss-faq.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely one for @shykes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" ?

Comment thread docs/v0.3/sdk/go/xfgss-faq.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread website/docusaurus.config.js Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin is required when embedding partials into markdown.

@vikram-dagger

Copy link
Copy Markdown
Contributor Author

It's important to note that there are two places which link specifically to the version tag of the SDK:

  • the installation instructions
  • the sidebar link to the auto-generated package documentation

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

@mircubed

Copy link
Copy Markdown
Contributor

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

@vikram-dagger
vikram-dagger force-pushed the 3360-go-sdk-tech-preview-docs branch from a05cbcb to 2ae343d Compare October 17, 2022 16:07
@vikram-dagger

Copy link
Copy Markdown
Contributor Author

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

@mircubed if you have this information already, I can add it in my next revision.

@vikram-dagger

vikram-dagger commented Oct 17, 2022 •

Copy link
Copy Markdown
Contributor Author

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.

@mircubed

Copy link
Copy Markdown
Contributor

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

@mircubed if you have this information already, I can add it in my next revision.

Here you go:

Q - I am stuck. How can I get help?
A: Join us on Discord, and ask your question in our help forum. Our team will be happy to help you there!

@vikram-dagger
vikram-dagger force-pushed the 3360-go-sdk-tech-preview-docs branch from 9189468 to 6de049d Compare October 17, 2022 17:24
@vikram-dagger

Copy link
Copy Markdown
Contributor Author

Q - I am stuck. How can I get help? A: Join us on Discord, and ask your question in our help forum. Our team will be happy to help you there!

Added

@gerhard gerhard mentioned this pull request Oct 17, 2022
12 of 19 tasks
@shykes

shykes commented Oct 17, 2022 •

Copy link
Copy Markdown
Contributor

Thanks @vikram-dagger ! What's the best way to review them in rendered form? (nevermind I figured it out)

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
script["your Go application"] -. Dagger SDK ..-> engine["Dagger Engine"]
tool["your go tool"] -..-> goSDK["Dagger Go SDK"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few important details:

  1. 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)
  2. Make the diagram specifically about this SDK ("your go tool", "go SDK"...)
  3. 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
engine -..-> A1 & B1 & C1
goSDK -..-> A1 & B1 & C1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread docs/v0.3/partials/_install-sdk-go.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't want to version this page, should we consider removing the version-specific part?

In other words:

Suggested change
go get go.dagger.io/dagger@v0.3.0-alpha.1
go get go.dagger.io/dagger

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be ideal, but:

Please let me know if it's OK to drop the tag and I'll update accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wont work until we have a non-prerelease tag, right?

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Dagger SDK for Go
# Dagger Go SDK

Per discussion: let's give this a try if you agree.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done.

Comment thread website/sidebars.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label: "Dagger SDK for Go",
label: "Go SDK",

Short form, per discussion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Run the application by executing the command below.
1. Run the tool by executing the command below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The application displays the string `Hello`.
The tool displays the string `Hello`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 3: Run the application with Dagger
## Step 3: Run the tool with Dagger

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 3: Run the application with Dagger
## Step 3: add a pipeline to your tool

Not sure about the exact wording.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vikram-dagger
vikram-dagger force-pushed the 3360-go-sdk-tech-preview-docs branch from 6de049d to b1d07e5 Compare October 18, 2022 15:13
Comment thread docs/v0.3/partials/_install-sdk-go.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure of the minimum version needed. Please suggest corrections as needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread docs/v0.3/partials/_install-sdk-go.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be ideal, but:

Please let me know if it's OK to drop the tag and I'll update accordingly.

Comment thread docs/v0.3/sdk/go/fssrz-index.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done.

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See detailed comment on this change below

Comment thread docs/v0.3/sdk/go/8g34z-get-started.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 shykes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vikram-dagger !

  1. 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 :)

  2. 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!

@vikram-dagger
vikram-dagger force-pushed the 3360-go-sdk-tech-preview-docs branch 2 times, most recently from 64bc5c3 to ee554c4 Compare October 18, 2022 20:00
@vikram-dagger

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion @shykes !

2. 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.

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]>
@vikram-dagger
vikram-dagger force-pushed the 3360-go-sdk-tech-preview-docs branch from ee554c4 to 174ef05 Compare October 18, 2022 20:04

@shykes shykes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@shykes
shykes merged commit 25f4349 into dagger:main Oct 18, 2022
@gerhard

gerhard commented Oct 19, 2022 •

Copy link
Copy Markdown
Contributor

Were you expecting these changes to be published @shykes @vikram-dagger?

If not, then this behaves as expected:

image

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

@shykes

shykes commented Oct 19, 2022 via email

Copy link
Copy Markdown
Contributor

@vikram-dagger
vikram-dagger deleted the 3360-go-sdk-tech-preview-docs branch April 6, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go Getting Started Guide Installation page for Go SDK Introduction for Go SDK docs [EPIC] Go SDK Doc Launch Plan Create FAQ page

5 participants