Skip to content

feat: discover eligible releases and prepare their edition pull requests - #385

Merged
brendanclement merged 13 commits into
mainfrom
brendan/release-discovery-r2
Oct 23, 2026
Merged

brendanclement merged 13 commits into
mainfrom
brendan/release-discovery-r2

Conversation

@brendanclement

@brendanclement brendanclement commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

We can now save a release’s documentation, build the versioned site and publish it through staging. Someone still has to notice each new release and start preparing its docs.

This PR adds a job that finds eligible releases and opens a documentation PR for each one.

  • For Enterprise, it waits until the release tag and qualification tag point to the same commit.
  • For OSS, it uses published GitHub releases that aren’t prereleases. Each product has a starting version, so we don’t backfill old releases.

The job uses the existing preparation command and records the exact sources used. Running it again keeps existing editions, corrections and reviewers’ changes. If it stopped partway through, it can finish opening the PR or starting its checks.

People still review and merge those PRs. Discovery never merges, publishes or changes an existing preferred edition.

Next Steps

  • Testing and Enabling this check and adding a schedule

@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from a95323a to 7994eec Compare October 22, 2026 20:11
@brendanclement
brendanclement force-pushed the brendan/supervised-publication branch 2 times, most recently from fa15b1b to e25ba00 Compare October 22, 2026 20:56
@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from 7994eec to c469100 Compare October 22, 2026 20:56
@brendanclement
brendanclement marked this pull request as ready for review October 22, 2026 20:58
@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from f13d29d to ee62f3f Compare October 22, 2026 23:03
@brendanclement
brendanclement force-pushed the brendan/supervised-publication branch from e25ba00 to 138eb81 Compare October 22, 2026 23:03
if [ "$EVENT" = workflow_dispatch ]; then
git fetch --no-tags --unshallow origin +refs/heads/main:refs/remotes/origin/main
BASE_SHA=$(git merge-base HEAD refs/remotes/origin/main)
elif [ -n "$BASE_SHA" ] && [ "$BASE_SHA" != 0000000000000000000000000000000000000000 ]; then

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.

what's up with that magic sha?

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.

Added a comment, this is to catch an edge case where there is no previous commit, github returns all zeros. in that case we just want to not compare it to anything.

@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from ee62f3f to a18a56f Compare October 23, 2026 16:19
@brendanclement
brendanclement force-pushed the brendan/supervised-publication branch from 138eb81 to 0a50e41 Compare October 23, 2026 16:19
@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from a18a56f to caab315 Compare October 23, 2026 16:24
@brendanclement
brendanclement force-pushed the brendan/supervised-publication branch from 0a50e41 to ca54ea2 Compare October 23, 2026 16:24
Base automatically changed from brendan/supervised-publication to main October 23, 2026 16:27
scripts/discover.py lists each product's releases from the release
discover.yaml names on. An Enterprise release is eligible once its release
tag and an annotated qualification tag name the same commit, and an OSS
release once its GitHub release is published and not a prerelease. A release
with no saved edition, pull request or branch is prepared with edition.py
prepare on editions/<product>-<version>, checked against main, pushed and
given a pull request. A dry run reports each release's exact inputs and
writes nothing.

The Discover releases workflow runs it only when started by hand. Its
open-prs mode runs on main once the RELEASE_DISCOVERY repository variable
allows it, and starts Compose and Assemble on each branch, since the
workflow token's pushes start no workflows. A dispatched Compose run checks
the branch against the commit of main it was made from.
Discovery checked a release's tags, and an OSS edition's Enterprise pages
against the commit their edition records, then fetched the tags and prepared
from whatever they named by then. A tag that moved in between was prepared
and proposed. It now carries what it checked into preparation: the record
preparation would write, and the prepared record before anything is
committed, must name the same release commit, qualification tag object and
Enterprise pages commit, or the release stops for review.

Discovery started Compose and then Assemble on a new pull request, but later
looked only for Compose, so an Assemble dispatch that failed was never
retried. It now looks for each check workflow's runs of the pull request's
head and starts only those that have none, each on its own, never rerunning
one that has run. A dispatch that fails names its workflow. Reading the runs
needs the job's Actions permission, so it no longer asks for checks: read.
@brendanclement
brendanclement force-pushed the brendan/release-discovery-r2 branch from caab315 to a205b2f Compare October 23, 2026 16:28
@brendanclement
brendanclement merged commit def5a0e into main Oct 23, 2026
4 checks passed
@brendanclement
brendanclement deleted the brendan/release-discovery-r2 branch October 23, 2026 16:32
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