This is an automated email from the ASF dual-hosted git repository.
jongyoul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new cd8ba63f1c [ZEPPELIN-6404] Fix empty response body handling in
merge_pr.py
cd8ba63f1c is described below
commit cd8ba63f1c03245ed2cac81b745ecd44795ca420
Author: Jongyoul Lee <[email protected]>
AuthorDate: Mon Mar 30 18:06:24 2026 +0900
[ZEPPELIN-6404] Fix empty response body handling in merge_pr.py
## Summary
- Fix `JSONDecodeError` when JIRA transition API returns empty response body
- Return empty dict `{}` instead of attempting to parse empty string
## Context
After merging PR #5183, the JIRA resolve step crashed with
`JSONDecodeError: Expecting value: line 1 column 1`. The JIRA transition API
returns HTTP 204 (No Content) on success, but `_http()` unconditionally called
`json.loads()` on the empty body.
## Test plan
- [x] Verified JIRA transition actually succeeded despite the error
- [ ] Run `python3 dev/merge_pr.py --pr <number> --resolve-jira --dry-run`
to verify no regression
Closes #5199 from jongyoul/ZEPPELIN-6404-fix-empty-response.
Signed-off-by: Jongyoul Lee <[email protected]>
---
dev/merge_pr.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dev/merge_pr.py b/dev/merge_pr.py
index ef87dad4d1..4fbfac77f6 100644
--- a/dev/merge_pr.py
+++ b/dev/merge_pr.py
@@ -92,11 +92,12 @@ class MergePR:
req.add_header("Authorization", auth)
try:
with urllib.request.urlopen(req) as resp:
- return resp.status, json.loads(resp.read().decode())
+ body = resp.read().decode()
+ return resp.status, json.loads(body) if body else {}
except urllib.error.HTTPError as e:
err_body = e.read().decode() if e.fp else ""
try:
- return e.code, json.loads(err_body)
+ return e.code, json.loads(err_body) if err_body else {}
except json.JSONDecodeError:
return e.code, {"error": err_body}