shreemaan-abhishek commented on code in PR #12868:
URL: https://github.com/apache/apisix/pull/12868#discussion_r2667169275


##########
t/APISIX.pm:
##########
@@ -383,7 +383,7 @@ _EOC_
                     -- timeout one second before the actual timeout to allow 
shell.run to finish and collect the stdout/stderr
                     local ok, stdout, stderr, reason, status = shell.run([[ 
$exec_snippet ]], $stdin, @{[($timeout-1)*1000]}, $max_size)
                     if not ok then
-                        ngx.log(ngx.WARN, "failed to execute the script with 
status: " .. (status or "nil ") .. ", reason: " .. (reason or "nil ") .. ", 
stderr: " .. (stderr or "nil "))
+                        ngx.log(ngx.WARN, "failed to execute the script with 
status: " .. (status or "nil ") .. ", reason: " .. (reason or "nil ") .. ", 
stdout: " .. (stdout or "nil ") .. ", stderr: " .. (stderr or "nil "))

Review Comment:
   we found that when shell.run failed the error log line got executed however, 
the response body was still empty, due to which we were unable to examine the 
stdout. So we add the stdout to this log line.
   
   <img width="2558" height="768" alt="Image" 
src="https://github.com/user-attachments/assets/e1860d7f-080e-46fe-b405-531b52bdbe58";
 />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to