robotframework / RIDE

Test data editor for Robot Framework
Apache License 2.0
964 stars 380 forks source link

Ride detects changed files in excluded directories #2597

Closed plumbum-se closed 1 year ago

plumbum-se commented 1 year ago

Even if a directory is marked as Excluded, like below image

Ride still detects changes if I for example add a file in the blue marked directory: image

RIDE v2.0.5 running on Python 3.10.11.

HelioGuilherme66 commented 1 year ago

Thanks for the reporting.

The original exclusion algorithm is only contemplating project, test cases, to be excluded from Tree and Running. The file change detection is a newer feature, and we did not relate with the exclusion. There is also a unwanted effect that is when we open another test suite, we get the changed files popup.

I make this to be an improvement to implement.

plumbum-se commented 1 year ago

đź‘Ť Looking forward to the solution.

JFoederer commented 1 year ago

This might not be related to the exclusion algorithm, since it also happens without any exclusions as commented here: https://github.com/robotframework/RIDE/issues/2611#issuecomment-1628211387

@plumbum-se which operating system are you running on?

JFoederer commented 1 year ago

Note that the referenced issue did resolve the wrong workspace being loaded, but it did not resolve the false detection on file changes.

plumbum-se commented 1 year ago

@plumbum-se which operating system are you running on?

I'm running on Microsoft Windows 11 Enterprise.

HelioGuilherme66 commented 1 year ago

@plumbum-se @JFoederer This will be fixed (and implemented in v2.0.8dev10). Please test in Windows and macOS, because I could only test in Linux (Fedora 38). The filesystem changes detection behaved differently in the three operating systems.

JFoederer commented 1 year ago

Unfortunately it doesn't appear to be fixed yet on Windows 11. After opening RIDE, automatically opening the last open project and switching to one from the recent history, I now get this pop-up window. image

So, something changed, but it isn't fixed.

HelioGuilherme66 commented 1 year ago

@JFoederer I see. That is an expected error on Windows, according to documentation of the function. I did change the code to "listen for changes" in individual files, but this is not supported in Windows. The original code "listens to the directory where the file is". This is why we see unexpected "file" changes when in Windows.

I will revert those changes and users need to know this limitation.

JFoederer commented 1 year ago

Hmm, that's annoying. So, single file monitoring is not possible in Windows, but the folder watching yields too many false positive events. Tricky!

axiom41 commented 1 year ago

Hello... In the meantime, is there any way to suppress this (very annoying) popup? (Win11 x64, python 3.11.5 and RIDE 2.0.8.dev10)

image

HelioGuilherme66 commented 1 year ago

Yes @axiom41 and @JFoederer (I have been working on this, that is why did not updated yet ;) )

You can install from my working branch pip install -U https://github.com/HelioGuilherme66/RIDE/archive/refs/heads/misc_fixes.zip

HelioGuilherme66 commented 1 year ago

@plumbum-se @axiom41 and @JFoederer This is finally implemented in v2.0.8dev11. (still pos-up Reload project when changing Folder :( ) Now we can exclude files. If we do exclude by right-clicking, we should reload project.

plumbum-se commented 1 year ago

Using v2.0.8dev11 running on Python 3.10.11, Ride still detects added files to excluded directories. For example, if I add a file to any of these directories image the following dialogue shows up: image Reloading project does not help, neither re-launching Ride. The reloading process takes >10 s and since files are added in the temp & logs directories often, it wastes quite a lot of time during a work day.

HelioGuilherme66 commented 1 year ago

@plumbum-se This is hard for me to reproduce. What is the project root you have opened? C:\dev\git\abc\ ? What is the extensions of the (deleted, created and modified) files in ..\temp\, ..\tmp\ and ..\logs\ ?

Note: I notice that your excluded directories are not ending with \, this means that RIDE was not restarted at this moment.

Can you record a whole flow, of:

(You may want to send this to me privately. If you can, use our Slack for this instant communication.)

plumbum-se commented 1 year ago

Hi, sorry for the late response. I have now created a tiny directory structure similar to the structure that we are using in our daily work. With this tiny setup I can re-create the reload-issue in a few seconds. I will gladly share this setup with you but, unfortunately, the slack signup page did not work: “An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs –tail”

From: HĂ©lio Guilherme @.> Sent: den 20 september 2023 12:03 To: robotframework/RIDE @.> Cc: Broman, Peter @.>; Mention @.> Subject: Re: [robotframework/RIDE] Ride detects changed files in excluded directories (Issue #2597)

CAUTION External email. Confirm links and attachments before opening.

@plumbum-sehttps://urldefense.com/v3/__https:/github.com/plumbum-se__;!!HhJuUvVmgd2z!uC3guUoxChT-gWApvTkKwfY1iajMM1Y7dMa6ViMCxnAsvxs_ymjiKt7Q9VhT3dmvqlcY8k6ZJvuRjWYrGr0_zkBkx524EJk$ This is hard for me to reproduce. What is the project root you have opened? C:\dev\git\abc\ ? What is the extensions of the (deleted, created and modified) files in ..\temp, ..\tmp\ and ..\logs\ ?

Note: I notice that your excluded directories are not ending with , this means that RIDE was not restarted at this moment.

Can you record a whole flow, of:

(You may want to send this to me privately. If you can, use our Slack for this instant communication.)

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/robotframework/RIDE/issues/2597*issuecomment-1727393389__;Iw!!HhJuUvVmgd2z!uC3guUoxChT-gWApvTkKwfY1iajMM1Y7dMa6ViMCxnAsvxs_ymjiKt7Q9VhT3dmvqlcY8k6ZJvuRjWYrGr0_zkBkGtzQ7E0$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANTRJFSJQZL7EGHGHVPNN53X3K5MHANCNFSM6AAAAAAY62O3CY__;!!HhJuUvVmgd2z!uC3guUoxChT-gWApvTkKwfY1iajMM1Y7dMa6ViMCxnAsvxs_ymjiKt7Q9VhT3dmvqlcY8k6ZJvuRjWYrGr0_zkBk0L-_ulo$. You are receiving this because you were mentioned.Message ID: @.**@.>>

"This email and any attachments may be confidential or legally privileged and are intended solely for the use of the individual or entity addressed. If you have received this email in error please notify the sender and delete it from your email system. Additionally, you are notified that disclosing, copying, distributing or taking any action or reliance on the contents of this information is strictly prohibited."

HelioGuilherme66 commented 1 year ago

@plumbum-se This is the Invite link for Slack: https://join.slack.com/t/robotframework/shared_invite/zt-24noe2ev9-5wl4AYt94bbhUpdur5TO~g

HelioGuilherme66 commented 1 year ago

This issue was confirmed to be fixed since, v2.0.8.dev15 (actually with v.2.0.8.dev19)