You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can tell, the disabilities_file only gets generated once we run enable or disable but I noticed the full directory needs to also exist. Otherwise, it never gets created but it also doesn't throw an error.
The text was updated successfully, but these errors were encountered:
deeTEEcee
changed the title
disabilities_file doesn't get created if parent directory is missing
disabilities_file doesn't get created or throw an error
May 18, 2023
True. At the moment, the file is serialized only subsequently to a call to enable or disable.
However, there is an initial check at startup and there should be an error raised if the folder does not exist.
You should get something like this in the log traces:
2023-05-18 18:53:20,764;ERRO;SupvisorsOptions.get_value: The directory named as part of the path /dummy_path/disabilities.json does not exist
When it happens, the path is not stored, so calls to enable or disable would work but nothing would be persisted afterwards.
Supvisors will be updated so that:
the file gets written when entering the OPERATIONAL state ;
the file path is re-evaluated every time the file needs to be written, providing eventually the above error, and allowing the user to create it on-the-fly if missing.
The folder will not be created if it does not exist to keep consistency with Supervisor behavior.
thanks for the clear description! that makes sense to me. i was just curious, is there any reason why we can't just auto-create the full path in supvisor if it doesn't exist?
While implementing it, I've changed my mind a bit.
The default file is written down at startup. No re-evaluation of the path after the options have been loaded but the folder tree will be created if missing (unless write permission is denied, which will provide an ERROR log trace).
From what I can tell, the disabilities_file only gets generated once we run
enable
ordisable
but I noticed the full directory needs to also exist. Otherwise, it never gets created but it also doesn't throw an error.The text was updated successfully, but these errors were encountered: