ci: send Jira reporter comments as ADF - #41507
Conversation
Jira REST API v3 rejects plain-string comment bodies (HTTP 400), so the flaky-test reporter stopped posting comments after the v2 to v3 bump. Wrap the comment text in an ADF document and deduplicate the two comment call sites into a single helper.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41507 +/- ##
===========================================
+ Coverage 68.69% 68.71% +0.01%
===========================================
Files 4134 4134
Lines 160417 160417
Branches 29312 29197 -115
===========================================
+ Hits 110205 110227 +22
+ Misses 45104 45091 -13
+ Partials 5108 5099 -9 🚀 New features to boost your workflow:
|
The /rest/api/3/search/jql endpoint returns only issue ids unless fields are requested, so the exact-summary match crashed with 'Cannot read properties of undefined (reading summary)' before commenting or labeling.
Proposed changes (including videos or screenshots)
The flaky-test Jira reporter has been silently broken — issues stopped getting comments (and often weren't found at all). Two independent regressions:
/rest/api/3/search/jqlendpoint returns only issue ids unlessfieldsis requested. The exact-summary match crashed withTypeError: Cannot read properties of undefined (reading 'summary')before commenting/labeling (see this run). Fixed by requestingfields=summary.postFailureCommentmethod.Both failure modes were swallowed by the reporter's catch-all, so CI never failed — the reports just stopped.
Validated against the real Jira instance:
fields=summaryreturnskey+fields.summary(without it, only{id})Issue(s)
Steps to test or reproduce
Further comments