Skip to content

[bot] Merge master/57d47dd9 into rel/dev#1397

Merged
yenkins-admin merged 6 commits intorel/devfrom
snapshot-master-57d47dd9-to-rel/dev
Mar 6, 2026
Merged

[bot] Merge master/57d47dd9 into rel/dev#1397
yenkins-admin merged 6 commits intorel/devfrom
snapshot-master-57d47dd9-to-rel/dev

Conversation

@yenkins-admin
Copy link
Contributor

🚀 Automated PR to perform merge from master into rel/dev with changes up to 57d47dd (created by https://github.com/gooddata/gooddata-python-sdk/actions/runs/22767955050).

hkad98 and others added 6 commits March 5, 2026 15:05
…hortcodes

Hugo was spending ~8 minutes processing ~4,140 API ref shortcodes per version
(O(n²) regex in api-ref-link-all-partial). This moves HTML rendering into
python_ref_builder.py using Jinja2 templates and a pre-compiled LinkResolver
with O(1) dict lookups, eliminating all shortcode processing time.

Key changes:
- Two-pass generation: pass 1 builds links dict, pass 2 renders HTML
- Jinja2 templates replicate the exact output of Hugo shortcodes/partials
- Markdown templates now receive pre-rendered CONTENT instead of shortcodes
- jinja2 added to script-requirements.txt
- CI workflow: use master's scripts for all versions, hash-based cache key
- Dockerfile: fix COPY paths, persist Go modules in image layer, remove
  unnecessary data.json/links.json copies to versioned_docs
- Restore api-reference/_index.md and pandas/_index.md for Hugo navigation

Result: ~3x faster Hugo build (57s → 19s per version), API ref template
time eliminated entirely.

jira: trivial
risk: high
Add 33 tests covering LinkResolver, template rendering, context builders, and file structure creation. Fix pre-existing type annotation issues (RefHolder.packages, parse_toml return type) and remove dead links.json generation that is no longer consumed after the pre-render change. Add Makefile test-docs-scripts target and CI docs-scripts-tests job with scripts/docs/** path filter.

JIRA: trivial
risk: nonprod
Fix two bugs found during review: (1) generate.sh crashes on missing links.json after the pre-render change removed its generation — add if-guard around the sed/mv. (2) V2 cache key included test files via scripts/docs/** glob, causing unnecessary cache busts — narrow to scripts/docs/*.py + templates/**. Also add scripts/docs/README.md documenting how the three documentation workflows operate.

JIRA: trivial
risk: high
uv sync --locked does not install pytest since it lives in the test dependency group. Changed to --group test to make pytest available.

JIRA: trivial
risk: nonprod
python_ref_builder imports toml which is not a transitive dependency of any workspace package. Adding it to the test group so the docs-scripts-tests CI job can find it.

JIRA: trivial
risk: nonprod
perf(docs): pre-render API reference HTML in Python
@yenkins-admin yenkins-admin merged commit 2bd8164 into rel/dev Mar 6, 2026
1 check passed
@yenkins-admin yenkins-admin deleted the snapshot-master-57d47dd9-to-rel/dev branch March 6, 2026 14:35
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.53%. Comparing base (7d482a0) to head (57d47dd).
⚠️ Report is 451 commits behind head on rel/dev.

Additional details and impacted files
@@           Coverage Diff            @@
##           rel/dev    #1397   +/-   ##
========================================
  Coverage    77.53%   77.53%           
========================================
  Files          225      225           
  Lines        14614    14614           
========================================
  Hits         11331    11331           
  Misses        3283     3283           

☔ 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.

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.

2 participants