Skip to content

refactor(vdev): migrate component example generation - #26007

Draft
pront wants to merge 1 commit into
masterfrom
pront/vdev-component-example-generation
Draft

refactor(vdev): migrate component example generation#26007
pront wants to merge 1 commit into
masterfrom
pront/vdev-component-example-generation

Conversation

@pront

@pront pront commented Aug 3, 2026

Copy link
Copy Markdown
Member

Motivation

Component documentation generation is currently split across vdev schema resolution, scripts/cue.sh, and a JavaScript example generator that passes data through website/data/docs.json. This makes the developer workflow harder to own, reuse, and optimize as one pipeline.

This follow-up consolidates the pipeline in vdev while preserving the already-merged example artifacts as a strict compatibility boundary.

Summary

  • Move CUE docs-model generation from scripts/cue.sh build into cargo vdev build docs-json.
  • Route make cue-build through the native vdev command.
  • Avoid re-running CUE/example generation during check-generated-docs; its validator now consumes the artifacts the check already generated.
  • Reuse component schema-resolution code where it preserves the final CUE model’s behavior.
  • Keep website/generated/example-configs/ byte-for-byte unchanged throughout the refactor; those files are the parity fixtures.
  • Measure and remove duplicate schema, CUE, and example-generation work only after confirming the current command graph.

The JavaScript component-example generator is intentionally unchanged in this first slice. It still
consumes the final CUE model, so this change establishes the native vdev boundary without altering
the generated examples or website output.

Developer impact

Contributors can now build the CUE docs model through vdev, using deterministic source discovery and
an explicit output path. The end state gives contributors one Rust developer tool for component-doc
and example generation, rather than coordinating shell and JavaScript entry points. It should also
eliminate website/data/docs.json as an internal generator-to-generator hand-off, while continuing
to produce it when Hugo needs it.

Vector configuration

Not applicable.

How did you test this PR?

  • make check-markdown
  • make check-clippy
  • Compared cargo vdev build docs-json --output /tmp/vdev-component-docs.json byte-for-byte with scripts/cue.sh build output.
  • Regenerated component examples through make -C website config-examples; website/generated/example-configs/ remained unchanged.
  • make check-generated-docs (250 examples validated; 4 trace-only examples skipped; committed YAML fixtures unchanged).

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

@cose-datadog

cose-datadog Bot commented Aug 3, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7105763 | Docs | Datadog PR Page | Give us feedback!

@pront
pront force-pushed the pront/vdev-component-example-generation branch from eefa8aa to ea49a2b Compare August 3, 2026 19:01
@github-actions github-actions Bot added the domain: vdev Anything related to the vdev tooling label Aug 3, 2026
@pront
pront force-pushed the pront/vdev-component-example-generation branch from ea49a2b to c5f7aac Compare August 3, 2026 19:06
@pront pront added no-changelog Changes in this PR do not need user-facing explanations in the release changelog and removed domain: vdev Anything related to the vdev tooling labels Aug 3, 2026
@pront
pront force-pushed the pront/vdev-component-example-generation branch from c5f7aac to 0c746c0 Compare August 3, 2026 19:45
@github-actions github-actions Bot added domain: ci Anything related to Vector's CI environment domain: vdev Anything related to the vdev tooling labels Aug 3, 2026
@pront
pront force-pushed the pront/vdev-component-example-generation branch from 0c746c0 to d1d7927 Compare August 3, 2026 20:25
@pront
pront force-pushed the pront/vdev-component-example-generation branch from d1d7927 to 7105763 Compare August 3, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: ci Anything related to Vector's CI environment domain: vdev Anything related to the vdev tooling no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant