Skip to content

Auto-publish PyDABs reference docs to gh-pages on release - #6729

Open
Sankalp-Mittal wants to merge 7 commits into
sankalp-mittal/automate-pydabs-docsfrom
sankalp-mittal/pydabs-docs-gitworkflow
Open

Sankalp-Mittal wants to merge 7 commits into
sankalp-mittal/automate-pydabs-docsfrom
sankalp-mittal/pydabs-docs-gitworkflow

Conversation

@Sankalp-Mittal

@Sankalp-Mittal Sankalp-Mittal commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Stack

Changes

Two related pieces of the PyDABs docs pipeline:

1. Auto-publish the docs to gh-pages on release. A new update-pydabs-docs GitHub Actions workflow rebuilds the PyDABs Python reference docs and publishes the HTML to the gh-pages branch on every release tag (and on demand via workflow_dispatch), replacing the manual copy that had left https://databricks.github.io/cli/python/ stale (5 pages vs. the 32 the build now emits). Modeled on update-schema-docs.yml:

  • Trigger: push tags v[0-9]+.[0-9]+.[0-9]+* + workflow_dispatch.
  • Permissions: contents: write, id-token: write (setup-jfrog GOPROXY exchange).
  • Checkout main, set up JFrog / Go / uv, then git worktree add origin/gh-pages.
  • Build with go tool -modfile=tools/task/go.mod task pydabs-docs.
  • Refresh only the gh-pages python/ directory wholesale from python/docs/_output/, so a dropped resource loses its page; top-level .nojekyll, index.html, and experimental/ are untouched.
  • Commit as github-actions[bot] and push directly to gh-pages, no-op when there is no diff.

2. Make the docs build strict (-W). Add -W to the pydabs-docs sphinx-build command so warnings — e.g. malformed upstream descriptions or unresolved cross-references introduced by an SDK bump — fail the build instead of passing silently. This makes both the existing python_docs CI job (every PR, including SDK bumps) and the new publish workflow strict, surfacing docs breakage at bump time. Fixes the one pre-existing warning this exposes: the Resources docstring referenced add_job with :meth:, but add_job is a generated method Sphinx cannot resolve — changed to an inline literal.

Stacked on top of #6727, so the strict build already includes its generated pages and the override for malformed upstream descriptions.

Tests

From repo root, ./task pydabs-codegen then ./task pydabs-docs both exit 0 under -W (the add_job fix + #6727's override clear the only warnings). YAML validated locally.

This pull request and its description were written by Isaac.

Add an update-pydabs-docs workflow that rebuilds the PyDABs Python
reference docs and publishes the HTML to the gh-pages branch on each
release tag (and via workflow_dispatch), replacing the manual copy.
Modeled on update-schema-docs.yml: same runner group, JFrog/Go/uv
setup, and gh-pages worktree + github-actions[bot] commit + direct
push pattern.

Co-authored-by: Isaac <no-reply@databricks.com>
@Sankalp-Mittal
Sankalp-Mittal added this pull request to stack #6730 September 17, 2026 10:08
@Sankalp-Mittal Sankalp-Mittal changed the title sankalp mittal/pydabs docs gitworkflow Auto-publish PyDABs reference docs to gh-pages on release Sep 17, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 4db1247

Run: 35596482270

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 15 5:42
✅​ aws windows 278 13 4:05
✅​ azure linux 275 15 5:46
✅​ azure windows 277 13 4:22
✅​ gcp linux 276 15 5:28
✅​ gcp windows 278 13 4:07
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:58 azure linux TestAccept
3:58 aws linux TestAccept
3:54 gcp linux TestAccept
3:43 azure windows TestAccept
2:28 aws windows TestAccept
2:05 gcp windows TestAccept

@Sankalp-Mittal
Sankalp-Mittal marked this pull request as ready for review September 17, 2026 10:43
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @janniklasrose -- recent work in .github/workflows/
  • @pietern -- recent work in .github/workflows/, python/
  • @denik -- recent work in .github/workflows/, python/

Eligible reviewers: @andrewnester, @anton-107, @lennartkats-db, @rclarey, @renaudhartert-db, @rugpanov, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

Sankalp-Mittal and others added 2 commits September 17, 2026 15:11
…ocs' into sankalp-mittal/pydabs-docs-gitworkflow
Add -W to the pydabs-docs sphinx-build command so warnings (e.g.
malformed upstream descriptions or unresolved cross-references
introduced by an SDK bump) fail the build instead of passing
silently. This makes both the existing python_docs CI job and the
new gh-pages publish workflow strict, surfacing docs breakage at
bump time.

Fix the one pre-existing warning this exposes: the Resources
docstring referenced add_job with :meth:, but add_job is a generated
method Sphinx cannot resolve. Use an inline literal instead.

Co-authored-by: Isaac <no-reply@databricks.com>
Refer to the generated per-resource adders as ``add_<resource>`` rather
than singling out add_job, which was only an example among add_cluster,
add_app, etc.

Co-authored-by: Isaac <no-reply@databricks.com>
Comment thread .github/workflows/update-pydabs-docs.yml Outdated
- name: Setup JFrog
uses: ./.github/actions/setup-jfrog

- name: Setup Go

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.

do we need go here? you can just call uv and then we also don't need jfrog

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can run uv here but then this would be a secondary source of truth for the flags, the first one being in the Taskfile, over time I think that could cause divergence

Comment thread .github/workflows/update-pydabs-docs.yml Outdated
Comment thread python/Taskfile.yml
- docs/_output/**
cmds:
- "uv run --python 3.12 sphinx-build docs docs/_output --show-traceback --nitpicky --fresh-env --keep-going"
- "uv run --python 3.12 sphinx-build docs docs/_output --show-traceback --nitpicky --fresh-env --keep-going -W"

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 think this will fail .github/workflows/python_push.yml on PRs and main (which is a good signal to gain) - could you please double check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since this PR is based on the PR in which I updated the docs, so this passes on CI here

Comment on lines +9 to +12
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"

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.

what if this workflow fails, will it be retried? How will we know docs aren't updated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it won't be autoretried (can be done manually), if the docs aren't updated (push to gh-docs fails) this should fail, and if the docs itself on main are not updated (shouldn't happen as check on each PR) then the stale content is published. But this shouldn't happen as all PR merged would have to check for the updated docs

Comment thread .github/workflows/update-pydabs-docs.yml Outdated
Sankalp-Mittal and others added 3 commits September 21, 2026 10:59
Align with the release-* workflow family that runs post-release, and
update the internal name: to match.

Co-authored-by: Isaac <no-reply@databricks.com>
PyDABs doc generation is a lightweight Sphinx build, so the -large
protected runner is overkill. Drop to the standard protected runner
(matching tagging.yml, which is also tag-triggered and pushes to the
repo).

Co-authored-by: Isaac <no-reply@databricks.com>
Full history is not needed: the build reads only the current main tree,
and the release-tag lookup uses tag refs (fetch-tags), not file content
at historical tags. Full history was inherited from update-schema-docs,
whose since_version.go reads `git show <tag>:...` per release.

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
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.

3 participants