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

Maximum time to expand globs #5967

Open
jayvdb opened this issue Jan 24, 2019 · 5 comments · May be fixed by #6171
Open

Maximum time to expand globs #5967

jayvdb opened this issue Jan 24, 2019 · 5 comments · May be fixed by #6171

Comments

@jayvdb
Copy link
Member

jayvdb commented Jan 24, 2019

There should be a setting for max time to expand globs, and an error if glob expansion takes longer than the setting.

Default should be one minute.

See #5966 for background about why.

Low difficulty for only emitting an error if the max was exceeded.

Medium difficulty to also stop expanding the glob when the max is exceeded, i.e. for it to be a timeout.

As a follow up issue, to be created after this is completed, coala should stop processing only effected sections, and continue processing unaffected sections. Thus is needs to determine which sections would be effected by the glob.

@Vaibhav911
Copy link

I would like to work on this one. Can someone assign me this?

@rajgoesout
Copy link
Member

Does expand glob mean expand the pathname?

@budukhyash
Copy link
Member

I have been through this issue as well as the referenced issues and inferred that some folders like node_modules which usually contain 3rd party packages does not need to be analysed.So we skip these folders also we need to add an option so that glob expansion does not continue longer than a minute.I searched about globbing and adding time constraints to it.I also went through globbing.py.I have started with the codebase.Please can you give some hints to approach the problem.
@jayvdb @li-boxuan

@budukhyash
Copy link
Member

@jayvdb Sir I have started with the codebase and I think I need to add changes to the Globbing.py file
Can you please give some hints ?

@harshhx17
Copy link
Contributor

@budukhyash
Are you still working on it??
If not can I take this issue

PrasanthChettri added a commit to PrasanthChettri/coala that referenced this issue Jun 7, 2021
Added a decorator for glob evaluating functions that sets up an
upper time limit(60 secs for now) for the functions to evaluate the glob
or else Error with an exception

Fixes : coala#5967
@PrasanthChettri PrasanthChettri linked a pull request Jun 7, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants