Skip to content

Don't let a pre-release tag become the stable docs version - #824

Closed
d-chambers wants to merge 1 commit into
devfrom
master
Closed

Don't let a pre-release tag become the stable docs version#824
d-chambers wants to merge 1 commit into
devfrom
master

Conversation

@d-chambers

Copy link
Copy Markdown
Contributor

Description

Found while reviewing whether a beta can safely be published from dev. This is a latent bug that publishing the beta would activate, so it should land before any pre-release tag exists.

BuildDeployStableDocs resolves "the latest release tag" for its manual workflow_dispatch path with:

git tag --list 'v[0-9]*' --sort=-version:refname | head -n 1

Git's version sort places a pre-release above its own final release. Reproduced in a scratch repo:

tags: v0.2.0rc1 v0.2.0b1 v0.2.0 v0.1.20 v0.1.19
picks: v0.2.0rc1

And in the situation we would actually be in right after tagging a beta:

tags: v0.2.0b1 v0.1.20 v0.1.19
OLD picks: v0.2.0b1   <- builds beta docs, deploys as stable
NEW picks: v0.1.20    <- correct

So once v0.2.0b1 exists, any manual re-run of BuildDeployStableDocs would build docs from beta code and publish them as the stable site — and keep doing so even after v0.2.0 ships. The prerelease guard added in #811 does not prevent this, because github.event.release is null for workflow_dispatch. Fixed by matching only final vX.Y.Z tags.

The same bug exists on master, which matters because the dispatch UI defaults to master; that needs a companion PR.

Docs

Also documents how to publish a pre-release. The current guide is written for a stable release from master and would mislead on every step that matters:

  • tells the maintainer to type v0.2.0, which burns the final version number
  • never mentions setting the release Target to dev (it defaults to master)
  • never mentions the "Set as a pre-release" checkbox, which is what the docs guard keys on
  • sends them to conda-forge, which has no equivalent of --pre and orders 0.2.0b1 above 0.1.20, so a beta there would reach every conda user
  • says to verify the stable docs site updated, which will not happen for a pre-release by design — and the natural "fix" (re-dispatching the workflow) is exactly the bug above

Also adds a warning against re-running PublishPackage after the branch moves, since the version comes from the tag and a re-run then produces a local version segment that PyPI rejects.

Verified: Check Yaml and actionlint pass; the edited shell block parses with bash -n; and both tag-selection scenarios above were reproduced before and after the change.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes. (No issue; found during beta release review.)
  • documented the new feature with docstrings and/or appropriate doc page.
  • included tests. See testing guidelines. (Workflow shell logic; verified by reproducing both scenarios in a scratch repo.)
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

@d-chambers d-chambers added documentation Improvements or additions to documentation ready_for_review PR is ready for review labels Aug 5, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@d-chambers, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c63a2007-a88c-4854-ab4e-c4cb06029440

📥 Commits

Reviewing files that changed from the base of the PR and between 732d5b9 and 32cce2e.

📒 Files selected for processing (3)
  • dascore/utils/pd.py
  • docs/tutorial/coords.qmd
  • tests/test_utils/test_pd.py

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.

@d-chambers

Copy link
Copy Markdown
Contributor Author

Closing in favor of a single PR against master, which will reach dev via the usual master → dev merge. master needs the same fix anyway (the workflow_dispatch UI defaults to it), so doing it twice would just create a conflict to resolve later.

@d-chambers d-chambers closed this Aug 5, 2026
@d-chambers d-chambers removed the ready_for_review PR is ready for review label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant