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

v1.13 regression causing action to run infinitely #124

Closed
bb1950328 opened this issue May 2, 2021 · 5 comments
Closed

v1.13 regression causing action to run infinitely #124

bb1950328 opened this issue May 2, 2021 · 5 comments

Comments

@bb1950328
Copy link

In this run, the "Publish Catch2 Test Results" action runs until the timeout of 6 hours.
In this run, I set the version back to 1.12 and the action behaves correctly.

The stacktrace suggests that there's an infinite loop when crawling files:

Traceback (most recent call last):
  File "/action/publish_unit_test_results.py", line 212, in <module>
    main(settings)
  File "/action/publish_unit_test_results.py", line 65, in main
    files = get_files(settings.files_glob)
  File "/action/publish_unit_test_results.py", line 47, in get_files
    for files_glob in multiline_files_globs
  File "/action/publish_unit_test_results.py", line 48, in <setcomp>
    for file in glob(files_glob[1:], recursive=True)
  File "/usr/local/lib/python3.6/glob.py", line 20, in glob
    return list(iglob(pathname, recursive=recursive))
  File "/usr/local/lib/python3.6/glob.py", line 71, in _iglob
    for dirname in dirs:
  File "/usr/local/lib/python3.6/glob.py", line 72, in _iglob
    for name in glob_in_dir(dirname, basename, dironly):
  File "/usr/local/lib/python3.6/glob.py", line 110, in _glob2
    yield from _rlistdir(dirname, dironly)
  File "/usr/local/lib/python3.6/glob.py", line 138, in _rlistdir
    for y in _rlistdir(path, dironly):
  File "/usr/local/lib/python3.6/glob.py", line 138, in _rlistdir
    for y in _rlistdir(path, dironly):
  File "/usr/local/lib/python3.6/glob.py", line 138, in _rlistdir
    for y in _rlistdir(path, dironly):
  [Previous line repeated 13 more times]
  File "/usr/local/lib/python3.6/glob.py", line 139, in _rlistdir
    yield os.path.join(x, y)
KeyboardInterrupt

Relevant section of my workflow yml:

- name: Publish Unit Test Results
  uses: EnricoMi/publish-unit-test-result-action@v1.12
  with:
    files: ./**/*.xml
    check_name: Catch2 Test Results
    comment_title: Catch2 Test Results
@EnricoMi
Copy link
Owner

EnricoMi commented May 2, 2021

Thank you very much for raising this issue. I have reverted that feature and released v1.14. I will investigate that and add some more test cases.

@bb1950328
Copy link
Author

Thank you for your very fast response. I can confirm that v1.14 works correctly.

@EnricoMi
Copy link
Owner

EnricoMi commented May 3, 2021

I have fixed the feature and released a new version. Please give it a try.

The problem was that the pattern was turned into /**/*.xml, which 1) iterates through the entire filesystem and 2) there are some symmetric link cycles, which explodes the number of visited paths.

Thanks for raising this so quickly. I hope everything works smooth with file patterns now.

@bb1950328
Copy link
Author

v1.15 works.
Thank you very much for fixing this so quickly.

@EnricoMi
Copy link
Owner

EnricoMi commented May 3, 2021

Thanks again for the quick and detailed bug report. Sorry for the disruption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants