Codeberg/Community
54
325
Fork
You've already forked Community
12

Clickin on pull request cause 500 internal server error #1517

Closed
opened 2024年03月26日 09:07:37 +01:00 by notanamber · 14 comments

Comment

Hello,

when i click on the pull request in my repository i receive an internal server error.
The page can be found at

https://codeberg.org/notanamber/nerd_tree/pulls

The specific link is this:

notanamber/nerd_tree#2

Have a good work

### Comment Hello, when i click on the pull request in my repository i receive an internal server error. The page can be found at https://codeberg.org/notanamber/nerd_tree/pulls The specific link is this: https://codeberg.org/notanamber/nerd_tree/pulls/2 Have a good work

If it is a migrated pull request, might be the same as this: #1472.

If it is a migrated pull request, might be the same as this: #1472.

Hello,

the pull request was made directly on codeberg, but the repository is a mirror of another gitea repository.
Maybe is this the problem?

Thanks

Hello, the pull request was made directly on codeberg, but the repository is a mirror of another gitea repository. Maybe is this the problem? Thanks

: the pull request was made directly on codeberg, but the repository is a mirror of another gitea repository.

Hi, "another Gitea repository"? How are you mirroring the repository?

: the pull request was made directly on codeberg, but the repository is a mirror of another gitea repository. Hi, "another Gitea repository"? How are you mirroring the repository?
Owner
Copy link
GetRefCommitID, object does not exist [id: refs/pull/2/head, rel_path: ]

the typical thing, this started to happen quite often from my subjective perspective.

~~~ GetRefCommitID, object does not exist [id: refs/pull/2/head, rel_path: ] ~~~ the typical thing, this started to happen quite often from my subjective perspective.

I strangely cannot find how this pull request was made. The expected web route and api route come up empty handed in the logs. I've fixed the issue manually for the time being, nothing points to anything abnormal (database models of this PR looks correct and nothing seems to have been done to this PR) other than the origin of the creation of this PR cannot be found, at least by me.

I strangely cannot find how this pull request was made. The expected web route and api route come up empty handed in the logs. I've fixed the issue manually for the time being, nothing points to anything abnormal (database models of this PR looks correct and nothing seems to have been done to this PR) other than the origin of the creation of this PR cannot be found, at least by me.
Owner
Copy link

@crystal recently said:

When I had that problem it was caused by another instance push mirroring to Codeberg. I removed the push mirror and made a CI pipeline push all the refs and tags from the source repo instead. The push mirror uses the --mirror option in git, which is bad because it deletes refs that exist in the target repo and not in the source repo. This obviously includes the refs that keep track of PR HEADs

I believe this is related?!

the repository is a mirror of another gitea repository.
Maybe is this the problem?

I think it is. However, mirrors are a common feature and should probably not break our repos? How can we approach this problem?

@crystal recently said: > When I had that problem it was caused by another instance push mirroring to Codeberg. I removed the push mirror and made a CI pipeline push all the refs and tags from the source repo instead. The push mirror uses the --mirror option in git, which is bad because it deletes refs that exist in the target repo and not in the source repo. This obviously includes the refs that keep track of PR HEADs I believe this is related?! > the repository is a mirror of another gitea repository. Maybe is this the problem? I think it is. However, mirrors are a common feature and should probably **not** break our repos? How can we approach this problem?

It seems to be related as notanamber/nerd_tree#2 is once again resulting in 500 error.

It seems to be related as https://codeberg.org/notanamber/nerd_tree/pulls/2 is once again resulting in 500 error.
Owner
Copy link

@notanamber We would like to better understand your use case of mirroring into a repository that accepts pull request. Obviously, you cannot merge the pull requests anyway, because the mirror would overwrite the changes. Modifying a mirror does not really work, because it obviously assumes the other side to be the source of truth.

How is your workflow with regards to these pull requests?

@notanamber We would like to better understand your use case of mirroring into a repository that accepts pull request. Obviously, you cannot merge the pull requests anyway, because the mirror would overwrite the changes. Modifying a mirror does not really work, because it obviously assumes the other side to be the source of truth. How is your workflow with regards to these pull requests?

@notanamber We would like to better understand your use case of mirroring into a repository that accepts pull request. Obviously, you cannot merge the pull requests anyway, because the mirror would overwrite the changes. Modifying a mirror does not really work, because it obviously assumes the other side to be the source of truth.

How is your workflow with regards to these pull requests?

The primary repository is here:

https://gitea.it/notanamber/nerd_tree

i setup a token here with all permission and the i setup the options for the mirroring, i attach my panel.
As I told you the pull request coming from codeberg repository.

In your opinion do it is better to remove the repository at gitea.it and use directly those in codeberg?
Thanks

> @notanamber We would like to better understand your use case of mirroring into a repository that accepts pull request. Obviously, you cannot merge the pull requests anyway, because the mirror would overwrite the changes. Modifying a mirror does not really work, because it obviously assumes the other side to be the source of truth. > > How is your workflow with regards to these pull requests? The primary repository is here: https://gitea.it/notanamber/nerd_tree i setup a token here with all permission and the i setup the options for the mirroring, i attach my panel. As I told you the pull request coming from codeberg repository. In your opinion do it is better to remove the repository at gitea.it and use directly those in codeberg? Thanks
Owner
Copy link

This depends on your usecase. What will you do if there was a pull request here on Codeberg (assuming it wouldn't break). Would you merge it? Because in this case, the next mirror run from gitea.it would undo the change again.

I think mirrors are only used for one-directional syncing. You have "one source of truth", and you cannot do modifications in the other places unfortunately.

This depends on your usecase. What will you do if there was a pull request here on Codeberg (assuming it wouldn't break). Would you merge it? Because in this case, the next mirror run from gitea.it would undo the change again. I think mirrors are only used for one-directional syncing. You have "one source of truth", and you cannot do modifications in the other places unfortunately.

In the meantime, thank you for your explanations, I think I understand the problem.
I would like to merge only pull requests from codeberg and make the repository on codeberg the primary one.

Do you know if it is possible to make the repository on codeberg independent of the one on gitea.it?
Have a good day

In the meantime, thank you for your explanations, I think I understand the problem. I would like to merge only pull requests from codeberg and make the repository on codeberg the primary one. Do you know if it is possible to make the repository on codeberg independent of the one on gitea.it? Have a good day
Owner
Copy link

I think you don't have to do anything on Codeberg's side, but you have to stop the mirror on gitea.it (or remove the credentials on Codeberg if you don't have access to it for some reason). I think this should be enough.

We are trying to think about a solution for accidentally overwriting the pull request information, though.

I think you don't have to do anything on Codeberg's side, but you have to stop the mirror on gitea.it (or remove the credentials on Codeberg if you don't have access to it for some reason). I think this should be enough. We are trying to think about a solution for accidentally overwriting the pull request information, though.

Thanks for the help, i will try it

Thanks for the help, i will try it

I have the same usecase.

May I elaborate on the motivation? I want https://indieweb.org/POSSE and welcome 3rd party contributions at the same time. I am aware that I have to merge the pull request into the mirror source.

The pull request page 500ing makes this harder.

I have the same usecase. May I elaborate on the motivation? I want https://indieweb.org/POSSE and welcome 3rd party contributions at the same time. I am aware that I have to merge the pull request into the mirror source. The pull request page 500ing makes this harder.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#1517
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?