Skip to content

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented Dec 8, 2025

  • Changed JIRA API endpoints from version 2 to 3.
  • Added error handling in the onTestEnd method to log errors when sending test results to JIRA.

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling for JIRA test result reporting.
  • Chores

    • Updated JIRA reporter integration to use current API standards.

✏️ Tip: You can customize this high-level summary in your review settings.

- Changed JIRA API endpoints from version 2 to 3.
- Added error handling in the `onTestEnd` method to log errors when sending test results to JIRA.
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 8, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

⚠️ No Changeset found

Latest commit: 600c8ce

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

The JIRA reporter in the Meteor testing suite is upgraded to use JIRA REST API v3 endpoints instead of v2 across search, issue creation, updates, and comment operations. A new private method wraps the test-end handler in error handling.

Changes

Cohort / File(s) Summary
JIRA Reporter API v3 Migration & Error Handling
apps/meteor/reporters/jira.ts
Replaces all REST API v2 endpoints with v3 equivalents for search, issue operations, and commenting; introduces private _onTestEnd() method with try-catch error handling; delegates public onTestEnd() to the new method while preserving existing workflow logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single file affected with repetitive, homogeneous endpoint replacement pattern (v2 → v3 across multiple operations)
  • Straightforward error handling wrapper using standard try-catch pattern
  • No substantial logic changes or functional complexity beyond API version updates

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • geekgonecrazy

Poem

🐰 A reporter hops to JIRA's new door,
API v3 gleams, no more v2 to adore!
With error-caught whiskers held high,
Tests now land safely—no tears, no sigh!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the two main changes: updating JIRA API from v2 to v3 and adding error handling for test result reporting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/report/jira

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 and usage tips.

@ggazzo ggazzo added this to the 7.14.0 milestone Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 359MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -313B
queue-worker-service 132MiB 132MiB +25B
ddp-streamer-service 126MiB 126MiB +29B
account-service 113MiB 113MiB +758B
stream-hub-service 111MiB 111MiB -670B
authorization-service 111MiB 111MiB -807B
presence-service 111MiB 111MiB +338B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 13:52", "12/08 14:37 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 15 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37723
  • Baseline: develop
  • Timestamp: 2025-12-08 14:37:15 UTC
  • Historical data points: 15

Updated: Mon, 08 Dec 2025 14:37:15 GMT

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.88%. Comparing base (d0be8ad) to head (600c8ce).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37723      +/-   ##
===========================================
+ Coverage    67.78%   67.88%   +0.10%     
===========================================
  Files         3449     3449              
  Lines       113987   113972      -15     
  Branches     20956    20955       -1     
===========================================
+ Hits         77262    77375     +113     
+ Misses       34610    34473     -137     
- Partials      2115     2124       +9     
Flag Coverage Δ
e2e 57.32% <ø> (+0.09%) ⬆️
e2e-api 43.15% <ø> (+0.96%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

@ggazzo ggazzo marked this pull request as ready for review December 8, 2025 15:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/meteor/reporters/jira.ts (1)

85-103: Error-path search URL is missing the ? before query params

In the error message construction on Line [100], the URL is built as:

`${this.url}/rest/api/3/search${new URLSearchParams({ ... })}`

unlike the actual request on Line [85], which correctly includes ...?. This only affects diagnostics, but it makes the logged URL invalid and slightly harder to test/copy.

You can align the two with:

- `${this.url}/rest/api/3/search${new URLSearchParams({
-   jql: `project = FLAKY AND summary ~ '${payload.name}'`,
- })}`,
+ `${this.url}/rest/api/3/search?${new URLSearchParams({
+   jql: `project = FLAKY AND summary ~ '${payload.name}'`,
+ })}`,
🧹 Nitpick comments (2)
apps/meteor/reporters/jira.ts (2)

45-53: Error-handling wrapper around onTestEnd is appropriate; consider logging more context

Wrapping the body in try/catch and delegating to _onTestEnd avoids JIRA failures bubbling into the test run, which is exactly what you want here. You might make the log slightly more actionable by including the test identity, e.g., test.title or test.id, so operators can correlate rapidly when this fires.


120-155: v3 issue/comment endpoints look correct; consider checking ok on non-search calls

The migrations to /rest/api/3/issue/${existing.key}, /rest/api/3/issue/${existing.key}/comment, /rest/api/3/issue, and /rest/api/3/issue/${issue}/comment are syntactically consistent with the v3 REST API and the search change.

Right now, only the search request checks response.ok; the update/create/comment calls will silently proceed even on 4xx/5xx (and may then try to parse or use a missing key). Given you now have a top-level try/catch, it would be reasonable to promote HTTP failures here into thrown errors so they get logged in the same way as other failures.

For example, for the create call around Line [184]:

- const responseIssue = await fetch(`${this.url}/rest/api/3/issue`, { ... });
-
- const issue = (await responseIssue.json()).key;
+ const responseIssue = await fetch(`${this.url}/rest/api/3/issue`, { ... });
+ if (!responseIssue.ok) {
+   throw new Error(`JIRA: Failed to create issue: ${responseIssue.status} ${responseIssue.statusText}`);
+ }
+ const issue = (await responseIssue.json()).key;

(and similarly for the update/comment requests if you want consistent behavior).

Please verify against your JIRA instance (or its REST API docs) that these v3 endpoints and error-handling expectations match your deployment, and that the reporter still behaves as intended when JIRA returns non‑2xx responses.

Also applies to: 184-214

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 062e464 and 600c8ce.

📒 Files selected for processing (1)
  • apps/meteor/reporters/jira.ts (7 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/reporters/jira.ts

@ggazzo ggazzo merged commit b315fba into develop Dec 8, 2025
51 checks passed
@ggazzo ggazzo deleted the test/report/jira branch December 8, 2025 16:23
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
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.

4 participants