Skip to content

Fix changelog extraction to support unreleased content in release pipeline#472

Merged
Mossaka merged 3 commits intomainfrom
copilot/investigate-release-pipeline-failure
Nov 1, 2025
Merged

Fix changelog extraction to support unreleased content in release pipeline#472
Mossaka merged 3 commits intomainfrom
copilot/investigate-release-pipeline-failure

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

The release pipeline for v0.3.3 failed because changelog_utils.py expected a versioned changelog entry (## [v0.3.3]) but changes were in [Unreleased] per Keep a Changelog conventions.

Changes

  • Enhanced extract_changelog_content() to fall back to [Unreleased] section when requested version doesn't exist
    • Maintains existing behavior: prefers versioned sections when available
    • Raises ValueError only if both version and unreleased content are missing/empty
  • Added 3 test cases covering fallback extraction, empty unreleased handling, and version preference
  • Updated CHANGELOG.md with fix entry

Behavior

# Before: version not found → ValueError
extract_changelog_content(Path('CHANGELOG.md'), 'v0.3.3')
# Error: Version v0.3.3 not found in CHANGELOG.md

# After: version not found → extracts from [Unreleased]
extract_changelog_content(Path('CHANGELOG.md'), 'v0.3.3')
# Returns content from [Unreleased] section

# Existing versions still work unchanged
extract_changelog_content(Path('CHANGELOG.md'), 'v0.3.0')
# Returns content from [v0.3.0] section

This unblocks v0.3.3 release. Once merged, tag and push v0.3.3 to trigger the release workflow.

Original prompt

This section details on the original issue you should resolve

<issue_title>Investigate release pipeline failure for v0.3.3 and suggest next steps</issue_title>
<issue_description>## Summary

The release pipeline failed during the extraction of changelog content for version v0.3.3. The error indicates that the specified version was not found in CHANGELOG.md, causing the process to exit with code 1.

Error log excerpt

CHANGELOG_CONTENT=$(python3 scripts/changelog_utils.py extract "v0.3.3")
CHANGELOG_CONTENT=$(python3 scripts/changelog_utils.py extract "v0.3.3")
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
shell: /usr/bin/bash -e {0}
env:
  CARGO_TERM_COLOR: always
Error: Version v0.3.3 not found in CHANGELOG.md
Error: Process completed with exit code 1.

Requested actions

  • Investigate why version v0.3.3 is missing from CHANGELOG.md or if there is a parsing issue.
  • Determine if this is a configuration, documentation, or automation error.
  • Suggest next steps to unblock the current release pipeline.

Context

This is impacting the current release process, so guidance on a quick resolution or workaround is appreciated.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 28, 2025 17:01
- Updated changelog_utils.py to fall back to [Unreleased] section when version not found
- Added comprehensive tests for the new fallback behavior
- This allows the release workflow to extract changelog content from [Unreleased] when creating a new release
- Solves the v0.3.3 release pipeline failure

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Added entry documenting the fix for changelog extraction that now supports extracting from [Unreleased] section when version is not yet published.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate release pipeline failure for version v0.3.3 Fix changelog extraction to support unreleased content in release pipeline Oct 28, 2025
Copilot AI requested a review from Mossaka October 28, 2025 17:07
@Mossaka Mossaka marked this pull request as ready for review October 28, 2025 17:27
@Mossaka
Copy link
Collaborator

Mossaka commented Nov 1, 2025

The security audit is irrelevant to this PR AND should be fixed from another task.

@Mossaka Mossaka merged commit 55ed685 into main Nov 1, 2025
38 of 40 checks passed
@Mossaka Mossaka deleted the copilot/investigate-release-pipeline-failure branch November 1, 2025 19:10
Mossaka pushed a commit to Mossaka/wassette that referenced this pull request Feb 2, 2026
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.

Investigate release pipeline failure for v0.3.3 and suggest next steps

2 participants