Skip to content

fix(release): the release pr lists every issue in its release, read through the roadmap store, and stops when the read fails #1020

Closed as not planned

Description

@dan-petty

Problem

The release PR's body lists the Release's deliverables. _build_release_pr_body (src/devops_cli/commands/release.py:999-1024, call at :1009) gets them from _fetch_milestone_deliverables (:929-939), which reads GitHub with raw run_gh calls. Checked at 38517a8 (the release/v0.2.25 tip):

#768 assigned this read to the store: its body says #743 "moves release prepare's milestone read (commands/release.py:754-863) ... onto this store". When #743 was split, the read fell between the two items. #743's body no longer mentions it, and #982's shared cut function builds the body with _build_release_pr_body unchanged (its step 5). So the automated cut (#743 through #982) would open its release PR from this read.

The store has almost what this needs:

  • items(release=...) (roadmap/store.py:476) needs a board. The GitHub adapter already reads exactly this listing, _read_issues(f"milestone={found.number}&state=all") (roadmap/github_store.py:516-519), but reads the board first (:513) and raises "No board is configured" without one (:819-826), and the cut must work without a board (store.py:559: "Without a board, Release operations work").
  • issues() (store.py:503, github_store.py:609-611) is board-free, reads every page, raises instead of returning a partial list, and carries each issue's release (store.py:182-195). It reads every issue in the repository, though, not one Release's.
  • Closing a Release already goes through the store: release tag --push calls close_release (_close_release_milestone_safe, release.py:1661-1676), and release.yml runs devops gh milestones close, which refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 moved onto the store.

Acceptance criteria

  • RoadmapStore.issues() takes release: str | None = None. Given a version, it returns that Release's issues, open and closed, never pull requests, from every page. The GitHub adapter reuses the listing items(release=...) reads (github_store.py:519), without the board read. A version with no Release raises, using require_release (store.py:303). The contract suite (tests/test_roadmap_store_contract.py) covers both adapters. Paging is run_gh's job behind the injected runner (github_store.py:3-6), so the GitHub adapter's check is that test_every_rest_listing_follows_api_paginate_and_asks_for_full_pages (tests/test_roadmap_github_store.py:512) also covers this read.
  • With 102 issues seeded in Release v0.2.26 of the roadmap_store fixture (tests/conftest.py:325), the release PR body lists all 102 as - #<n>, in number order, and marks each open one (open).
  • The read runs before the first git write of fix(release): one fail-closed release path: cut branch from the remote release tip, uv.lock bump, draft flag, required label and milestone #982's cut function. When it fails, release prepare --create-pr and release pr exit non-zero with an error naming the Release and the failure. Nothing is pushed, and gh pr create is not called.
  • A Release with no issues gives a body without a deliverables section. rg -n "_fetch_raw_milestone|_query_gh_milestone_issues|_query_branch_commit_deliverables|_fetch_milestone_deliverables" src tests finds nothing.
  • Under devops --dry-run (a root option, main.py:205-208), release pr and release prepare --create-pr read the list and print it. Today they return before building the body (release.py:707-741, :1158-1176).
  • No test patches commands.release.run_gh for this read. test_query_gh_milestone_issues_all_states_and_standalone_prs (tests/test_release.py:976) is replaced by store-backed tests. The new tests run offline and add at most 1 s.
  • changelog.d/1020.md records the fix under ### Fixed. CHANGELOG.md is not edited.
  • uv run devops ci passes.
  • (person-run) On release/v0.2.26, devops --dry-run release pr --version 0.2.26 lists the same issue numbers as gh api 'repos/dan-petty/devops-cli/issues?milestone=44&state=all' --paginate --jq '.[] | select(.pull_request == null) | .number'.

Key questions

Depends on: #982 (it moves _build_release_pr_body's caller into the shared cut function, and this item's read joins that function before its first write).
Order: after #982, and before #743 when a release has room for it first, so the first automated cut lists every issue. v0.2.26 is full, so it waits in the backlog. If #743 lands first, this item still applies, because #743 calls #982's function.
Related: #768 (assigned this read to the store), #743 (the automated cut), #982 (the shared cut function), #999 (board writes through the store; no overlap, this is a read), #983 (later moves _read_listing onto the session), #740.

Update 2026-10-08: refinement

The defect holds (commands/release.py:1251-1354), and the read still runs after the cut branch checkout and push (:1541, :1555); the Service's close job calls it. The dry-run criterion conflicts with #412: release pr --dry-run lists the store read among its planned requests and prints no issues. #982 and #743 landed. (proposed) #1346 and #1425 call this store read.

Activity

  1. added
    priority/p2-medium
    scope/release
    on Oct 2, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Superseded by ADR 0012 (docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md). The cut, the fragments or the hand-built release pull request that this issue concerns are deleted by the new release model.

  3. added
    type/bug
    and removed on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/releasetype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions