Skip to content

feat(release): list aqua package additions/updates in changelog#9471

Merged
jdx merged 3 commits intomainfrom
claude/dreamy-mirzakhani-18e270
Apr 29, 2026
Merged

feat(release): list aqua package additions/updates in changelog#9471
jdx merged 3 commits intomainfrom
claude/dreamy-mirzakhani-18e270

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 29, 2026

Summary

The release PR description was previously listing the aqua-registry release tags rolled into a mise release (e.g. v4.491.0, v4.492.0, ...), which reads as opaque version noise to users. This restores the pre-#9043 behavior of listing the actual added and updated packages, but adapted to work against the merged registry.yaml that #9043 introduced.

scripts/gen-aqua-changelog.sh now:

  • Fetches the previous tag's registry.yaml from upstream aquaproj/aqua-registry.
  • Parses both old and new files by canonical package id (namerepo_owner/repo_namepath), matching crates/aqua-registry/build.rs::canonical_package_id.
  • Emits #### New Packages (N) and #### Updated Packages (N) sections (matching the original pre-refactor(aqua): bake aqua registry from merged yaml #9043 format).
  • Only links repo_owner/repo_name ids to GitHub, so name-only ids like kiro.dev/kiro-cli don't render as broken links.

YAML parsing is done by inline python3 (stdlib only — no PyYAML / yq dependency). The release runner is ubuntu-latest which ships python3.

Sample output (v4.491.0v4.499.0)

### 📦 Aqua Registry Updates

#### New Packages (28)

- [`IBM-Cloud/ibm-cloud-cli-release`](https://github.com/IBM-Cloud/ibm-cloud-cli-release)
- [`controlplaneio-fluxcd/flux-operator/flux-operator-mcp`](https://github.com/controlplaneio-fluxcd/flux-operator)
- `kiro.dev/kiro-cli`
- ...

#### Updated Packages (13)

- [`gleam-lang/gleam`](https://github.com/gleam-lang/gleam)
- [`sigstore/cosign`](https://github.com/sigstore/cosign)
- ...

Test plan

  • bash -n scripts/gen-aqua-changelog.sh
  • mise run lint scripts/gen-aqua-changelog.sh (shellcheck, shfmt, etc. clean)
  • ./scripts/gen-aqua-changelog.sh v4.498.0 v4.499.0 "###" — 1 added, 1 updated
  • ./scripts/gen-aqua-changelog.sh v4.491.0 v4.499.0 "###" — 28 added, 13 updated
  • ./scripts/gen-aqua-changelog.sh v4.499.0 v4.499.0 "###" — silent exit 0
  • ./scripts/gen-aqua-changelog.sh "" v4.499.0 "###" — silent exit 0
  • ./scripts/gen-aqua-changelog.sh v0.0.0-bogus v4.499.0 "###" — fails curl, exits 0 with stderr (matches prior fail-soft contract; xtasks/release-plz wraps the call in || true)

🤖 Generated with Claude Code


Note

Medium Risk
Touches release/changelog generation logic and introduces custom YAML parsing, which could fail or mis-detect package changes if the registry format shifts, but does not affect runtime product behavior.

Overview
Switches scripts/gen-aqua-changelog.sh from enumerating upstream aqua-registry release tags (via gh) to diffing the old vs current registry.yaml and printing New Packages and Updated Packages sections for the changelog.

The script now fetches the old tag’s registry.yaml via curl, parses both YAMLs with an inline python3 stdlib parser to compute canonical package IDs, and only adds GitHub links when repo_owner/repo_name is present to avoid broken links for name-only entries.

Reviewed by Cursor Bugbot for commit 6b93531. Bugbot is set up for automated code reviews on this repo. Configure here.

The release PR description was previously listing the aqua-registry
release tags rolled into a mise release, which reads as opaque version
noise to users. Restore the prior pre-#9043 behavior of listing the
individual added and updated packages instead, but make it work against
the merged registry.yaml that #9043 introduced: fetch the previous tag's
registry.yaml from upstream, parse both files by canonical package id
(name | repo_owner/repo_name | path), and emit New Packages / Updated
Packages sections. Linking only resolves repo_owner/repo_name ids to
GitHub URLs so name-only ids (e.g. kiro.dev/kiro-cli) don't render as
broken links.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR replaces the changelog generation mechanism for aqua-registry updates: instead of listing opaque aqua-registry release tags, it now fetches the upstream registry.yaml at the old tag via curl, diffs it against the locally vendored new registry.yaml using inline Python, and emits #### New Packages (N) / #### Updated Packages (N) sections. The old gh release list-based approach is removed entirely.

Confidence Score: 5/5

Safe to merge — replaces opaque release-tag listing with a correct package-level diff; fail-soft guards and the || true call site in release-plz contain any runtime failures.

No P0 or P1 issues found. The inline Python parses registry.yaml with the same canonical-ID logic as the Rust build script, the heading hierarchy is correctly derived (sub = heading + '#'), fail-soft exits cover curl failures and missing files, and the PR is manually tested across several tag ranges including edge cases (same tag, empty tag, bogus tag).

No files require special attention.

Important Files Changed

Filename Overview
scripts/gen-aqua-changelog.sh Rewrites changelog generation: fetches old registry.yaml via curl, diffs against local copy using inline Python, emits structured New/Updated package lists with correct heading hierarchy via sub = heading + '#'.

Sequence Diagram

sequenceDiagram
    participant RP as xtasks/release-plz
    participant SC as gen-aqua-changelog.sh
    participant GH as raw.githubusercontent.com
    participant PY as python3 (inline)
    participant LR as local registry.yaml

    RP->>SC: gen-aqua-changelog.sh OLD_TAG NEW_TAG "###"
    SC->>SC: guard: empty/equal tags → exit 0
    SC->>SC: guard: local registry.yaml missing → exit 0
    SC->>GH: curl registry.yaml @ OLD_TAG
    GH-->>SC: old registry.yaml (tempfile)
    SC->>PY: python3 - old_path new_path heading
    PY->>PY: parse(old_path) → {id: (github_repo, block)}
    PY->>LR: parse(new_path) → {id: (github_repo, block)}
    LR-->>PY: package map
    PY->>PY: added = new_ids - old_ids
    PY->>PY: updated = shared_ids where block differs
    PY-->>SC: markdown output (or exit 0 if no changes)
    SC-->>RP: changelog section string
    RP->>RP: inject into CHANGELOG.md and PR body
Loading

Reviews (2): Last reviewed commit: "fix(release): strip yaml inline comments..." | Re-trigger Greptile

Comment thread scripts/gen-aqua-changelog.sh
The aqua-registry sub-section headings were hardcoded to `####`, which
skipped a level (`##` → `####`) when xtasks/release-plz invoked the
script with `"##"` for the PR body. Derive the sub-heading by appending
`#` to the supplied heading so hierarchy stays consistent for both
CHANGELOG.md (`###`/`####`) and the PR body (`##`/`###`).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the gen-aqua-changelog.sh script to generate a detailed list of added and updated packages by comparing registry.yaml files between tags. The script now uses an embedded Python block to manually parse the YAML content. Review feedback suggests refining the parsing logic to properly handle trailing comments, which could otherwise cause incorrect package identification or false positives in the changelog.

# field also appears inline on the ' - ' line itself.
fields: dict[str, str] = {}
first_line, _, rest = body.partition('\n')
m = re.match(r'(name|repo_owner|repo_name|path|type):\s*(.*?)\s*$', first_line)
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.

medium

The regex used to extract YAML field values will capture trailing comments if they exist on the same line (e.g., name: foo # comment). This can lead to incorrect package IDs and false positives in the 'Updated Packages' section if comments are modified. Consider stripping comments from the value before processing.

Comment on lines +39 to +43
def strip_quotes(v: str) -> str:
v = v.strip()
if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'):
return v[1:-1]
return v
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.

medium

The strip_quotes function is naive and will fail to strip quotes if there is a trailing comment on the line, as the last character won't be a quote. It's better to handle comment stripping first.

Suggested change
def strip_quotes(v: str) -> str:
v = v.strip()
if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'):
return v[1:-1]
return v
def strip_quotes(v: str) -> str:
v = v.split(' #')[0].strip()
if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'):
return v[1:-1]
return v

Defensive fix: split values on ` #` (space-hash) before quote handling
so a hypothetical `name: foo # comment` line wouldn't poison the package
id or the per-package content hash used for update detection. Splitting
on ` #` rather than bare `#` preserves aqua-style ids that legitimately
contain `#`, e.g. `_go/sigsum.org/sigsum-go#cmd/sigsum-key`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@jdx jdx enabled auto-merge (squash) April 29, 2026 14:44
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.25 x -- echo 22.4 ± 0.6 21.5 25.9 1.00
mise x -- echo 23.2 ± 0.5 22.1 25.9 1.03 ± 0.04

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.25 env 21.9 ± 0.6 20.8 27.1 1.00
mise env 22.8 ± 0.6 21.8 25.6 1.04 ± 0.04

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.25 hook-env 22.5 ± 0.4 21.5 24.7 1.00
mise hook-env 23.3 ± 0.6 22.2 26.1 1.03 ± 0.03

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.25 ls 22.7 ± 0.5 21.8 28.1 1.00
mise ls 23.7 ± 0.5 22.7 26.6 1.04 ± 0.03

xtasks/test/perf

Command mise-2026.4.25 mise Variance
install (cached) 157ms 161ms -2%
ls (cached) 80ms 84ms -4%
bin-paths (cached) 80ms 84ms -4%
task-ls (cached) 814ms 791ms +2%

@jdx jdx merged commit 39c758f into main Apr 29, 2026
36 checks passed
@jdx jdx deleted the claude/dreamy-mirzakhani-18e270 branch April 29, 2026 14:54
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.

1 participant