Skip to content

ci: send Jira reporter comments as ADF - #41507

Draft
ggazzo wants to merge 2 commits into
developfrom
fix/jira-reporter-adf-comment
Draft

ci: send Jira reporter comments as ADF#41507
ggazzo wants to merge 2 commits into
developfrom
fix/jira-reporter-adf-comment

Conversation

@ggazzo

@ggazzo ggazzo commented Jul 22, 2026

Copy link
Copy Markdown
Member

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:

  1. Search returns no fields (test: Update JIRA API search endpoint to use JQL #40015): the /rest/api/3/search/jql endpoint returns only issue ids unless fields is requested. The exact-summary match crashed with TypeError: Cannot read properties of undefined (reading 'summary') before commenting/labeling (see this run). Fixed by requesting fields=summary.
  2. Comments rejected (test: Update JIRA API version and handle errors in test result reporting #37723): the v3 comment endpoint requires the body in Atlassian Document Format and rejects plain strings with HTTP 400. Fixed by wrapping the comment text in an ADF document (same pattern as the description fix in test: Jira reporter uses ADF for issue description #40171); the two identical comment call sites were deduplicated into a single postFailureComment method.

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:

  • search with fields=summary returns key + fields.summary (without it, only {id})
  • the exact ADF comment payload returns 201 (test comment posted and deleted on FLAKY-1295)

Issue(s)

Steps to test or reproduce

Further comments

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.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 581d6e98-7814-49b0-b324-d2292fa85766

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c338e55

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot

dionisio-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@ggazzo ggazzo added this to the 8.8.0 milestone Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.71%. Comparing base (30623d9) to head (c338e55).
⚠️ Report is 161 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant