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

Timeout with version >= 8 #943

Closed
anakin87 opened this issue Sep 26, 2023 · 6 comments
Closed

Timeout with version >= 8 #943

anakin87 opened this issue Sep 26, 2023 · 6 comments

Comments

@anakin87
Copy link

Hello!
This issue is similar to #913.

Background

Our package (farm-haystack) depends on an unmaintained package: seqeval, which uses setuptools_scm.

seqeval has the following configuration for setup (see setup.py):

setup configuration

setup(
name=NAME,
use_scm_version=True,
setup_requires=['setuptools_scm'],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
url=URL,
packages=find_packages(exclude=('tests',)),
install_requires=required,
extras_require={
'cpu': [],
'gpu': [],
},
include_package_data=True,
license=LICENSE,
...

Error

As of the release of setuptools_scm 8.0,
the installation of seqeval started to randomly fail on GitHub CI (using windows-latest).

Error message

Collecting seqeval (from farm-haystack==1.22.0rc0)
Downloading seqeval-1.2.2.tar.gz (43 kB)
---------------------------------------- 43.6/43.6 kB 2.1 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1

[61 lines of output]
running dist_info
creating C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info
writing C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info\PKG-INFO
writing dependency_links to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info\dependency_links.txt
writing requirements to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info\requires.txt
writing top-level names to C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info\top_level.txt
writing manifest file 'C:\Users\runneradmin\AppData\Local\Temp\pip-modern-metadata-q15h8b2q\seqeval.egg-info\SOURCES.txt'
ERROR setuptools_scm.file_finders.git listing git files failed - pretending there aren't any
Traceback (most recent call last):
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\build_meta.py", line 396, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 27, in
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools_init
.py", line 103, in setup
return distutils.core.setup(**attrs)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\dist_info.py", line 107, in run
self.egg_info.run()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 318, in run
self.find_sources()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 326, in find_sources
mm.run()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 548, in run
self.add_defaults()
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 589, in add_defaults
rcfiles = list(walk_revctrl())
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\overlay\Lib\site-packages\setuptools\command\sdist.py", line 18, in walk_revctrl
for item in ep.load()(dirname):
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\normal\Lib\site-packages\setuptools_scm_file_finders_init
.py", line 103, in find_files
res: list[str] = command(path)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\normal\Lib\site-packages\setuptools_scm_file_finders\hg.py", line 50, in hg_find_files
toplevel = _hg_toplevel(path)
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\normal\Lib\site-packages\setuptools_scm_file_finders\hg.py", line 18, in _hg_toplevel
res = _run(
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-2h3whv_b\normal\Lib\site-packages\setuptools_scm_run_cmd.py", line 138, in run
res = subprocess.run(
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\subprocess.py", line 495, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\subprocess.py", line 1028, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "c:\hostedtoolcache\windows\python\3.8.10\x64\lib\subprocess.py", line 1401, in _communicate
raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['hg', 'root']' timed out after 20 seconds
[end of output]

The problem seems related to the recently introduced timeout of 20 seconds (#808).


It would be great if you could help or suggest a workaround...

@RonnyPfannschmidt
Copy link
Contributor

The timeout will be increased,we learned that girl sometimes takes up to 25s,which exceeds the 20

@harendt
Copy link

harendt commented Sep 27, 2023

I suggest to remove the timeout or make it configurable/removable via an environment variable. The git commands can sometimes be quite slow, which may largely depend on the system (for example when using Windows, VMs, or Docker containers).

RonnyPfannschmidt added a commit that referenced this issue Sep 30, 2023
…-on-github

fix #943: extend default timeout to account for github ci issues
@anakin87
Copy link
Author

anakin87 commented Oct 6, 2023

Unfortunately, the new error message is
subprocess.TimeoutExpired: Command '['hg', 'root']' timed out after 40 seconds

@RonnyPfannschmidt
Copy link
Contributor

@anakin87 can the issue be sidestepped by involving hg before invoking the build step?

@anakin87
Copy link
Author

anakin87 commented Oct 6, 2023

@RonnyPfannschmidt thanks for the help...

I'm not an expert, but my impression is that I can do very little,
since we only install that problematic package (seqeval), which seems to be unmaintained.

If I am talking nonsense, please correct me and give me a suggestion...

@RonnyPfannschmidt
Copy link
Contributor

@anakin87 hg root is a command that takes less than a second,if it happens in your environment then sometimes just running the command can fix the issue wrt delay

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

3 participants