]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
send-error-report: make output align with original design when debug disabled
authorChangqing Li <changqing.li@windriver.com>
Tue, 6 May 2025 10:53:37 +0000 (18:53 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 May 2025 09:27:41 +0000 (10:27 +0100)
First, it is better to output the error report web link by default when
the report is uploaded successfully like before. This is useful, user
can find the detail the log info from the return link. Yocto Autobuilder
also benifit from this return link.

Second, why don't set level to logging.INFO to make the error report web
link outputed? Because "-j" option want to "Return the result in json
format, silences all other output", So "INFO:" added by logging system
is not wanted, so use print directly.

Example output:
Without "-j":
Preparing to send errors to: http://x.x.x.x:8000
Your entry can be found here: http://x.x.x.x:8000/Errors/Build/25/

With "-j":
{"build_id": 27, "build_url": "http://x.x.x.x:8000/Errors/Build/27/", "failures": [{"id": 26, "url": "http://x.x.x.x:8000/Errors/Details/26/"}], "num_similar_errors": 20, "similar_errors_url": "http://x.x.x.x:8000/Errors/SimilarTo/26/"}

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/send-error-report

index 6418dab165d4b157e4c7e1cc2aac0ae7df91356b..cc1bc7c2b137f686abf0979cbaefa088718dc068 100755 (executable)
@@ -155,7 +155,7 @@ def send_data(data, args):
 
     log.debug(f"Response Status: {response.status}")
     log.debug(f"Response Headers: {response.getheaders()}")
-    log.info(response.read().decode('utf-8'))
+    print(response.read().decode('utf-8'))
 
 def validate_server_url(args):
     # Get the error report server from an argument