-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Resource files located in separate folder cannot be found #261
Comments
1.3.2 hasn't been released yet, though was planing to release it today, but I'll try to reproduce your issue in 1.3.0 and then add an extra test for it in 1.3.2 to check if it's fixed (It might be, there are a few windows path related fixes in 1.3.2) but if not I'll try to give you a fix |
Hi @ask-almas, I've recreated you file structure and files and see a few issues:
I've confirmed with this setup should run as expected with manager v1.3.1 and agent v1.3.0 when you add the
Also can you give more details on what the errors were that you were getting? |
Thank you for your response, I appreciate it!
I upgraded the version, now I see resources files being copied to the agent scripts directory. And does the script copy resource files based on imports in
I made a mistake here, it should be
To reproduce this issue, I just start agent and manager with -i options. Then I don't start the run but simply click some buttons such as Plan, Agent, Parameters and within 2-3 minutes the GUI becomes (Not Responding) and following errors appear in the manager console window infinitely:
Thank you! |
Manager copies files to the agent based on what it finds in the .robot file. well actually more correctly the manager identifies the files and responds with the list of files to get when the agent requests it, then the agent pulls the files from the manager, it's a pull rather than a push. The purpose of recreating the file structure in the agent-dir is explained in Robot File handling (transfer from Manager to Agent). It's a about a page of explanation so it'll take a little while to read and digest, but it will make a lot of things about RFSwarm much easier to understand. The directories in the manager's ini file are just default paths used when opening file dialogues, they aim to make life easier for you:
Thanks for that, I'll try to reproduce it, but from the errors you're getting it looks like it's coming from |
I haven't been able to reproduce it with your example file structure, was it From what I found searching this error windows has a default limit of 507 files, where as macos/linux is higher but still can get this error with enough files. I may need to change the approach of processing the resource files if you have more than 500 resource files. This would also explain why you didn't get this error on 1.3.0, as the manager wasn't able to find the files to open them. |
The
Mine is Python 3.11.5 |
It would be good to know if you still get the error after updating your python to the latest version, it could be a python bug that's already been fixed. |
I uninstalled python 3.11.9 and installed python 3.11.5, created 70 folder and 70 resource files, 35 each linked to a.resource and b.resource and still couldn't reproduce that All I can suggest is:
Hopefully everything will work for you then |
Hi! Just tried to upgrade the python version to 3.11.9 and installed
Is there a possibility that the issue is coming from the unoptimized imports and cross references of the resource files which lead to infinite cycle? For example this simple structure: structure
test.robot
a.resource
b.resource
c.resource
d.resource
Maybe this looks odd, but in some places I have similar things, unfortunately, and so this would be my last guess. Could you please check if you get the same issue with this kind of structure? Thank you! |
I don't think it's likely to be the issue, but I will check if i can reproduce it that way. The reason I say unlikely is the manager resolves the full path of the file (as well as a path relative to the original robot file), then stored both those with the md5 hash of the file as an entry in a python dictionary (the hash is the key, the paths are values under the key) so if it encounters the same file again it will match the hash and not continue adding the file to the list, this is how it knows which files the agents need, it's also how it knows when a file changes (the hash changes) I'll still check, I'd like to find what's causing this issue for you if I can. Another option if you can, can you create a test structure that causes the issue for you but doesn't contain any sensitive data and make a zip file of the structure and attach it here? |
Well that extra info was the key to reproducing it 👍 Now I know how to reproduce it I'll add a test case and work on a fix, thanks for letting us know about this issue |
expect to fail on windows, may fail on others
close the robot/resource file before processing it's lines
Don't bother hashing a file we've seen already
FYI it seems to be related to the circular nature of your resource references, i.e. As a test to see if it was just a number of files issue, I created a directory with >3500 resource files and referenced it in a copy of I have a fix for the circular resource references part of this issue but not yet a fix for the >3500 resource files part So if you need it urgently you can download this dist file, unzip it and install manager with the python package inside (tell pip to install the whl file): If you can wait the fix will be part of v1.3.2 soon |
- agent now reports number of files downloaded - manager now waits for agent to finish downloading files and has status ready before starting test, this could cause issues if all agents have status warning/critical, we'll see Issue #261 - bumped up the time to wait for manager on Lots Of Resource Files test as 3550 files could take a while to download
OK I have the zip file, what should be in Is it OK to put these files into a test case or do you need me to rename them first? I think I'm close to finishing the fix for this issue, I've figured out the disconnect issue I was getting when there was over 3500 files, I changed the code of the agent to use a download queue like the upload queue it uses when sending the logs back. My first attempt at fixing the circular resource references stopped the This issue has been the hardest bug to fix, it's also a bug that has always existed in RFSwram, so I really appreciate you finding it 👍 |
Thank you! Also thank you for your amazing work!
Yes, these are python libraries that were created.
If you have time, it would be good if rename it. I wanted to do it, but didn't have much time |
OK renamed like this:
|
trying to figure out why lotsa_files_test fails on windows only? Issue #261
takes ~8-9 min to download 3550 files on windows ~2 min on Linux with these settings Issue #261
Everything working well now, merging into v1.3.2 |
Hi!
I'm trying to use rfswarm in testing app but keep getting resource file doesn't exist error. I have following structure and trying to use agent and manager with -i option with custom ini config files. I have a separate folder where I keep resource files and import it in robot test files. Even with default configs and got the same issue. Is there any issue with my structure which swarm can't work with or is there a mistake in one of the config files? I assume I maybe messed up with scriptdir, scenariodir, scenariofile, agentdir locations. Here's details which may help to reproduce the issue:
Python: 3.11
OS: Windows
rfswarm: 1.3.0
Unfortunately, v 1.3.1 kept giving me infinite errors at the start of the agent but didn't test 1.3.2. If this issue was solved, please let me know.
structure
manager.ini
agent.ini
scenario.rfs
test.robot
Thank you!
The text was updated successfully, but these errors were encountered: