Auto-generate config docs from code

Open
#4,274 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #4292 by @lookharm — closed without merging

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start by comparing cmd/buildkitd/config/config.go with docs/buildkitd.toml.md, then review PRs 4273 and 3773 to understand the documented drift. Define how doc-comments and types should produce the relevant configuration documentation; done means the generated output covers the config fields and prevents the two sources from diverging.

Written by the indexing model from the issue text.

Description

exp/beginner help wanted kind/docs

The definition for the buildkit.toml format lives in https://github.com/moby/buildkit/blob/0f6482e34cec2d25c4397b812e442e1c8eea06d0/cmd/buildkitd/config/config.go

The fields are all documented in https://github.com/moby/buildkit/blob/0f6482e34cec2d25c4397b812e442e1c8eea06d0/docs/buildkitd.toml.md.

However, these can be out-of-date, which means sometimes we get drift - see https://github.com/moby/buildkit/pull/4273, which should have been updated as part of https://github.com/moby/buildkit/pull/3773, but got missed.

Ideally, we should auto-generate part of the buildkit docs using the code, by extracting doc-comments, and analyzing the types.

(cc @dvdksn)

Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from moby/buildkit

All issues in moby/buildkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.