Skip to content

docs: data-driven system-catalog reference, phase 2 (migrate mz_introspection) - #184

Draft
antiguru wants to merge 5 commits into
catalog-docs-data-phase1from
catalog-docs-data-phase2
Draft

antiguru wants to merge 5 commits into
catalog-docs-data-phase1from
catalog-docs-data-phase2

Conversation

@antiguru

Copy link
Copy Markdown
Owner

Motivation

Phase 2 of the system-catalog docs data migration.
Stacked on phase 1 (base branch catalog-docs-data-phase1); retarget to main once phase 1 lands.

Description

Moves the 25 remaining comment-checked mz_introspection relations from inline markdown tables into doc/user/data/mz_introspection.yml, driven by a reusable converter (ci/test/migrate-docs-catalog.py).
This is a pure relocation: the generated test/sqllogictest/autogenerated/mz_introspection.slt is unchanged, which proves every base-table catalog check stays byte-identical.
Column meanings are kept verbatim to match the catalog comments (reference-style shortcut links stay literal in meanings, resolved only in descriptions).
mz_cluster_prometheus_metrics (a NO_COMMENTS source) stays inline pending a no-comments path; _per_worker/_raw siblings stay as RELATION_SPEC_UNDOCUMENTED markers pending phases 3 and 4.

Verification

ci/test/lint-docs-catalog.sh reports zero diff (the pure-move proof), bin/sqllogictest passes on the regenerated file, and hugo + link checks are clean. The converter has unit tests (ci/test/test_migrate_docs_catalog.py).

antiguru added 5 commits July 15, 2026 04:57
Merges converter output into existing YAML data files by relation
name, preserving hand-authored entries (e.g. mz_active_peeks) that
are skipped by the converter itself.
…erter

Resolving a bare reference-style shortcut (e.g. `[dataflow]`) in a
column's `meaning` text turns it into a fully-formed inline link,
which lint-docs-catalog.py's comment-text stripper then strips down
to bare text. An unresolved shortcut is left bracketed instead, and
that bracketed form is what the live SQL comment literally contains,
so resolving it broke the pure-move invariant for mz_introspection's
migration. Relation-level descriptions aren't checked against SQL
comments, so they keep resolving shortcuts as before.
Runs the catalog-docs converter over mz_introspection.md, moving all
25 remaining documented relations into doc/user/data/mz_introspection.yml
and doc/user/data/catalog_types.yml, and rewriting their inline tables
into catalog-relation shortcode calls. mz_active_peeks (already a data
entry) and mz_cluster_prometheus_metrics (NO_COMMENTS) are untouched.

Verified as a pure move: ci/test/lint-docs-catalog.sh produces zero
diff against the checked-in .slt files, so the generated SQL-comment
checks are byte-identical to before the migration.
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.

1 participant