Skip to content

Comments

ci: validate internal doc comments match markdown documentation#32074

Merged
petrosagg merged 8 commits intoMaterializeInc:mainfrom
petrosagg:ci-validate-doc-comments
Feb 19, 2026
Merged

ci: validate internal doc comments match markdown documentation#32074
petrosagg merged 8 commits intoMaterializeInc:mainfrom
petrosagg:ci-validate-doc-comments

Conversation

@petrosagg
Copy link
Contributor

Motivation

This is a follow up PR from my previous work that will ensure the field documentation we publish in our docs is also reflected as comments in the product. Having it as a CI step will ensure the two will stay in sync.

Tips for reviewer

The last commit is pure code gen and is marked as such

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@petrosagg petrosagg requested review from a team as code owners April 2, 2025 13:33
@petrosagg petrosagg requested a review from ParkMyCar April 2, 2025 13:33
@petrosagg petrosagg force-pushed the ci-validate-doc-comments branch from 6bce7f8 to 683da24 Compare April 2, 2025 14:02
Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! Left a comment inline.

print(" ".join([str(position), field, type_name]))
documentation = documentation.replace(" ", "␠")
print(" ".join([field, type_name, documentation]))
position += 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't need position anymore?

Copy link
Contributor

@kay-kim kay-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

field = FIELD_NAME_RE.search(fields[0]).group(1)
type_name = FIELD_TYPE_RE.search(fields[1]).group(1)
documentation = DOC_LINK_TYPE1_RE.sub(r"\1", fields[2])
documentation = DOC_LINK_TYPE2_RE.sub(r"\1", documentation)
Copy link
Contributor

@def- def- Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is documentation being assigned twice? Edit: I guess it makes sense, just doing two substitutions. I would have just nested them.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
@petrosagg petrosagg force-pushed the ci-validate-doc-comments branch from 683da24 to f8b62ba Compare February 19, 2026 10:03
@petrosagg petrosagg enabled auto-merge (squash) February 19, 2026 11:24
@petrosagg petrosagg merged commit 09b8710 into MaterializeInc:main Feb 19, 2026
138 checks passed
@petrosagg petrosagg deleted the ci-validate-doc-comments branch February 19, 2026 11:46
patrickwwbutler pushed a commit to patrickwwbutler/materialize that referenced this pull request Feb 19, 2026
…rializeInc#32074)

<!--
Describe the contents of the PR briefly but completely.

If you write detailed commit messages, it is acceptable to copy/paste
them
here, or write "see commit messages for details." If there is only one
commit
in the PR, GitHub will have already added its commit message above.
-->

### Motivation

This is a follow up PR from my previous work that will ensure the field
documentation we publish in our docs is also reflected as comments in
the product. Having it as a CI step will ensure the two will stay in
sync.



<!--
Which of the following best describes the motivation behind this PR?

  * This PR fixes a recognized bug.

    [Ensure issue is linked somewhere.]

  * This PR adds a known-desirable feature.

    [Ensure issue is linked somewhere.]

  * This PR fixes a previously unreported bug.

    [Describe the bug in detail, as if you were filing a bug report.]

  * This PR adds a feature that has not yet been specified.

[Write a brief specification for the feature, including justification
for its inclusion in Materialize, as if you were writing the original
     feature specification.]

   * This PR refactors existing code.

[Describe what was wrong with the existing code, if it is not obvious.]
-->

### Tips for reviewer
The last commit is pure code gen and is marked as such
<!--
Leave some tips for your reviewer, like:

    * The diff is much smaller if viewed with whitespace hidden.
    * [Some function/module/file] deserves extra attention.
* [Some function/module/file] is pure code movement and only needs a
skim.

Delete this section if no tips.
-->

### Checklist

- [ ] This PR has adequate test coverage / QA involvement has been duly
considered. ([trigger-ci for additional test/nightly
runs](https://trigger-ci.dev.materialize.com/))
- [ ] This PR has an associated up-to-date [design
doc](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/README.md),
is a design doc
([template](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/design/00000000_template.md)),
or is sufficiently small to not require a design.
  <!-- Reference the design in the description. -->
- [ ] If this PR evolves [an existing `$T ⇔ Proto$T`
mapping](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/command-and-response-binary-encoding.md)
(possibly in a backwards-incompatible way), then it is tagged with a
`T-proto` label.
- [ ] If this PR will require changes to cloud orchestration or tests,
there is a companion cloud PR to account for those changes that is
tagged with the release-blocker label
([example](MaterializeInc/cloud#5021)).
<!-- Ask in #team-cloud on Slack if you need help preparing the cloud
PR. -->
- [ ] If this PR includes major [user-facing behavior
changes](https://github.com/MaterializeInc/materialize/blob/main/doc/developer/guide-changes.md#what-changes-require-a-release-note),
I have pinged the relevant PM to schedule a changelog post.

---------

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
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.

5 participants