- Notifications
You must be signed in to change notification settings - Fork 3
Description
Describe the bug
There are two scenarios that can happen when a repository has checked the box for Enable release immutability.
- Unable to create a new release on a tag if that tag was previously releases as immutable. Example failure (at bottom)
Validation Failed: {"resource":"Release","code":"custom","field":"pre_receive","message":"pre_receive Repository rule violations found\n\nCannot create ref due to creations being restricted.\n\n"}, {"resource":"Release","code":"custom","field":"tag_name","message":"tag_name was used by an immutable release"}, {"resource":"Release","code":"custom","message":"Published releases must have a valid tag"} - Unable to attach assets to an immutable published release. Example failure
422 Cannot upload assets to an immutable release
To Reproduce
-
Tag already associated to immutable release
-
Delete tag, try to release again, it tries to create new tag with old one and can't because it was associated to an immutable release
-
The error is currently pretty informational
-
Do an immutable release that attaches assets after the release is published
-
It fails on the attach because the release is immutable
Expected behavior
-
Maybe check if the tag is already associated to an immutable release or the current error is good enough? 🤔
-
Create a draft release first, allow assets attach, then publish. Going to think through how we expose this to the end user.
Screenshots
No response
Additional context
No response