-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Migration with pull requests from other gitea instance fails #13262
Comments
looks like the account do not have access to the reactions endpoint ... - witch version the gitea instance you are migrationg from has? |
same version - 1.14.0+dev-18-gd453533be |
@lakostin can you tell me the url from the source, or send it to me via email if it should not get public? |
impossible cause it's in private network |
hmm I'll try to reproduce it somehow |
@lakostin sorry could not reproduce it for now ... |
i tried to migrate three different pull requests and all of them failed. maybe its connected with migrations during gitea update? Firstly i had an installation of 12 version of gitea and constantly updated it until the 14 version. is there any way to check it? maybe check db relations? |
@6543 ? |
@lakostin you can use the "doctor" command to check and fix things ( and two question:
|
yes, diff works fine for all pull requests in all these projects
no, all the repos are new |
do you mean v1.12.x to v1.14.0+dev ? If so what version sha is displayed? (example try.gitea.io show |
yes
1.14.0+dev-18-gd453533be |
2020/10/28 21:21:14 ...ules/task/migrate.go:65:func1() [E] DeleteRepository: repository does not exist [id: 4, uid: 1, owner_name: , name: ] |
So now you need to look on your instance that you're migrating from as to what is special about the reactions on pull #42 That is by looking at The error 403 is coming from there. |
I guess we should just probably not migrate the reactions if we get a 403 though - it's hardly a significant issue. |
Now the issue is why is the |
At least in master a Forbidden will predominantly come from:
Which could still be the case ... because this is a pull - and so the correct test is whether the |
#13344 will also fix that. |
still error: there are no reactions though... gitea=# select * from reaction where comment_id=5961; |
OK #13344 fixed one issue - which has revealed another issue - I've just submitted a second PR to fix that. The issue is not whether there are reactions or not - it's whether you would be allowed to read the issues or not. If you gave the user on the gitea you were migrating from access to read issues this problem would go away. If you were able to update the host gitea to have one of the backports - then similarly the problem would go away. |
Which number has the second PR?
I migrate repo with admin user.
|
@zeripath If I guess right the root of THIS specific issue is elsewhere (DB unique constrain) and cause by equal entrys ... caused by missing information on some reactions If you give me some time I'll file a pull against - still do not have mouch time to write pulls |
There very well maybe another equal entries bug - but this report is simply the permissions problem. |
after #13352 all migrations completed successfully with pull requests. thank you! |
1.14.0+dev-18-gd453533be
2.26.2
docker Alpine Linux
[x]
):2020/10/22 13:25:46 ...ules/task/migrate.go:64:func1() [E] DeleteRepository: repository does not exist [id: 208, uid: 75, owner_name: , name: ]
2020/10/22 13:25:46 modules/task/task.go:51:handle() [E] Run task failed: error while loading reactions: 403 Forbidden
Description
Migration without pull requests works fine for the same repo.
...
The text was updated successfully, but these errors were encountered: