Skip to content

Fix draft release lookup#5000

Merged
marcelveldt merged 2 commits into
devfrom
release-lookup-fix
Jul 25, 2026
Merged

Fix draft release lookup#5000
marcelveldt merged 2 commits into
devfrom
release-lookup-fix

Conversation

@marcelveldt

@marcelveldt marcelveldt commented Jul 25, 2026

Copy link
Copy Markdown
Member

What does this implement/fix?

Use release IDs for live publication detection so draft releases do not hit the tag endpoint.

Related issue (if applicable):

  • N/A

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.
  • I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 25, 2026 11:38

Copilot AI left a comment

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.

Pull request overview

This PR updates the GitHub release workflow to detect live publication state via release IDs (instead of the tag endpoint), and adds a regression test to ensure the workflow uses the new ID-based lookup and validates tag consistency.

Changes:

  • Switch “Detect live publication state” to fetch repos/.../releases/$RELEASE_ID selected from workflow outputs, and verify tag_name matches the requested version.
  • Fail closed when the workflow lacks a release ID for the current state or when the fetched release tag mismatches the requested version.
  • Add a regression test to ensure the workflow uses release IDs and includes expected guardrails/messages.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release.yml Selects a release ID (draft vs published) and queries releases/{id}; validates tag_name before checking draft/immutable state.
tests/scripts/test_release_workflow.py Adds a workflow-structure regression test and a YAML helper to extract a step’s run script.

Comment thread .github/workflows/release.yml
Comment on lines +398 to +402
assert 'gh api "repos/$GITHUB_REPOSITORY/releases/tags/$VERSION"' not in publication_step
assert 'gh api "repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID"' in publication_step
assert 'case "$RELEASE_STATE" in' in publication_step
assert "Missing release id for $RELEASE_STATE release $VERSION" in publication_step
assert "tag_name" in publication_step

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added the new case assertion as well, so the regression test covers the first-time release path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 25, 2026 11:42

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@marcelveldt
marcelveldt merged commit b15a14d into dev Jul 25, 2026
16 checks passed
@marcelveldt
marcelveldt deleted the release-lookup-fix branch July 25, 2026 11:50
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