This is an automated email from the ASF dual-hosted git repository.

franztt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-operator.git

commit bf78d7939f9e0c1a02e24287c005390e20841f0d
Author: francescotimperi <[email protected]>
AuthorDate: Sat Jul 27 15:45:01 2024 +0000

    fix: cron action executor does not need to pass ow action parameters
---
 nuvolaris/actionexecutor.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nuvolaris/actionexecutor.py b/nuvolaris/actionexecutor.py
index 379a2fb..aa3fd3b 100644
--- a/nuvolaris/actionexecutor.py
+++ b/nuvolaris/actionexecutor.py
@@ -152,10 +152,10 @@ def call_ow_action(url, parameters, ow_auth):
     try:
         response = None
         if(len(parameters)>0):
-            response = req.post(url, 
auth=(ow_auth['username'],ow_auth['password']), headers=headers, 
data=json.dumps(parameters))
-        else:
-            #If the body is empty Content-Type must be not provided otherwise 
OpenWhisk api returns a 400 error    
-            response = req.post(url, 
auth=(ow_auth['username'],ow_auth['password']))
+            logging.info("calling an action with %s 
parameters",len(parameters))
+        
+        # OpenWhisk passes automatically the registered parameters, so this 
cron executor does not need to pass them.
+        response = req.post(url, 
auth=(ow_auth['username'],ow_auth['password']))
 
         if (response.status_code in [200,202]):
             logging.info(f"call to {url} succeeded with 
{response.status_code}. Body {response.text}")

Reply via email to