ray-project / ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
34k stars 5.78k forks source link

Dashboard / Jobs RegexMatcher ignores "includes". #28502

Open dirkweissenborn opened 2 years ago

dirkweissenborn commented 2 years ago

What happened + What you expected to happen

Ray doesn't respect negated patterns when setting up excludes in runtime_env. The reason is that includes is never used in the regex matcher here: https://github.com/ray-project/ray/blob/master/python/ray/_private/thirdparty/pathspec/pattern.py#L128

Versions / Dependencies

2.0

Reproduction script

Not necessary.

Issue Severity

Medium: It is a significant difficulty but I can work around it.

rkooo567 commented 2 years ago

cc @architkulkarni ?

architkulkarni commented 2 years ago

Thanks @dirkweissenborn, could you please give an example? Are you saying this is a bug in how the pathspec library interprets !?

dirkweissenborn commented 2 years ago

Sorry for not being more explicit.

The problem is that negation doesn't work. So writing something like "!.py" as a pattern to exclude should exclude everything but .py files. It doesn't. The reason it doesn't (i think) is the line i linked. The match is computed on the not negated pattern (".py") but the "include" attribute is not taken into consideration.

On Wed, Sep 14, 2022, 20:26 Archit Kulkarni @.***> wrote:

Thanks @dirkweissenborn https://github.com/dirkweissenborn, could you please give an example? Are you saying this is a bug in how the pathspec library interprets !?

— Reply to this email directly, view it on GitHub https://github.com/ray-project/ray/issues/28502#issuecomment-1247147641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKTUG5XD44N7OJ3B5MU72DV6IKF7ANCNFSM6AAAAAAQMGY64I . You are receiving this because you were mentioned.Message ID: @.***>