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

404 when reviewing/creating PRs #4377

Closed
2 of 7 tasks
rossigee opened this issue Apr 3, 2017 · 17 comments
Closed
2 of 7 tasks

404 when reviewing/creating PRs #4377

rossigee opened this issue Apr 3, 2017 · 17 comments
Labels
💊 bug Something isn't working 💻 ui You ruined my eyes!

Comments

@rossigee
Copy link
Contributor

rossigee commented Apr 3, 2017

  • Gogs version (or commit ref): 0.10.34.0401 / 0.11 RC
  • Git version: as per latest Docker image
  • Operating system: Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist (usually found in log/gogs.log):

2017/04/03 08:11:44 [TRACE] Session ID: 849f6bee671377d2
2017/04/03 08:11:44 [TRACE] CSRF Token: zFr1fBNdQSz6QKK3vv3yovCnihA6MTQ5MTE5OTQ4ODI5MzM4NzI4OQ==
2017/04/03 08:11:46 [TRACE] Template: status/404

Description

Unable to create or review PRs. It just comes back with 404 page. Example URI...

https://gogs.mydomain.com/myproject/myrepo/compare/master...feature-3963-events-model

@unknwon
Copy link
Member

unknwon commented Apr 3, 2017

Can you reproduce the bug at https://try.gogs.io:
No

Why?

@unknwon unknwon added the status: needs feedback Tell me more about it label Apr 3, 2017
@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Because it works at that URL, just not on my instance :)

Thinking back, I upgraded the Docker container (gogs/gogs official container) twice in the last month or so to fix other bugs, and it's started being a problem since then. I suspect it could be a database migration failure. However, I see nothing in the log files that would confirm/deny that as the cause (just the three TRACE lines, quoted above), otherwise I could attempt to identify and apply the missing

If there were SQL errors, where would I find them?

If I can identify it as a missing field/table/schema update, where can I find the migration queries run between versions so I can attempt to manually apply them to fix our instance?

Cheers for all your work on GOGS, btw.

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

Please provide reproduce steps.

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

At this point, I don't think it's a bug in GOGS, so it probably can't be reproduced elsewhere.

This is more of a request for support now, to help me (and maybe others) to identify and resolve 404 errors that might be caused by broken database migrations.

I do have an older backup I can use as a last resort, but if this can be fixed manually with a little investigation/debugging and some SQL updates, without losing any data, that would be the best option.

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

  1. This is not a place for user support
  2. I have absolutely no context about why should https://gogs.mydomain.com/myproject/myrepo/compare/master...feature-3963-events-model not be 404.
  3. It is Gogs :trollface:

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

I would be interested to know why GOGS shows an ambiguous 404 error rather than a more explanatory error message. Also, why nothing in the log files to explain - what can't it find?

I'm not a go developer, but am curious enough that if you can tell me where I can add debug lines to narrow it down, I'd be happy to try.

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Where's a better place for support questions?

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

If you have read issue post template, it is https://discuss.gogs.io/

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Apologies. To begin with, I was thinking it was a bug. I'll raise the issue there instead.

@rossigee rossigee closed this as completed Apr 4, 2017
@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

As a user, you should explain why something should happen the way you expect. Otherwise I can't help you solve the problem because I have no idea what is going on.

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

You mean like...?

Click on 'pull request' from branches view.

Expected behaviour: Display PR form to provide more details.
Actual behaviour: Ambiguous 404 error with no error message or log entries.

You're right, that would have been more helpful, but your bug report form doesn't ask for that specifically. I just answered the questions it asked and tried to provide as much information as I could (which wasn't much!).

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

OK, I might know the problem. Has your repository disabled pull request?

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

I reproduced the problem if I disable pull request for my repository, the button on branches page shouldn't be showed at all.

Patch has pushed to fix this issue, please test on develop branch or https://try.gogs.io.

@unknwon unknwon reopened this Apr 4, 2017
@unknwon unknwon added 💊 bug Something isn't working 💻 ui You ruined my eyes! labels Apr 4, 2017
@unknwon unknwon added this to the 0.12 milestone Apr 4, 2017
@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Yes, the 'enable pull requests' tickbox was unticked. I've ticked it and I can now create new pull requests and review ones that were created before the upgrade. Thank you!

So, PRs were working fine in previous versions, then one recent upgrade introduced this new tickbox, which defaults to false, which broke our ability to access PRs that were already open.

I have a couple of suggestions :

  1. Instead of presenting 404 if PRs are disabled for a repo:
    a) present an error message saying 'PRs are not enabled on this repository', and perhaps allow for any existing PRs to still be processed or otherwise cleared down.
    b) If PRs are not enabled, remove the 'pull request' button from the branches view :)

  2. Change the wording in the settings to just 'Enable pull requests', as 'Enable pull requests to accept public contributions' sounds wrong if it is a private repository, not a public one.

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Wow! You work fast. You fixed it in the code before I'd finished typing it up on this ticket :)

@unknwon
Copy link
Member

unknwon commented Apr 4, 2017

This button has been there for quite ... a few months. And the default is ... true.

@rossigee
Copy link
Contributor Author

rossigee commented Apr 4, 2017

Odd. I can only presume someone unticked it by mistake, perhaps confused because they thought it would allow to 'accept public contributions'.

Anyway, thanks again. Problem now solved at our end.

@unknwon unknwon removed the status: needs feedback Tell me more about it label Apr 4, 2017
@unknwon unknwon closed this as completed Apr 4, 2017
richmahn referenced this issue in unfoldingWord/dcs Feb 4, 2019
Signed-off-by: Jonas Franz <info@jonasfranz.software>
@unknwon unknwon removed this from the 0.13 milestone Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working 💻 ui You ruined my eyes!
Projects
None yet
Development

No branches or pull requests

2 participants