promise/plugin: Implement check_file_state promise plugin
All threads resolved
slapos
promise/plugin
check_file_state.py +45 -0
test/promise/plugin
test_check_file_state.py +176 -0
This promise can be used to check if files produced during instance deployment or run are in given state.
In case of expected empty files it will post the file content to the monitor.
marked as a Work In Progress
WIPed, as I am not sure if it is good idea to post a lot of changing text to the monitor. Maybe the system shall expose the file (password protected?) and just give the URL in the monitor? (But as it is frontend, it would have to be over insecure SSL).
WIPed, as I am not sure if it is good idea to post a lot of changing text to the monitor. Maybe the system shall expose the file (password protected?) and just give the URL in the monitor? (But as it is frontend, it would have to be over insecure SSL).
Indeed, it's better to copy the file inside private directory and put a link inside the promise.
mentioned in merge request slapos!577 (merged)
Indeed, it's better to copy the file inside private directory and put a link inside the promise.
Indeed.
But what about the fact that it is chicken and egg problem? The frontend needs already deployed frontend to serve anything.
This problem is already seen with the monitor stack for the frontend, so I am going to reuse monitor stack for it (I already saw some places, where it is done like this -- files are moved to monitor public/private place and are published with monitor).
added 1 commit
added 1 commit
added 1 commit
unmarked as a Work In Progress
added 1 commit
resolved all discussions
@tomo ready for merge IMHO.
Is it normal that the promise doesn't copy the content of the file inside the private directory somewhere ? You expect to have the file already accessible by the url
?
Ah OK, I looked at slapos!577 (merged) and I see what you intend to do so it's OK for me.
added 1 commit
merged
mentioned in commit 1218b035
Files with large changes are collapsed by default.
Files with large changes are collapsed by default.