Skip to content

fix(ci): resolve component to manifest path in rc-release workflow#2231

Merged
PaulChen79 merged 2 commits into
mainfrom
fix/rc-release-component-key
May 4, 2026
Merged

fix(ci): resolve component to manifest path in rc-release workflow#2231
PaulChen79 merged 2 commits into
mainfrom
fix/rc-release-component-key

Conversation

@goldmedal
Copy link
Copy Markdown
Collaborator

@goldmedal goldmedal commented May 4, 2026

Summary

  • The Determine RC version step in rc-release.yml failed with KeyError: 'wren-core-py' (failing run).
  • .release-please-manifest.json is keyed by package path (e.g. core/wren-core-py), but the workflow looked it up by the component name (wren-core-py).
  • Resolve the component → path via release-please-config.json before reading the manifest, with a clear error if the component isn't configured.

Test plan

  • Locally verified the new lookup against release-please-config.json + .release-please-manifest.json for wren-core-py0.4.0, wren0.3.0, wren-core-wasm0.1.0, and an unknown component (fails with a readable message).
  • Re-run the RC Release workflow with component=wren-core-py and confirm the Determine RC version step succeeds.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved RC version resolution in the release workflow to determine base versions more reliably from manifest configuration.
    • Updated release outputs wiring so core component release metadata (tag, version, release-created) are routed consistently for downstream steps.

The Determine RC version step read .release-please-manifest.json with
the component name (e.g. "wren-core-py"), but the manifest is keyed by
package path (e.g. "core/wren-core-py"), causing KeyError. Map the
component to its path via release-please-config.json before lookup.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eee17a93-c7f9-4f9f-aacd-2e7dc143f231

📥 Commits

Reviewing files that changed from the base of the PR and between 281fe15 and 345b14c.

📒 Files selected for processing (1)
  • .github/workflows/release-please.yml

Walkthrough

RC version lookup now resolves a component's package path from release-please-config.json before reading .release-please-manifest.json. Separately, release-please job outputs for wren-core-py and wren-core-wasm were wired to steps.release.outputs keys prefixed with core/; other outputs unchanged.

Changes

RC Version Resolution Update

Layer / File(s) Summary
Data Shape / Config Read
.github/workflows/rc-release.yml
Lookup now reads release-please-config.json to find the package path whose component matches ${COMPONENT}.
Core Resolution Logic
.github/workflows/rc-release.yml
BASE_VERSION is obtained by using manifest[path] from .release-please-manifest.json instead of manifest['${COMPONENT}'].
Validation / Outputs
.github/workflows/rc-release.yml
Existing RC validation, auto-increment, tag/version formatting, and step outputs remain unchanged.

Release-Please Job Outputs Wiring

Layer / File(s) Summary
Output Wiring
.github/workflows/release-please.yml
jobs.release-please.outputs for wren-core-py--* and wren-core-wasm--* now reference ${{ steps.release.outputs['core/...'] }} (keys prefixed with core/) instead of the previous unprefixed keys.
Unaffected Outputs
.github/workflows/release-please.yml
Existing wren--* output mappings are unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

core, python, wasm

Suggested reviewers

  • PaulChen79
  • cyyeh
  • wwwy3y3

Poem

🐰 I hopped through configs, paths in sight,
Found manifest keys by lantern-light,
Core outputs lined with tidy flair,
RCs found homes with careful care. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ci): resolve component to manifest path in rc-release workflow' clearly summarizes the main change: fixing the rc-release workflow by resolving the component name to the correct manifest path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ 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 fix/rc-release-component-key

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@github-actions github-actions Bot added the ci label May 4, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/rc-release.yml (1)

64-66: ⚡ Quick win

Consider guarding manifest[path] for a consistent error experience.

The missing-component case (line 62–63) exits with a clear human-readable message via sys.exit(...). But if path is found in release-please-config.json yet absent from .release-please-manifest.json (e.g., after a manual edit to either file), line 66 raises an unhandled KeyError with a raw Python traceback instead.

♻️ Proposed fix: guard the manifest lookup
-          print(manifest[path])
+          version = manifest.get(path)
+          if version is None:
+              sys.exit(f"path {path!r} not found in .release-please-manifest.json (component '{COMPONENT}')")
+          print(version)

Note: {COMPONENT} here is a Python variable name — move the shell expansion to a separate Python variable or just keep the path in the message, which is already unambiguous:

sys.exit(f"path {path!r} not found in .release-please-manifest.json")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/rc-release.yml around lines 64 - 66, The manifest lookup
currently does manifest[path] which can raise an uncaught KeyError; update the
code around the manifest usage to guard the lookup (use if path not in manifest)
and call sys.exit with a clear message like f"path {path!r} not found in
.release-please-manifest.json" if missing, rather than letting a traceback
surface; ensure you still print manifest[path] when present. Use the existing
variables manifest, path and sys.exit to implement this check so the error
experience is consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/rc-release.yml:
- Around line 64-66: The manifest lookup currently does manifest[path] which can
raise an uncaught KeyError; update the code around the manifest usage to guard
the lookup (use if path not in manifest) and call sys.exit with a clear message
like f"path {path!r} not found in .release-please-manifest.json" if missing,
rather than letting a traceback surface; ensure you still print manifest[path]
when present. Use the existing variables manifest, path and sys.exit to
implement this check so the error experience is consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d17a41bc-2008-4894-89ea-e59a14ef9f33

📥 Commits

Reviewing files that changed from the base of the PR and between a63ee3d and 281fe15.

📒 Files selected for processing (1)
  • .github/workflows/rc-release.yml

release-please-action prefixes its per-package outputs with the
manifest path (e.g. core/wren-core-py--release_created), not the
component name. The publish-* jobs therefore never triggered because
their gating outputs were always empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants