docs: data-driven system-catalog reference, phase 1 (mz_active_peeks)#37659
Draft
antiguru wants to merge 6 commits into
Draft
docs: data-driven system-catalog reference, phase 1 (mz_active_peeks)#37659antiguru wants to merge 6 commits into
antiguru wants to merge 6 commits into
Conversation
Emit sqllogictest checks for a relation from its doc/user/data/<schema>.yml entry when a RELATION_SPEC marker carries FROM_YAML, so table docs can be rendered from data instead of hand-written markdown tables.
Swap the mz_active_peeks system-catalog section to the catalog-relation shortcode backed by doc/user/data/mz_introspection.yml, and regenerate the checked-in sqllogictest from the FROM_YAML lint mode.
Rendering the type cell as raw HTML bypassed the render-link markup hook, so absolute /sql/types URLs shipped without the baseURL /docs prefix and htmltest flagged them as missing targets. Render the type as a markdown link via RenderString instead, matching the meaning cell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The system-catalog reference pages carry many
RELATION_SPEC_UNDOCUMENTEDmarkers.Documenting them by hand means writing near-duplicate tables for every
_per_workerand_rawsibling.This starts moving the column tables into
doc/user/data, so a relation is defined once and its variants render from that single definition.Description
Phase 1 vertical slice on the
mz_active_peeksfamily, proving the pipeline end to end.Adds a
catalog-relationHugo shortcode, a per-schema YAML data entry (doc/user/data/mz_introspection.yml) whose entries carry base columns plus avariantslist, and aFROM_YAMLmarker mode inci/test/lint-docs-catalog.pythat emits the same catalog checks from the data instead of an inline table.The base-table check stays byte-identical to the old inline output; variant checks are name-sorted columns-and-types only (the per-worker
worker_idcolumn is not always last).Type links render through the markdown link hook so they pick up the baseURL prefix.
Phase 2 (migrating the remaining
mz_introspectionrelations) is stacked on this branch.Verification
ci/test/lint-docs-catalog.shreports no diff, the regeneratedtest/sqllogictest/autogenerated/mz_introspection.sltpasses, andhugo+htmltestare clean.