Skip to content

Fix release docs automation#9006

Open
amyblais wants to merge 3 commits into
masterfrom
amyblais-releasedocsauto
Open

Fix release docs automation#9006
amyblais wants to merge 3 commits into
masterfrom
amyblais-releasedocsauto

Conversation

@amyblais
Copy link
Copy Markdown
Member

@amyblais amyblais commented Jun 2, 2026

Copilot AI review requested due to automatic review settings June 2, 2026 10:28
@amyblais amyblais added the 1: Dev Review Requires review by a core commiter label Jun 2, 2026
@amyblais amyblais requested a review from NARSimoes June 2, 2026 10:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Newest code from mattermost has been published to preview environment for Git SHA 868ae48

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release-docs automation script used by the Update Docs GitHub Actions workflow, primarily to (a) support applying multiple versions in one run and (b) reduce workflow failures from slow Claude responses.

Changes:

  • Parse VERSION as a comma-separated list (VERSIONS) and apply updates per file once per version (chained).
  • Adjust prompting to pass the active version into each Claude request.
  • Increase Anthropic client request timeout from 120s to 300s.

Comment thread .github/scripts/update_docs.py
Comment thread .github/scripts/update_docs.py Outdated
Comment thread .github/scripts/update_docs.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

Warning

Review limit reached

@amyblais, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 22 minutes and 45 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cbd67177-f56c-47db-86ac-279cec5e1732

📥 Commits

Reviewing files that changed from the base of the PR and between 868ae48 and 0e7df42.

📒 Files selected for processing (1)
  • .github/scripts/update_docs.py
📝 Walkthrough

Walkthrough

The script now processes multiple comma-separated release versions sequentially, parsing each into a VERSIONS list and updating targeted documentation files in order with chained outputs so changelog entries accumulate. The refactored build_user_prompt includes version-specific context, and the core update_file workflow adds integrity checks and per-version content validation without failing the entire file on single-version skips.

Changes

Multi-version documentation release automation

Layer / File(s) Summary
Multi-version environment parsing
.github/scripts/update_docs.py
Environment variable documentation now describes VERSION as comma-separated release numbers; parsing splits VERSION into VERSIONS list with non-empty validation.
File selection logic for release types
.github/scripts/update_docs.py
Server changelog inclusion conditionals refactored for readability; Patch/Dot/Security releases include changelog, Feature/ESR exclude it; Desktop comments clarified.
Prompt generation with version context
.github/scripts/update_docs.py
build_user_prompt signature extended with version parameter; system instructions tightened to forbid placeholder text and require complete file content; version value embedded in Release details.
Core multi-version update workflow
.github/scripts/update_docs.py
update_file refactored to loop through VERSIONS sequentially, chain Claude output into next version's input, validate API response shape per version, skip individual versions on empty/no-op outputs without failing the file, preserve file tail on truncation, and report missing files earlier.
Client configuration and output formatting
.github/scripts/update_docs.py
Anthropic timeout increased; main output prints Version(s) as joined list; summary always printed; warning message text adjusted.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

  • mattermost/docs#9001: Modifies the same RELEASE_TYPE-driven server changelog selection logic that this PR extends to multi-version chaining.
  • mattermost/docs#8925: Previous evolution of the same .github/scripts/update_docs.py release-docs generator; this PR's multi-version enhancements directly build upon that workflow.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix release docs automation' directly aligns with the main objective of fixing the release documentation script to support multiple versions and resolve timeout issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly outlines two specific changes: supporting comma-separated version lists and fixing a timeout issue, both directly related to the changeset in the update_docs.py script.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch amyblais-releasedocsauto

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@amyblais
Copy link
Copy Markdown
Member Author

amyblais commented Jun 2, 2026

/check-cla

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Newest code from mattermost has been published to preview environment for Git SHA cef3bbd

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Newest code from mattermost has been published to preview environment for Git SHA 0e7df42

Copy link
Copy Markdown
Contributor

@NARSimoes NARSimoes left a comment

Choose a reason for hiding this comment

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

A clarification:

# for multi-version releases (e.g. security patches across several branches).
# Each version is applied to every file in sequence; the output of one version
# becomes the input for the next, so entries accumulate correctly in changelogs.
VERSIONS: list[str] = [v.strip() for v in os.environ["VERSION"].split(",") if v.strip()]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The "versions" approach isn't aligned with the respective workflow update-docs.yaml (e.g. expect version, we do normalization there, etc).

Based on the current error I'd do

  • Open a new pull-request just bumping the timeout -> merge -> run pipeline with one version to ensure is green
  • Keep updating this pull-request to support multiple versions since it'll require more logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1: Dev Review Requires review by a core commiter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants