Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a tag for a release breaks the release #32427

Open
s-hamann opened this issue Nov 5, 2024 · 0 comments · May be fixed by #32435
Open

Deleting a tag for a release breaks the release #32427

s-hamann opened this issue Nov 5, 2024 · 0 comments · May be fixed by #32435
Labels

Comments

@s-hamann
Copy link
Contributor

s-hamann commented Nov 5, 2024

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

  1. Create a repository with some content and clone it locally
  2. Add a tag: git tag test
  3. Push the tag: git push origin test
  4. Create a release for the tag
  5. Delete the tag on the server: git push origin --delete test
  6. Observe that the release is now a "draft"
  7. Push the tag again: git push origin test
  8. 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

@Zettat123 Zettat123 linked a pull request Nov 6, 2024 that will close this issue
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 a pull request may close this issue.

1 participant