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

API: create repo with invalid label set hangs gitea #14327

Closed
2 of 6 tasks
noerw opened this issue Jan 13, 2021 · 8 comments · Fixed by #14384
Closed
2 of 6 tasks

API: create repo with invalid label set hangs gitea #14327

noerw opened this issue Jan 13, 2021 · 8 comments · Fixed by #14384
Assignees
Labels
modifies/api This PR adds API routes or modifies them type/bug
Milestone

Comments

@noerw
Copy link
Member

noerw commented Jan 13, 2021

Description

Using the API to create a repo with a non-existent label-set makes gitea hang, and leaves a partially initialized repo.

On gitea.com the repo is partially created, and an empty error message is returned.
Testing locally with 9659808, Gitea hangs indefinitely instead of finishing the request.

Following requests give repository files already exist.

To reproduce:

tea repo create --name foo --labels asdfasdf404

ref: https://gitea.com/gitea/gitea.com/issues/21

@noerw noerw added modifies/api This PR adds API routes or modifies them type/bug labels Jan 13, 2021
@noerw noerw added this to the 1.14.0 milestone Jan 13, 2021
@lunny
Copy link
Member

lunny commented Jan 13, 2021

I got the error message

2021/01/14 00:27:01 Failed to run app with [tea repo create --login=local --name foo --labels asdfasdf404]: InitializeLabels: Failed to load label template file 'asdfasdf404': GetRepoInitFile: Asset file does not exist: label/asdfasdf404

@lunny
Copy link
Member

lunny commented Jan 13, 2021

When create a repository with labels, opts.IssueLabels is the label template name but not labels themselves. So I think the response error Failed to load label template file 'asdfasdf404' is right.

@lunny lunny modified the milestones: 1.14.0, 1.13.2 Jan 14, 2021
@lunny
Copy link
Member

lunny commented Jan 14, 2021

@noerw I can confirm the bug also affect v1.13 so I changed the milestone.

@6543
Copy link
Member

6543 commented Jan 18, 2021

could not reporduce it, so #14384 is only a draft ... would be nice if those who can reproduce could test it ...

@6543
Copy link
Member

6543 commented Jan 18, 2021

Edit: I think this is a sqlite deadlock ...
wait ... I'll setup a extra test instance

@lunny
Copy link
Member

lunny commented Jan 18, 2021

The problem is the parameter of tea think it's a label value, but Gitea think the parameter is a label set template name.

@6543
Copy link
Member

6543 commented Jan 18, 2021

This is caused by a weak struct field description ... changed this in my pull too

Gitea should not freeze anyway ...

@6543
Copy link
Member

6543 commented Jan 18, 2021

#14384 is ready 🚀

@go-gitea go-gitea locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants