Commit Graph

487 Commits

Author SHA1 Message Date
Kristóf Tóth
59dce4a848 Restore latest snapshot if no date is provided 2018-08-06 14:55:58 +02:00
Kristóf Tóth
cbb807dfb4 Implement restore_snapshot latest commit on branch detection 2018-08-06 14:19:18 +02:00
Kristóf Tóth
782df25bee Fix broken init_git_dir logic 🐛 2018-08-06 13:40:16 +02:00
Kristóf Tóth
b140550686 Remove debugging log from CommandsEqual 2018-08-06 13:16:20 +02:00
Kristóf Tóth
01e5577890 Document FSMManagingEventHandler 2018-08-04 23:27:18 +02:00
Kristóf Tóth
f6d77e1132 Add docstrings to CommandsEqual 2018-08-04 21:49:06 +02:00
Kristóf Tóth
16c936b2cd Add exclude_patterns support for CommandsEqual 2018-08-04 21:12:06 +02:00
Kristóf Tóth
4f881a0ea0 Implement must_contain_patterns CommandsEqual 2018-08-03 16:07:12 +02:00
Kristóf Tóth
8454236bc8 Implement must_begin_similarly constraint CommandsEqual 2018-08-03 15:13:02 +02:00
Kristóf Tóth
b6d8f7913f Improve CommandsEqual with fuzzy logic 2018-08-03 15:01:44 +02:00
Kristóf Tóth
7572699e55 Start working on something better than == for history checks 2018-08-03 13:40:34 +02:00
Kristóf Tóth
088a1cefc5 Fix initialization issues with DirectorySnapshottingEH 2018-08-03 11:58:03 +02:00
Kristóf Tóth
e383be0149 Fix restore_snapshot() choking on timestamps before initial commit 2018-08-03 11:55:51 +02:00
Kristóf Tóth
3d2e3e7db3 Fix python3.7 incompatibilities in SnapshotProvider 2018-08-03 11:39:55 +02:00
Kristóf Tóth
3fee8fee20 Implement first version of DirectorySnapshottingEventHandler 2018-08-01 17:24:39 +02:00
Kristóf Tóth
df0e24319d Fix SnapshotProvider failing on taking_snapshot without changes 2018-08-01 17:19:31 +02:00
Kristóf Tóth
2e97d18340 Fix SnapshotProvider failing depending on python3.7 2018-08-01 17:18:43 +02:00
Kristóf Tóth
e3b97ee190 Fix message sequencing not being global 2018-08-01 17:15:42 +02:00
Kristóf Tóth
564c97e66a Remove unused variable from terminado server 2018-08-01 14:17:17 +02:00
Kristóf Tóth
14a98587a4 Silence pylint false positive 2018-07-31 15:18:35 +02:00
Kristóf Tóth
b6d72812c4 Refactor ZMQWSProxy filter and callback initialization 2018-07-31 13:34:00 +02:00
Kristóf Tóth
a04b078513 Implement message sequence numbers in ZMQWSProxy 2018-07-31 13:34:00 +02:00
Kristóf Tóth
d94bc37d48 Add event logging to FSMAware 2018-07-31 13:34:00 +02:00
Kristóf Tóth
a2d1531ea4 Fix sphinx docs broken after dependency hell 2018-07-31 13:34:00 +02:00
Kristóf Tóth
732b896d17 Add docstrings to YamlFSM 2018-07-31 13:34:00 +02:00
Kristóf Tóth
8df196f258 Add note on step_next trigger to LinearFSM 2018-07-31 13:34:00 +02:00
Kristóf Tóth
3d3328f835 Fix bad indentation 2018-07-31 13:34:00 +02:00
Kristóf Tóth
7a670f37f2 Resolve Python circular import hell - hopefully forever 2018-07-31 13:33:59 +02:00
Kristóf Tóth
7fb5a37831 Make TFWServer FSMAware 2018-07-31 13:33:59 +02:00
Kristóf Tóth
ca09e868f1 Fix ZMQWSProxy not executing filters/callbacks on nested messages 2018-07-31 13:33:59 +02:00
Kristóf Tóth
5715c57ebc Move FSMAware to a separate file in networking 2018-07-31 13:33:59 +02:00
Kristóf Tóth
a6b7fa04ab Rework fsm_update API 2018-07-31 13:33:59 +02:00
Kristóf Tóth
d718b6425e Refactor FSMAware part from FSMAwareEH to a separate class 2018-07-31 13:33:59 +02:00
Kristóf Tóth
8c6a14cef5 Move fsm stuff to a separate directory in lib 2018-07-31 13:33:59 +02:00
Kristóf Tóth
52b2adb9c4 Add missing legal boilerplate to YamlFSM 2018-07-31 13:33:59 +02:00
Kristóf Tóth
3dff144b91 Fix RateLimiter family debounce stuff 2018-07-31 11:48:41 +02:00
Kristóf Tóth
8a0928beca Fix RateLimiter semantics 2018-07-31 09:56:18 +02:00
Kristóf Tóth
3c3012ffe8 Add docstrings to AsyncRateLimiter 2018-07-31 09:23:49 +02:00
Kristóf Tóth
128f48702a Make AsyncRateLimiter thread safe 2018-07-31 09:14:33 +02:00
Kristóf Tóth
4679a3494c Add docstrings to RateLimiter 2018-07-31 05:19:15 +02:00
Kristóf Tóth
ee7adb10be Refactor AsyncRateLimiter for ease of use (IOLoop passing) 2018-07-30 18:04:24 +02:00
Kristóf Tóth
eeb36b6488 Implement IOLoop based AsyncRateLimiter 2018-07-30 17:55:52 +02:00
Kristóf Tóth
6044f70804 Refactor RateLimiter to allow proper subclassing 2018-07-30 17:54:26 +02:00
Kristóf Tóth
b3e8af2024 Implement require_signature mode in FSMManagingEH 2018-07-23 17:16:37 +02:00
Kristóf Tóth
e846a2b111 Make TFWServer sign commands issued due to signed triggers 2018-07-23 17:15:14 +02:00
Kristóf Tóth
8ba99d8e36 Make FSMBase.step() return an exit code 2018-07-23 17:14:14 +02:00
Kristóf Tóth
1a52ed2c9a Add error handling logic to MessageStorage 2018-07-20 20:47:10 +02:00
Kristóf Tóth
bad7297c94 Fix TerminalEventHandler returning none as 'data' 2018-07-20 20:34:18 +02:00
Kristóf Tóth
cb4ba563e9 Fix LinearFSM not being compatible with controller stuff 2018-07-20 15:03:49 +02:00
Kristóf Tóth
96b4e314a9 Add 'in_accepted_state' to fsm_update messages 2018-07-20 14:40:47 +02:00
Kristóf Tóth
e1e0acb3b8 Fix FSMBase default accepted_state 2018-07-20 14:38:26 +02:00
Kristóf Tóth
3e5dd6e102 Fix typo 2018-07-20 10:27:58 +02:00
Kristóf Tóth
bd6cdc5409 Fix stored messages growing infinitely on reloads 2018-07-20 09:34:13 +02:00
Kristóf Tóth
7376504dd2 Make frontend state recovery recover selected file in IDE 2018-07-20 09:34:07 +02:00
Kristóf Tóth
a8fdd3b0d8 Refactor SnapshotProvider 2018-07-19 16:54:11 +02:00
Kristóf Tóth
0dd66c33bf Make error handling more robust 2018-07-19 16:54:11 +02:00
Kristóf Tóth
a703ee821d Fix SnapshotProvider initialization stuff 2018-07-19 16:54:11 +02:00
Kristóf Tóth
1bb6286d24 Fix timeline property 2018-07-19 16:54:11 +02:00
Kristóf Tóth
889ec92928 Use UUIDs instead of commit hashes for new branch names (git ambigous) 2018-07-19 16:54:11 +02:00
Kristóf Tóth
98e1bbe9d6 Remove unnecessary _last_valid_tag stuff 2018-07-19 16:54:11 +02:00
Kristóf Tóth
d8ac0dc311 Reorder SnapshotProvider methods in accordance with Uncle Bob 2018-07-19 16:54:11 +02:00
Kristóf Tóth
c6d3b8ad21 Ensure _last_valid_branch consistency 2018-07-19 16:54:11 +02:00
Kristóf Tóth
dd056a37bb Make coding style more consistent 2018-07-19 16:54:11 +02:00
Kristóf Tóth
85523ede32 Make SnapshotProvider more in line with reality 2018-07-19 16:54:11 +02:00
Kristóf Tóth
fa3ce317f0 Rename stuff to improve code readability 2018-07-19 16:54:11 +02:00
Kristóf Tóth
fb2beb470f Make subprocess calls fail if something goes wrong 2018-07-19 16:54:11 +02:00
Kristóf Tóth
d306d0e484 Implement properties to get info from SnapshotProvider instance 2018-07-19 16:54:11 +02:00
Kristóf Tóth
e80782aa6c Implement checking whether directories passed exsist 2018-07-19 16:54:11 +02:00
Kristóf Tóth
49e0efa4c9 Run git init only if there is no repo present 2018-07-19 16:54:11 +02:00
Kristóf Tóth
2f5e8d11f3 Automatically init git in SnapshotProvider 2018-07-19 16:54:11 +02:00
Kristóf Tóth
c279b2517f Implement branching in SnapshotProvider 2018-07-19 16:54:11 +02:00
Kristóf Tóth
8e87025905 Implement git based fs snapshot provider 2018-07-19 16:54:07 +02:00
Kristóf Tóth
d5feba7076 Implement HMAC signatures of fsm_update broadcast messages 2018-07-16 14:31:52 +02:00
Kristóf Tóth
c658894c12 Implement authentication key management 2018-07-16 14:28:40 +02:00
Kristóf Tóth
a79c68515b Remove controller stuff, tidy code based on pylint suggestions 2018-07-16 11:18:27 +02:00
Kristóf Tóth
7c13d31de0 Refactor message signing and verifying logic 2018-07-16 10:29:06 +02:00
Kristóf Tóth
5770e29733 Move message checksum logic to crypto.py 2018-07-15 17:30:19 +02:00
Kristóf Tóth
b2cb60ef02 Implement message signing and verification logic 2018-07-15 17:29:16 +02:00
Kristóf Tóth
eb2c3a8dd0 Add crypto module with HMAC-SHA256 implementation 2018-07-15 17:27:35 +02:00
Kristóf Tóth
16d98c75ca Add message_bytes() function to serialization module 2018-07-15 17:26:00 +02:00
Kristóf Tóth
646a671ff3 Add FSMAwareEventHandler which keeps track of FSM state 2018-07-14 20:45:56 +02:00
Kristóf Tóth
4236a17b69 Include last trigger in fsm_update messages 2018-07-14 20:45:26 +02:00
Kristóf Tóth
77f14df17b Implement trigger history in FSMBase 2018-07-14 20:44:31 +02:00
Kristóf Tóth
d98ce58651 Add proper multikey support for EventHandlers with compatibility 2018-07-14 20:06:34 +02:00
Kristóf Tóth
cfa8fc5ab6 Remove deprecated 'reset' key. Sad to see you go :( 2018-07-13 15:42:18 +02:00
Kristóf Tóth
688c615fd7 Implement frontend state recovery backend (partial) 2018-07-13 15:24:45 +02:00
Kristóf Tóth
9c20e94dd8 Implement generating single messages from a queue 2018-07-13 14:09:13 +02:00
Kristóf Tóth
d2084b2e51 Add frontend/eventhandler message callback capabilities to ZMQWSProxy 2018-07-13 14:08:30 +02:00
Kristóf Tóth
f6cc7ae495 Refactor ZMQWSProxy.__init__ 2018-07-12 16:49:00 +02:00
Kristóf Tóth
b06472ad19 Reintroduce FSM update messages with minor changes 2018-07-12 15:20:35 +02:00
Kristóf Tóth
17b24377dd Implement a ZMQ prefix-match countermeasure in EHBase 2018-07-12 15:17:39 +02:00
Kristóf Tóth
558e660268 Use ServerUplinkConnetor.broadcast() instead of local helper 2018-07-12 14:58:31 +02:00
Kristóf Tóth
381cd2b11e Simplify ServerUplinkConnector mirror logic, add broadcast support 2018-07-12 14:57:43 +02:00
Kristóf Tóth
9f6ac6d27e Implement optional Jinja2 templating support for YamlFSM 2018-07-11 15:30:52 +02:00
Kristóf Tóth
0e8f529726 Optimize FSMBase by using generators for predicate logic 2018-07-10 15:40:10 +02:00
Kristóf Tóth
57d2475ebc Fix invalid trigger killing FSMBase 2018-07-06 15:40:27 +01:00
Kristóf Tóth
7cfa63bacf Rename config transformation method for easier understanding 2018-07-06 12:31:25 +01:00
Kristóf Tóth
7f583d8d1f Improve YamlFSM initialization logic 2018-07-06 12:27:26 +01:00
Kristóf Tóth
c7ee97f0c6 Simplify predicate finding logic YamlFSM 2018-07-04 21:58:30 +02:00
Kristóf Tóth
1beb419b09 Remove subprocess spawning stuff from YamlFSM for SRP 2018-07-04 18:15:34 +02:00
Kristóf Tóth
d71a25e30a Implement subscribing predicates found in yaml 2018-07-04 18:11:42 +02:00
Kristóf Tóth
ea76a19595 Refactor YamlFSM moar 2018-07-04 18:00:41 +02:00
Kristóf Tóth
bfa1bffbc5 Refactor YamlFSM 2018-07-04 17:48:31 +02:00
Kristóf Tóth
7a92d88b73 Refactor FSMBase to subclass transitions.Machine 2018-07-04 15:48:16 +02:00
Kristóf Tóth
91c257554f Simplify callback monkeypatching logic in YamlFSM 2018-07-03 20:09:47 +02:00
Kristóf Tóth
022a997dc2 Implement monkey patching callbacks in YamlFSM config 2018-07-03 19:06:54 +02:00
Kristóf Tóth
5e4303ac06 Add first version of YamlFSM 2018-07-03 15:14:00 +02:00
Kristóf Tóth
708c920784 Move FSM handling logic to an event handler 2018-06-29 22:03:19 +02:00
Kristóf Tóth
a6563bcd89 Implement event handler base class that broadcasts everything 2018-06-29 22:02:26 +02:00
Kristóf Tóth
196e753fb9 Fix typo in comment 2018-06-29 15:59:03 +02:00
Kristóf Tóth
427694623f Rename file to harmonize with new networking code structure 2018-06-29 15:40:07 +02:00
Kristóf Tóth
7ed0715f4c Reorder stuff to follow the teachings of Uncle Bob 2018-06-29 15:33:45 +02:00
Kristóf Tóth
b217ac59c8 Move message validation code to where it belongs 2018-06-29 12:06:08 +02:00
Kristóf Tóth
36a86b0454 Hide ZMQ serialization magic from EHConnector clients 2018-06-29 11:58:05 +02:00
Kristóf Tóth
934f8ec74c Hide ZMQ serialization magic from ServerConnector clients 2018-06-29 11:50:36 +02:00
Kristóf Tóth
1b65bd4d3d Implement message broadcasting 2018-06-29 10:54:08 +02:00
Kristóf Tóth
f8233d51a9 Completely rework TFWServer networking 🍰 2018-06-28 17:33:20 +02:00
Kristóf Tóth
3ba56a8096 Implement batch callback subscription in CallbackMixin 2018-06-28 17:31:55 +02:00
Kristóf Tóth
9eacf3f79c Add message queueing capabilities to MessageSender 2018-06-27 15:52:17 +02:00
Kristóf Tóth
83dd6ae836 Fix IdeEventHandler not working with arbitrary keys 2018-06-18 15:13:39 +02:00
Kristóf Tóth
2e3b49f8b5 Use update_wrapper in lazy_property update attribute info 2018-06-05 00:16:31 +02:00
Kristóf Tóth
d0667253c2 Harmonize code formatting style across project 2018-06-04 22:16:44 +02:00
Kristóf Tóth
afc84e1d1a Conciliate FileManager attribute names and formatting 2018-06-04 21:47:10 +02:00
Kristóf Tóth
92e9812776 Remove unnecessary additional_dirs IdeEH.__init__ argument 2018-06-04 21:20:36 +02:00
Kristóf Tóth
edc46a8ae6 Rename LazyInitialise to make IDEs recognise it as a property 2018-06-02 11:48:34 +02:00
Kristóf Tóth
d5b0bb4d32 Avoid potential TypeErrors using LazyInitialise 2018-06-02 11:25:48 +02:00
Kristóf Tóth
a743b01bcf Reduce line length to 120 2018-06-01 17:19:58 +02:00
Kristóf Tóth
e80cce00f3 Add sphinx API documentation 2018-06-01 16:20:20 +02:00
Kristóf Tóth
c0fb28c46c Stop LogMonitor on EventHandler.cleanup() in LogMonitoringEH 2018-06-01 15:15:07 +02:00
Kristóf Tóth
6f3db18146 Use power of LazyInitialise to replace CallbackMixin.__init__() 2018-06-01 14:21:32 +02:00
Kristóf Tóth
cebacb15e6 Use power of LazyInitialise to replace ObserverMixin.__init__() 2018-06-01 14:06:40 +02:00
Kristóf Tóth
9f3a3b501f Initialise supervisor xmlrpc client lazily to avoid globals 2018-06-01 14:01:32 +02:00
Kristóf Tóth
8817f991a5 Use power of LazyInitialise to murder TFW/TAOENV global state 2018-06-01 14:01:15 +02:00
Kristóf Tóth
06c2fc97ad Implement decorator to lazy initialise a property 2018-06-01 13:58:50 +02:00
Kristóf Tóth
e98c41d3cf Comply new API style in TerminalEH 2018-05-31 14:08:29 +02:00
Kristóf Tóth
ea251ef474 Document LogMonitoringEventHandler 2018-05-31 14:03:11 +02:00
Kristóf Tóth
b68ceeb394 Rework LogMonitoringEH API to adhere new conventions 2018-05-31 13:53:11 +02:00
Kristóf Tóth
2e953ea098 Implement LogMonitorEH API 2018-05-30 15:21:36 +02:00
Kristóf Tóth
211ae1e2d9 Allow changing MonitorManagerMixin.monitor_args dynamically 2018-05-30 15:19:59 +02:00
Kristóf Tóth
73f6c6635b Rename my bootiful threadlocalise.. SupervisorBaseMixin method 2018-05-30 14:07:40 +02:00
Kristóf Tóth
babb14288c Use contextlib.suppress() to suppress stuff in SupervisorLogMixin 2018-05-30 14:05:13 +02:00
Kristóf Tóth
3bb97a6dcc Implement LogMonitoringEventHandler to manage a LogMonitor via API 2018-05-30 13:14:25 +02:00
Kristóf Tóth
9e6cd57532 Refactor MonitorManagerMixin to allow arbitrary Monitor arguments 2018-05-30 13:06:09 +02:00
Kristóf Tóth
28c16e1127 Rework log deletion – use log_tail arguments instead 2018-05-29 17:59:16 +02:00
Kristóf Tóth
4815b97200 Fix shared xmlrpc client raising HTTP errors in LogMonitor 2018-05-29 16:40:58 +02:00
Kristóf Tóth
9f6418bf60 Support creating thread-local xmlrpc clients in SupervisorBaseMixin 2018-05-29 16:40:58 +02:00
Kristóf Tóth
780d6a9b3c Avoid pylint stupidity ¯\_(ツ)_/¯ 2018-05-29 16:40:58 +02:00
Kristóf Tóth
32e3c2860d Fix inotify event logs triggering themselves (infinite log recursion) 2018-05-29 16:40:58 +02:00
Kristóf Tóth
029f4a9eb2 Implement watchdog observer to watch the logs of a supervisor process 2018-05-29 16:40:58 +02:00
Kristóf Tóth
9723f98950 Rework ProcessManagingEH log API 2018-05-28 16:36:59 +02:00