Skip to content

Gitea v1.18 does not show new commits in dashboard and PR's #22319

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

Closed
achikhv opened this issue Jan 3, 2023 · 8 comments
Closed

Gitea v1.18 does not show new commits in dashboard and PR's #22319

achikhv opened this issue Jan 3, 2023 · 8 comments
Labels

Comments

@achikhv
Copy link

achikhv commented Jan 3, 2023

Description

It seems that gitea v1.18 stopped detecting pushed commits for me. Commits are not shown in dashboard and in pull requests.

For example, I have a PR with conflicted file. I resolve it and push new commit to repository. I see new commit in repo browser. But PR's page still shows only old commits and detects conflict which are not there anymore.

Here is screenshot of branch's repo browser:

2023-01-03_11-34-40

There is new commit.

And here is PR for this branch:
2023-01-03_11-35-17

There are only commits which were there at the time PR was created. New commits are missing.

Everything was working fine in v.1.17.4. After upgrade to v1.18.0 I enabled repo indexer. But tested new commits with indexer disabled again, and still new commits are nor reflected in dashboard or pr's.

I cannot reproduce it in try.gitea.io, it works as expected there.

Help me please to get it working again. Thanks in advance!

Gitea Version

1.18.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Windows Server 2019

How are you running Gitea?

Running as windows service. Downloaded it from
https://dl.gitea.io/gitea/1.18.0/gitea-1.18.0-windows-4.0-amd64.exe

Database

MSSQL

@lunny
Copy link
Member

lunny commented Jan 4, 2023

Can you find any error logs in the log file or console log?

@achikhv
Copy link
Author

achikhv commented Jan 5, 2023

Hi!

There are no errors in gitea.log or console when I push commits. But after upgrade there are lots of errors concerning CI/CD user:

2023/01/05 10:16:12 ...s/context/context.go:669:func1() [E] [63b616cc-3] Failed to verify user [192.168.1.10:55108]:0: user does not exist [uid: 11, name: lersbuild, keyid: 0]

Console shows same error:

2023/01/05 10:23:13 [63b61871-4] router: completed GET /LersUchet/sqls2pg.git/info/refs?service=git-upload-pack for [192.168.1.10:55419]:0, 401 Unauthorized in 32.9ms @ context/context.go:665(context.Auth)

This errors are not directly connected to pushing. They occur from time to time when teamcity checks for repo updates.

@achikhv
Copy link
Author

achikhv commented Jan 7, 2023

I tried to setup empty gitea instance in SQL Server 2019 Standard edition. The error is still there, no new commits are shown in dash or PRs. But cleaner logs gave me a hint to what was going on.

See the log's excrept:

2023/01/07 11:00:53 [63b8c445] router: completed GET /chichkov/test.git/info/refs?service=git-receive-pack for [164.138.90.67:1584]:0, 401 Unauthorized in 9.9ms @ repo/http.go:532(repo.GetInfoRefs)
2023/01/07 11:00:53 [63b8c445-2] router: completed GET /chichkov/test.git/info/refs?service=git-receive-pack for [164.138.90.67:1584]:0, 200 OK in 98.4ms @ repo/http.go:532(repo.GetInfoRefs)
2023/01/07 11:00:55 [63b8c445-4] router: completed POST /chichkov/test.git/git-receive-pack for [164.138.90.67:1584]:0, 200 OK in 2032.9ms @ repo/http.go:500(repo.ServiceReceivePack)

I guess that gitea treats me as unauthorized user to add commit details in db, but still adds new commits to repo.

I saw similar issue #22317 where @CodeDoctorDE confirmed it wasn't gitea's bug. But in my situation I can't see what I am doing wrong. I set up brand new gitea database in SQL2019, created user, repo and tried to push.

@lunny
Copy link
Member

lunny commented Jan 7, 2023

keyid:

ref: services/auth/source/db/authenticate.go

	if !user.IsPasswordSet() || !user.ValidatePassword(password) {
		return nil, user_model.ErrUserNotExist{UID: user.ID, Name: user.Name}
	}

The user exist, but the password is not set or the password is wrong.

@achikhv
Copy link
Author

achikhv commented Jan 7, 2023

Well, the password is definitely set. Here are my steps:

  1. Create new gitea instance with empty db on SQL2019 (Std).
  2. Call gitea admin user create --username chichkov --password 111111 --email [email protected]
  3. Successfully log in.
  4. Create empty repo.
  5. Checkout new repo. Git asked for login and pass. I provided ones from p2.
  6. Made a commit and pushed. Repeated it couple of times.

Dashboard shows only created repo, but no new commits. And console log shows unauthenticated every time.

Then I tried same steps on 1.17.4 and it worked as expected, no authentication errors are logged.

I can't see if there is any real problem with authenticating user. Commit is eventually pushed to repository, but no information is updated in database. Looks like checking for authentication fails first time and succeeds for the second time, or vice versa.

@techknowlogick
Copy link
Member

Dashboard shows only created repo, but no new commits.

This means that push hooks are not being run (https://docs.gitea.io/en-us/faq/#push-hook--webhook-arent-running may be helpful). It may work on the old version and not the new in the case that the binary is not named the same.

@achikhv
Copy link
Author

achikhv commented Jan 7, 2023

@techknowlogick , thank's for your reply! Tried to run "Resynchronize pre-receive, update and post-receive hooks of all repositories", but still no success. Gitea v18 does not show commits in dashboard, while gitea v17 does. Binary is always the same. I looked through hooks, and it seems that all paths are correct.

Gitea is running on windows, and gitea's account has execute permission on repo's directory.

Will rollback to v1.17.4 again :(

@achikhv
Copy link
Author

achikhv commented Jan 7, 2023

@lunny, @techknowlogick, thanks for helping me!

The hooks are actually called by git. But after running through process explorer I noticed that gitea execute requests to mdaemon services.

Our services were misconfigured. Gitea and mdaemon web was running on the same 3000 port, but bound to different interfaces. This misconfiguration was somehow working in 1.17 and broke down after upgrade to 1.18.

Changed gitea to free port and everything works as expected now.

Thank you very much!

@achikhv achikhv closed this as completed Jan 7, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants