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

[Bug] g.extension test often times out in CI #2979

Closed
wenzeslaus opened this issue May 24, 2023 · 5 comments · Fixed by #3051
Closed

[Bug] g.extension test often times out in CI #2979

wenzeslaus opened this issue May 24, 2023 · 5 comments · Fixed by #3051
Labels
bug Something isn't working
Milestone

Comments

@wenzeslaus
Copy link
Member

Describe the bug

The scripts/g.extension/testsuite/test_addons_download.py test times out quite often.

Duration of a successful execution in the CI is 1 min 42 sec. The time out is currently set to 4 mins.

To Reproduce

Hard to say if this specific issue can be reproduced locally, but happens quite often on main and in PRs at least for the macOS job.

Locally, the test fails for me and runs around 3 min 20 sec, but given that test_github_download_official_module_src_code_only test (function) fails, I don't know if the longer run time is relevant to the CI issue.

Expected behavior

Test always finishes successfully in the given time limit (whatever that is).

Screenshots

Running ./scripts/g.extension/testsuite/test_addons_download.py...
========================================================================
WARNING: Bug in UI description. Missing module description
.......========================================================================
FAILED ./scripts/g.extension/testsuite/test_addons_download.py - Timeout >300.0s

System description

  • Operating System: macOS in CI virtual machine
  • GRASS GIS version: main
@wenzeslaus wenzeslaus added the bug Something isn't working label May 24, 2023
@tmszi
Copy link
Member

tmszi commented May 25, 2023

With using new git sparse-checkout getting last commit with git log -1 takes quite a long time (instead of calling GitHub REST API) during addon installation. And that's the source of the problem, why the tests time out.

Example:

test@test:/tmp$ git clone --no-checkout --branch grass8 --filter=tree:0 https://github.com/OSGeo/grass-addons.git

test@test:/tmp$ cd grass-addons/ && git sparse-checkout init && git sparse-checkout set src/vector/v.surf.tps/ 

test@test/tmp/grass-addons$ git checkout grass8

test@test:/tmp/grass-addons$ time git log -1 src/vector/v.surf.tps/

real	0m35.294s
user	0m0.710s
sys	0m0.296s

Get v.surf.tps addon last commit take 35 s.

@wenzeslaus
Copy link
Member Author

Do you have time to estimate the time either locally or by downloading couple of test results from CI and then increasing the time limit? ...maybe just increasing the time for macOS in this case (I think it still has a separate config file).

@tmszi
Copy link
Member

tmszi commented Jun 7, 2023

Do you have time to estimate the time either locally or by downloading couple of test results from CI and then increasing the time limit? ...maybe just increasing the time for macOS in this case (I think it still has a separate config file).

I ran the test locally and the time result is 12m.

Ran 9 tests in 741.623s
OK

real	12m21.752s

@ninsbl
Copy link
Member

ninsbl commented Jun 7, 2023

It may be related to the version of git and there may be ways to I.prove the performance of git log:
https://stackoverflow.com/questions/35186829/how-to-improve-git-log-performance

@tmszi
Copy link
Member

tmszi commented Jun 7, 2023

It may be related to the version of git and there may be ways to I.prove the performance of git log: https://stackoverflow.com/questions/35186829/how-to-improve-git-log-performance

git log -1 is fast with fully cloned repository, but is slowly if repo is cloned with git clone --no-checkout --branch grass8 --filter=tree:0 and git sparse-checkout init is used.

My Git version is 2.39.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants