Skip to content

fix(release): validate retained stack inventory on retries #2909

Open

Description

@sbaum1994

Describe the bug

A stack release retry accepts an existing inventory asset by filename alone. It validates a new local render but never downloads the original asset it retains before publishing the release. Invalid JSON or inventory from another source commit can therefore be accepted.

Steps or code to reproduce bug

Use an offline GitHub fixture that lists the expected inventory filename but returns malformed inventory or a different source commit. Retry the source-release helper: it skips downloading and validating the retained asset.

Expected behavior

Download the retained original and apply the existing Python validator: JSON/schema version, exact source version/tag/commit, and nonempty releases/artifacts. Download or validation failures must stop publication without overwriting the original or deleting an existing release. A valid original remains acceptable when a fresh render differs.

Keep the current rendering, release creation, upload, and cleanup behavior. This fix needs only the existing helper and its tests.

Rollout

The PRs can merge independently. Keep this issue open until all three merge. Future maintenance tags need the helper backport; historical tags retain their original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcicdContinuous integration, build, and release pipeline work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions