Skip to content

MDEV-39806: Add a per-push/per-pull-request checker for Markdown API docs - #5153

Merged
gkodinov merged 1 commit into
MariaDB:mainfrom
gkodinov:generate-api-docs
Sep 1, 2026
Merged

MDEV-39806: Add a per-push/per-pull-request checker for Markdown API docs#5153
gkodinov merged 1 commit into
MariaDB:mainfrom
gkodinov:generate-api-docs

Conversation

@gkodinov

@gkodinov gkodinov commented Jun 1, 2026

Copy link
Copy Markdown
Member

Create a GitHub action into the MariaDB server tree to build the Markdown documentation using the cmake target provided by MDEV-39718.

This workflow generates API documentation for the plugin using a Docker container packed with all the extra doxygen/moxygen tools and the latest CMake dependencies.

@gkodinov gkodinov self-assigned this Jun 1, 2026
@gemini-code-assist

This comment was marked as low quality.

@gkodinov gkodinov added the MariaDB Foundation Pull requests created by MariaDB Foundation label Jun 1, 2026
@gkodinov
gkodinov force-pushed the generate-api-docs branch from c0b255a to 538d427 Compare June 2, 2026 10:03

@vuvova vuvova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I never created or maintained github actions so I cannot really review that.

Commands under run look ok (if I'm not going to nitpick)

Comment thread .github/workflows/generate-api-docs.yml
Comment thread .github/workflows/generate-api-docs.yml
Comment thread .github/workflows/generate-api-docs.yml Outdated

@RazvanLiviuVarzaru RazvanLiviuVarzaru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As I remember from our previous discussions,
the main idea was that in the server repository to only have a Pull Request check action, that will fail for any documentation errors. assuming that you configured the tool to fail the action when there's a legitimate error on docs.

Did I missed something in the meantime?

@vuvova vuvova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

agree with @RazvanLiviuVarzaru, my recollection also is that we agreed that cmake and other build prerequisites aren't required to generated documentation

@gkodinov

Copy link
Copy Markdown
Member Author

agree with @RazvanLiviuVarzaru, my recollection also is that we agreed that cmake and other build prerequisites aren't required to generated documentation

I was hoping to get #5112 merged first, but it seems like we'll be doing the two in parallel. OK. I've updated the PR with code that's based on the files in #5112.

@gkodinov

gkodinov commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Note that we will need to also update the moxygen version in mariadb-doc-gen: there are some fixes in it that are needed: https://github.com/sourcey/moxygen/releases/tag/v2.1.12

@gkodinov
gkodinov force-pushed the generate-api-docs branch 9 times, most recently from bec8321 to 6b67b71 Compare August 18, 2026 11:28

@RazvanLiviuVarzaru RazvanLiviuVarzaru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@gkodinov review submitted.
Please, if you do any updates,
1 minute after any push, go-to https://buildbot.mariadb.org/#/builders/1
and cancel your run. No need for bb ci to run tests for this patch.

Comment thread .github/workflows/generate-api-docs.yml
Comment thread .github/workflows/generate-api-docs.yml Outdated
Comment thread .github/workflows/generate-api-docs.yml
Comment thread .github/workflows/generate-api-docs.yml Outdated
Comment thread .github/workflows/generate-api-docs.yml Outdated
…docs

Create a GitHub action into the MariaDB server tree to build the Markdown
documentation using the cmake target provided by MDEV-39718.

This workflow generates API documentation for the plugin using a
Docker container packed with all the extra doxygen/moxygen tools.
Fixed some more doxygen problems.
Moved the repo to ghcr.io/mariadb/mariadb-doc-gen:latest.
@gkodinov

gkodinov commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

FWIW, this is how the docker image used is generated:

FROM node:26-bookworm-slim

LABEL org.opencontainers.image.source=https://github.com/MariaDB/server


ARG DEBIAN_FRONTEND=noninteractive
ARG MOXYGEN_PACKAGE=moxygen@2.1.19

RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    bison \
    build-essential \
    ca-certificates \
    cmake \
    doxygen \
    flex \
    gettext-base \
    git \
    graphviz \
    libaio-dev \
    libfmt-dev \
    liblz4-dev \
    liblzma-dev \
    libncurses-dev \
    libnuma-dev \
    libpcre2-dev \
    libreadline-dev \
    libsnappy-dev \
    libssl-dev \
    libsystemd-dev \
    ninja-build \
    perl \
    pkg-config \
    zlib1g-dev \
    libxml2-dev \
  && rm -rf /var/lib/apt/lists/*

RUN npm install --global "${MOXYGEN_PACKAGE}" \
  && npm cache clean --force

WORKDIR /work

ENTRYPOINT [ "bash", "-i" ]

Put the above in a Dockerfile in the current dir and then run command:

docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/mariadb/mariadb-doc-gen --push .

@gkodinov
gkodinov enabled auto-merge (rebase) September 1, 2026 11:30
@gkodinov
gkodinov merged commit 3e3f56d into MariaDB:main Sep 1, 2026
19 checks passed
@gkodinov
gkodinov deleted the generate-api-docs branch September 1, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

3 participants