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

CI randomly fails many time in TestRepoStatsIndex #19162

Closed
wxiaoguang opened this issue Mar 22, 2022 · 0 comments · Fixed by #19225 or #19229
Closed

CI randomly fails many time in TestRepoStatsIndex #19162

wxiaoguang opened this issue Mar 22, 2022 · 0 comments · Fixed by #19225 or #19229

Comments

@wxiaoguang
Copy link
Contributor

This failure occurs in various PRs randomly, including a PR which only changes one line document.

2022/03/19 18:52:07 ...xer/stats/indexer.go:39:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2022/03/19 18:52:07 ...xer/stats/indexer.go:85:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
--- FAIL: TestRepoStatsIndex (5.66s)
    indexer_test.go:41: 
        	Error Trace:	indexer_test.go:41
        	Error:      	Not equal: 
        	            	expected: "65f1bf27bc3bf70f64657658635e66094edbcb4d"
        	            	actual  : ""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual

        	            	@@ -1 +1 @@
        	            	-65f1bf27bc3bf70f64657658635e66094edbcb4d
        	            	+
        	Test:       	TestRepoStatsIndex
FAIL

coverage: 60.2% of statements

2022/03/19 18:52:13 ...age_stats_nogogit.go:86:func2() [E] Unable to open checker for 3aa73c3499bff049a352b4e265575373e964b89a. Error: failed to run attr-check. Error: exit status 128
	Stderr: fatal: Unable to read current working directory: No such file or directory

2022/03/19 18:52:13 ...it/repo_attribute.go:220:func1() [E] CheckPath returns error: context canceled
FAIL	code.gitea.io/gitea/modules/indexer/stats	12.712s
zeripath added a commit to zeripath/gitea that referenced this issue Mar 27, 2022
So whilst go-gitea#19225 fixes one issue it caused another. We need to initialise the Git
module first.

Related go-gitea#19225
Fix go-gitea#19162

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Mar 27, 2022
So whilst go-gitea#19225 fixes one issue it caused another. We need to initialise the Git
module first.

Related go-gitea#19225
Fix go-gitea#19162

Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this issue Mar 27, 2022
So whilst #19225 fixes one issue it caused another. We need to initialise the Git
module first.

Related #19225
Fix #19162

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
6543 pushed a commit that referenced this issue Mar 27, 2022
)

Backport #19225
Backport #19229

The RepoIndexerTest is failing with considerable frequency due to a race inherrent in
its design. This PR adjust this test to avoid the reliance on waiting for the populate
repo indexer to run and forcibly adds the repo to the queue. It then flushes the queue.

It may be worth separating out the tests somewhat by testing the Index function
directly away from the queue however, this forceful method should solve the current
problem.

Fix #19162

Signed-off-by: Andrew Thornton <art27@cantab.net>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
So whilst go-gitea#19225 fixes one issue it caused another. We need to initialise the Git
module first.

Related go-gitea#19225
Fix go-gitea#19162

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant