Skip to content

[BUG] repository_dispatch smoke-test release job treats missing tag release as existing #355

Closed

Description

@c-vigo

Description

The Publish smoke-test release artifact job fails in Create or validate GitHub release for tag 0.3.1-rc3, even when the release does not exist.

The workflow captures gh api .../releases/tags/${TAG} output with || true and checks only for non-empty stdout. On 404, GitHub CLI still returns a JSON error payload, so the script incorrectly enters the "release exists" branch and compares prerelease=null against expected true, then exits 1.

Steps to Reproduce

  1. Trigger repository_dispatch with:
    • event_type=smoke-test-trigger
    • tag=0.3.1-rc3
    • release_kind=candidate
  2. Run workflow Repository Dispatch Listener in vig-os/devcontainer-smoke-test.
  3. Observe job Publish smoke-test release artifact fail at step Create or validate GitHub release.

Expected Behavior

If no release exists for the tag, the workflow should create it (gh release create ... --prerelease for candidate tags).

Actual Behavior

Workflow fails with:
ERROR: Existing release '0.3.1-rc3' prerelease=null (expected true)

Environment

  • OS: GitHub-hosted runner Ubuntu 22.04
  • Container Runtime: N/A
  • Image Version/Tag: ubuntu-22.04 runner image
  • Architecture: AMD64

Additional Context

Possible Solution

Use status-aware release lookup instead of stdout non-empty check, for example:

  • capture HTTP status and branch only on 200
  • or validate .id/.tag_name in successful JSON before treating as existing

Acceptance Criteria

  • Workflow treats 404 release lookup as "release does not exist"
  • Candidate tags create prerelease artifacts successfully
  • Existing release path still validates prerelease flag
  • TDD compliance (see .cursor/rules/tdd.mdc)

Changelog Category

Fixed

Activity

  1. added
    bug
    priority:high
    area:ci
    area:workflow
    effort:small
    semver:patch
    on Mar 18, 2026
  2. self-assigned this
    on Mar 18, 2026
  3. added a commit that references this issue on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:ciarea:workflowbugeffort:smallpriority:highsemver:patch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions