Skip to content

ci: run docs versioning commands through uv run#928

Merged
vdusek merged 1 commit into
masterfrom
fix/version-docs-uv-run
Jun 3, 2026
Merged

ci: run docs versioning commands through uv run#928
vdusek merged 1 commit into
masterfrom
fix/version-docs-uv-run

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Jun 3, 2026

Summary

The Version docs job has failed on both the 3.4.0 and 3.4.1 releases, which also skipped the dependent Doc release job — the docs site is still stuck on 3.3 (version dropdown and Version: 3.3 badge).

Root cause: the pnpm migration (#855) changed the snapshot step from uv run npx docusaurus ... to plain pnpm exec docusaurus ..., dropping the uv run wrapper. The @apify/docusaurus-plugin-typedoc-api plugin spawns a bare python to generate the API reference dump (generate_ast.py), which needs pydoc-markdown from the project venv. Without uv run, the venv is not on PATH, the script fails (the plugin only checks for spawn errors, not the exit code), and the job dies later with ENOENT: pydoc-markdown-dump.json — exactly what the logs of runs 26631120750 and 25363849495 show.

This restores the uv run wrapper (consistent with the build-docs poe task, which is why doc deploys themselves still worked) and adds a comment explaining why it is needed. Verified locally: the snapshot sequence fails without uv run and passes with it.

Follow-up (separate from this PR): the fix needs to be cherry-picked to release-v3, Version docs re-dispatched there with version 3.4.1, Release docs re-dispatched, and the snapshot synced back to master.

The pnpm migration (#855) dropped the uv run wrapper around the docusaurus
docs:version/api:version commands. The typedoc-api plugin spawns a bare
python to generate the API reference dump, which needs pydoc-markdown from
the project venv — without uv run the script fails and the Version docs job
(and the dependent Doc release) breaks, leaving the docs site on the old
version. This is why the 3.4.0 and 3.4.1 releases never updated the docs.
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 3, 2026
@vdusek vdusek self-assigned this Jun 3, 2026
@vdusek vdusek requested a review from janbuchar June 3, 2026 09:57
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.94%. Comparing base (da81ac8) to head (8004fc8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #928      +/-   ##
==========================================
- Coverage   86.98%   86.94%   -0.04%     
==========================================
  Files          48       48              
  Lines        2942     2942              
==========================================
- Hits         2559     2558       -1     
- Misses        383      384       +1     
Flag Coverage Δ
e2e 37.55% <ø> (ø)
integration 58.90% <ø> (-0.04%) ⬇️
unit 75.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek removed the request for review from janbuchar June 3, 2026 10:10
@vdusek vdusek merged commit 695500e into master Jun 3, 2026
28 checks passed
@vdusek vdusek deleted the fix/version-docs-uv-run branch June 3, 2026 10:12
vdusek added a commit that referenced this pull request Jun 3, 2026
Adds the 3.4 docs snapshot that the release pipeline failed to create
for v3.4.0 and v3.4.1 — the `Version docs` job was broken until #928, so
`versions.json` and the version dropdown on the docs website are still
stuck at 3.3.

- Replaces the 3.3 snapshot with 3.4 (the workflow keeps one minor per
major), updating `versioned_docs`, `versioned_sidebars`, and
`versions.json`.
- Generated from the `release-v3` branch (v3.4.1) using the exact
commands the fixed workflow runs (`uv run pnpm exec docusaurus
docs:version 3.4` + `api:version 3.4`), so the API reference documents
the released v3 API rather than the v4-dev code on master. Verified: the
snapshot still contains the `RemainingTime` timeout literal that was
removed on master in #918.

Merging this with the `docs:` prefix triggers a docs deploy from master,
which updates the version dropdown and the "Version: 3.x" badge on the
website.
barjin pushed a commit to apify/docusaurus-plugin-typedoc-api that referenced this pull request Jun 3, 2026
## Summary

`processPythonDocs` only checks `spawnSync().error`, which is set when
the spawn itself fails — a non-zero exit of `generate_ast.py` (e.g.
`pydoc-markdown` not importable by the resolved `python`) went
completely unnoticed. The plugin then crashed later with a confusing
`ENOENT: pydoc-markdown-dump.json`, hiding the real cause.

This is exactly what made the broken `Version docs` CI job in
apify/apify-sdk-python (failed 3.4.0/3.4.1 doc releases) hard to
diagnose — see apify/apify-sdk-python#928 for the workflow-side fix.

Now the exit code is checked and the script's stderr is included in the
thrown error:

```
[ERROR] Error: The generate_ast.py script failed with exit code 1:
ModuleNotFoundError: No module named pydoc_markdown
```

Verified by building the plugin, dropping the compiled output into the
SDK website's `node_modules`, and running `docusaurus api:version` with
a stub `python` that exits 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants