Skip to content

Add cookbook examples on error handling - #5538

Merged
helderco merged 5 commits into
dagger:mainfrom
helderco:helder/docs-18-error-handling-cookbook
Aug 3, 2023
Merged

helderco merged 5 commits into
dagger:mainfrom
helderco:helder/docs-18-error-handling-cookbook

Conversation

@helderco

@helderco helderco commented Aug 1, 2023 •

Copy link
Copy Markdown
Contributor

This change adds a few examples on error handling to the cookbook.

Original intent was a full guide, but I need to get this out there:

PREVIEW: https://deploy-preview-5538--devel-docs-dagger-io.netlify.app/7442989/cookbook#error-handling

@helderco
helderco requested a review from vikram-dagger August 1, 2023 17:53
@helderco
helderco force-pushed the helder/docs-18-error-handling-cookbook branch from 1173073 to 2df5f68 Compare August 1, 2023 18:19

@vikram-dagger vikram-dagger 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.

Note that cookbook recipes should be available in all languages, could you please add the Go and Node.js equivalents as well?

Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like this cookbook! It's really useful 🚀

@helderco

helderco commented Aug 2, 2023

Copy link
Copy Markdown
Contributor Author

Note that cookbook recipes should be available in all languages, could you please add the Go and Node.js equivalents as well?

I know, there's a TODO for it in the description above and that's why this is in draft. I wanted to give the opportunity for someone to review the code before porting it to the other languages while I'm working on fixing the Python reference (#4703). When that's done I'll come back to finish this and the post.

@vikram-dagger

Copy link
Copy Markdown
Contributor

I know, there's a TODO for it in the description above and that's why this is in draft. I wanted to give the opportunity for someone to review the code before porting it to the other languages while I'm working on fixing the Python reference (#4703). When that's done I'll come back to finish this and the post.

+1

Comment thread docs/current/742989-cookbook.md Resolved
@helderco
helderco force-pushed the helder/docs-18-error-handling-cookbook branch from 2df5f68 to 0a368fb Compare August 2, 2023 22:45
@helderco

helderco commented Aug 2, 2023 •

Copy link
Copy Markdown
Contributor Author

To reviewers:

Just a reminder that this was initially intended as a guide but rushed it into a cookbook to get some of it out there. I know this needs to be improved. The exit code example could be split into at least 4 more use cases but I don't have time to flush that out now.

I still have to port the example to Python and Node.js. After doing that, I suggest we merge this, and proceed to improve on the examples (split, clarify) right after. The reason is because this example is needed as part of showing a better way to manage errors without the removed exit code field.

So we need this published for the release (https://github.com/dagger/dagger/milestone/18).

@vikram-dagger vikram-dagger 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.

LGTM, see minor suggestions. If time permits please add additional explanatory comments to the snippets for aborting and exit-code

Comment thread docs/current/742989-cookbook.md Resolved
Comment thread docs/current/742989-cookbook.md Resolved
@helderco
helderco force-pushed the helder/docs-18-error-handling-cookbook branch from 936c80b to a0ca05a Compare August 3, 2023 13:00
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
@helderco
helderco force-pushed the helder/docs-18-error-handling-cookbook branch from 7ea81be to 519c47c Compare August 3, 2023 15:08
@helderco
helderco marked this pull request as ready for review August 3, 2023 15:08
@helderco
helderco merged commit dfd0e90 into dagger:main Aug 3, 2023
@helderco
helderco deleted the helder/docs-18-error-handling-cookbook branch August 3, 2023 15:20
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.

3 participants