Skip to content

docs: rework custom configuration docs with engine.json - #9022

Merged
jedevc merged 7 commits into
dagger:mainfrom
jedevc:custom-config-file-docs
Dec 4, 2024
Merged

jedevc merged 7 commits into
dagger:mainfrom
jedevc:custom-config-file-docs

Conversation

@jedevc

@jedevc jedevc commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

With #8800 about to merge, we can substantially improve our engine configuration docs.

All engine configuration for engine.json and engine.toml are moved into engine.mdx. This is no longer split up across multiple pages which are harder to navigate. As part of this:

  • custom-registry.mdx is removed and merged into this now.
  • The custom-runner.mdx page is reworked to only include information about starting an engine.
  • custom-ca.mdx and proxy.mdx are linked to from the bottom of engine.mdx - their configs cannot yet be configured via engine.json/engine.toml, but we link them here for improved navigation.

The cache policy can be manually configured by editing the `engine.toml` file in the engine
(which uses [BuildKit's syntax config](https://github.com/moby/buildkit/blob/v0.17.0/docs/buildkitd.toml.md?plain=1#L66-L82)).
See the [Custom Runner](./custom-runner.mdx) docs for more information.
The cache policy can be manually configured using the [engine config](./engine.mdx).

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 page (introduced in #8695) is still useful, but the actual configuration information is now all in engine.mdx. I think it makes sense to move this page somewhere else, but not entirely sure where, any suggestions @vikram-dagger?

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 would delete it and consolidate this information in the engine page. I have added suggestions to that page covering the content of this page.

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.

Hm, I'm not 100% sure about this.

I think having a separate caching page where we can talk about "how caching works" is important. Long term, I know we want to talk more about it (and it's probably going to get more complex), and we could even add information on how to optimize your pipelines for getting better cache results, with examples in different languages.

The dagger query examples to inspect cache and prune it are really useful, but I don't think they're related to configuration, and I wouldn't expect to find them under there.

WDYT about merging into https://docs.dagger.io/features/caching? Although, that section doesn't really have any code examples, so not sure about that. But it does feel like there's a lot of duplication between those.

@vikram-dagger vikram-dagger Nov 22, 2024 •

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 would not put it in the features page, mainly because these seem like "operational" commands and the features pages are more "big picture"/"concepts" (side note: I'm not very confident that "caching best practices" in the features caching page is correct either, at some point this will move out).

WDYT of adding an entry to the FAQ page with these commands? e.g. How do I inspect the Dagger cache? as a stopgap until we have a "proper" caching page?

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.

JFYI I also thought of including these commands in https://docs.dagger.io/api/cache-volumes, but I think this is probably wrong as that page is specific to cache volumes only, not the layer cache. However let me know if you have a different opinion @jedevc

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.

WDYT of adding an entry to the FAQ page with these commands? e.g. How do I inspect the Dagger cache? as a stopgap until we have a "proper" caching page?

I'm happy with that - we can add a redirect to there?

JFYI I also thought of including these commands in docs.dagger.io/api/cache-volumes, but I think this is probably wrong

Yeah, agreed - it's also that that page is relevant to the usage of cache volumes, while this is more about "operationally" using cache.

One other option would be to create a new API page on the core engine function, and the Engine type. Then, we could document the cache info there, as well as any other functionality we put under there. It's more specialized, and more geared towards operating a dagger engine.

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.

One other option would be to create a new API page on the core engine function, and the Engine type. Then, we could document the cache info there, as well as any other functionality we put under there. It's more specialized, and more geared towards operating a dagger engine

I like this idea more than the FAQ, because this is more scalable to future changes. I'll add an atomic commit with a skeleton of this page so we can iterate further (assuming that's OK, lmk if not).

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.

Yup, that sounds perfect, thanks!

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.

Added page

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.

LGTM, thanks!

@jedevc
jedevc force-pushed the custom-config-file-docs branch 3 times, most recently from 7b5a008 to 9e6def0 Compare November 21, 2024 17:21
@jedevc jedevc mentioned this pull request Nov 21, 2024
10 tasks done
@jedevc jedevc added area/documentation Improvements or additions to documentation area/engine About dagger core engine labels Nov 21, 2024
Comment thread docs/netlify.toml
from = "/configuration/custom-registry"
to = "/configuration/engine#configuring-custom-registries"
status = 301

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.

If deleting the caching page as suggested, we should add a redirect for that as well.

@jedevc
jedevc force-pushed the custom-config-file-docs branch from 7073e6a to 184cbbd Compare November 22, 2024 12:41
@jedevc

jedevc commented Nov 22, 2024

Copy link
Copy Markdown
Contributor Author

@vikram-dagger if it's easier, feel free to just directly make changes and push them to my branch as a separate commit!

@vikram-dagger

Copy link
Copy Markdown
Contributor

@vikram-dagger if it's easier, feel free to just directly make changes and push them to my branch as a separate commit!

Thanks, I might do that as it will be easier for minor copy/style fixes.

@vikram-dagger
vikram-dagger dismissed their stale review November 26, 2024 18:34

Previous review no longer relevant

However, even with these defaults, it may sometimes be necessary to modify various
settings.

TODO: update version when base PR is merged

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.

@jedevc this looks ready to merge except for this TODO - do you want to remove it or is there something else required 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.

Yeah, we need to merge #8800 first.

@vikram-dagger
vikram-dagger self-requested a review November 27, 2024 18:46

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

Approving in advance so this can be merged at will, after the pending TODO item is fixed.

@jedevc
jedevc force-pushed the custom-config-file-docs branch from 049558c to d50fee4 Compare November 28, 2024 16:45
@vikram-dagger vikram-dagger added this to the v0.15.0 milestone Dec 4, 2024
@jedevc
jedevc marked this pull request as ready for review December 4, 2024 14:42
@jedevc
jedevc requested a review from a team as a code owner December 4, 2024 14:42
jedevc and others added 6 commits December 4, 2024 14:42
Co-authored-by: vikram-dagger <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Vikram Vaswani <[email protected]>
Signed-off-by: Vikram Vaswani <[email protected]>
Signed-off-by: Vikram Vaswani <[email protected]>
@jedevc
jedevc force-pushed the custom-config-file-docs branch from d50fee4 to 25e36b1 Compare December 4, 2024 14:42
@jedevc
jedevc merged commit 0171227 into dagger:main Dec 4, 2024
@jedevc
jedevc deleted the custom-config-file-docs branch December 4, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Improvements or additions to documentation area/engine About dagger core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants