Skip to content

ci: add workflow to check correct API reference generation#10843

Merged
anakin87 merged 5 commits intomainfrom
check-api-ref
Mar 17, 2026
Merged

ci: add workflow to check correct API reference generation#10843
anakin87 merged 5 commits intomainfrom
check-api-ref

Conversation

@anakin87
Copy link
Copy Markdown
Member

@anakin87 anakin87 commented Mar 16, 2026

Related Issues

We'd like auto-generated PRs for API reference updates to be automatically approved.

Ideally, we'd like to avoid broken Docusaurus builds (in case of failure, the website won't be updated in any case).

Since checking Vercel deployment success from a PR seems very hard to do (I tried some time ago), I am bringing into Haystack a mechanism introduced some time ago in core integrations and experimental: try generating the API reference when it changes in the PR and do a lightweight check with docusaurus-mdx-checker.

(deepset-ai/haystack-core-integrations#2829; deepset-ai/haystack-experimental#437)

Proposed Changes:

  • introduce a workflow that looks for changed pydoc configs or Haystack python files, builds the API references and runs docusaurus-mdx-checker on it
    • use the docstrings_checksum script to avoid building the API reference when docstring don't change

How did you test it?

Temporarily triggered the workflow on this PR (by changing configs or docstrings): https://github.com/deepset-ai/haystack/actions/runs/23156953275/job/67274135243
Works correctly

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment Mar 17, 2026 9:48am

Request Review

@github-actions github-actions Bot added the type:documentation Improvements on the docs label Mar 16, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 16, 2026

Pull Request Test Coverage Report for Build 23188105850

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.908%

Totals Coverage Status
Change from base Build 23188036496: 0.0%
Covered Lines: 15813
Relevant Lines: 17020

💛 - Coveralls

@anakin87 anakin87 marked this pull request as ready for review March 16, 2026 17:43
@anakin87 anakin87 requested a review from a team as a code owner March 16, 2026 17:43
@anakin87 anakin87 requested review from davidsbatista and removed request for a team March 16, 2026 17:43
@anakin87 anakin87 self-assigned this Mar 16, 2026
Copy link
Copy Markdown
Contributor

@davidsbatista davidsbatista left a comment

Choose a reason for hiding this comment

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

LGTM

@anakin87 anakin87 merged commit 5534c72 into main Mar 17, 2026
21 checks passed
@anakin87 anakin87 deleted the check-api-ref branch March 17, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:CI type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants