Description
Description
The web UI does not allow deleting tags that are associated with an existing release. However, it can be done via the git client. Doing so turns the release into a draft release. Pushing the tag again does not fix the release.
Steps to reproduce
- Create a repository with some content and clone it locally
- Add a tag:
git tag test
- Push the tag:
git push origin test
- Create a release for the tag
- Delete the tag on the server:
git push origin --delete test
- Observe that the release is now a "draft"
- Push the tag again:
git push origin test
- Observer that the release is still a "draft"
Observations
When pushing the tag a second time, the following message is logged:
2024/11/05 17:48:34 ...s/repository/push.go:40:handler() [E] pushUpdate[user/example-repo] failed: PushUpdateAddDeleteTags: Insert: pq: duplicate key value violates unique constraint "UQE_release_n"
I can't provide more detailed logs at the moment. I can set up a test environment, though, if necessary.
This is a regression. We upgraded from 1.21.x, which did not show this behaviour. Unfortunately, I did not make note which exact version we used before.
Use case
I realise deleting are re-creating tags from the command line seems like an odd thing to do. We do it as part of a nightly build pipe line, which builds binaries and attaches them to a moving tag and release named latest
.
Gitea Version
1.22.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.39.2
Operating System
Debian GNU/Linux
How are you running Gitea?
Official release binary, started via systemd
Database
PostgreSQL