From 7924dcb0412c87c708a8aa6b41d76a122a273188 Mon Sep 17 00:00:00 2001 From: Sebastien Quioc Date: Mon, 28 Oct 2024 17:24:35 +0100 Subject: [PATCH 1/3] fix(Action): fix support for boolean arguments. Fix the comparison to check if the argument is really missing and not that the argument is a boolean argument set to False --- sekoia_automation/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sekoia_automation/action.py b/sekoia_automation/action.py index d53539b..38aa129 100644 --- a/sekoia_automation/action.py +++ b/sekoia_automation/action.py @@ -144,7 +144,7 @@ def json_argument(self, name: str, arguments: dict, required: bool = True) -> An If `name` is inside arguments, returns the value. If `name`_path is inside arguments, returns the content of the file """ - if arguments.get(name, None): + if arguments.get(name, None) is not None: self._result_as_file = False return arguments[name] elif f"{name}_path" in arguments: From 77785ea5ef479a5dcb7316deabde1ca796131929 Mon Sep 17 00:00:00 2001 From: Sebastien Quioc Date: Mon, 28 Oct 2024 17:27:20 +0100 Subject: [PATCH 2/3] refactor(Trigger): move the 'events not send from several seconds' message from error to info. It's confusing for customers to have an error while no events have being collected (because no events were to collect). --- sekoia_automation/trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sekoia_automation/trigger.py b/sekoia_automation/trigger.py index 9033492..0ab9765 100644 --- a/sekoia_automation/trigger.py +++ b/sekoia_automation/trigger.py @@ -414,7 +414,7 @@ def _events_alive(self) -> bool: self.log( message=f"The trigger didn't send events for {delta_seconds} seconds, " "it will be restarted.", - level="error", + level="info", ) return False From c938456282c6319a9f2444e2bef4d148a068d3cc Mon Sep 17 00:00:00 2001 From: Sebastien Quioc Date: Mon, 28 Oct 2024 17:28:51 +0100 Subject: [PATCH 3/3] chore(SDK): update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b09733b..f542948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Specify docker image when publishing a module +- Move from error to info the message when no event was collected from severals seconds ### Fixed - Fix tests for async version of connector. +- Fix support for boolean arguments in the json_argument method ## 1.16.0 - 2024-10-16