Skip to content

EPMRPP-113709 || Introduce the retry_of property for JS agents#260

Open
maria-hambardzumian wants to merge 1 commit intodevelopfrom
feature/EPMRPP-113709-Introduce-the-retry_of-property-for-JS-agents
Open

EPMRPP-113709 || Introduce the retry_of property for JS agents#260
maria-hambardzumian wants to merge 1 commit intodevelopfrom
feature/EPMRPP-113709-Introduce-the-retry_of-property-for-JS-agents

Conversation

@maria-hambardzumian
Copy link
Copy Markdown
Contributor

@maria-hambardzumian maria-hambardzumian commented Apr 15, 2026

Summary by CodeRabbit

  • New Features
    • Retry test items now automatically populate the retryOf property with the UUID of the previous attempt, enabling improved retry chain tracking and visibility.

@maria-hambardzumian
Copy link
Copy Markdown
Contributor Author

maria-hambardzumian commented Apr 15, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

Walkthrough

The changes implement retry chain tracking for test items, automatically populating a retryOf property with the UUID of the previous attempt when a test is retried. The implementation adds internal map management, extends type definitions, includes comprehensive test coverage, and documents the new feature.

Changes

Cohort / File(s) Summary
Type Definitions
index.d.ts
Extended StartTestItemOptions with retry, retryOf, codeRef, parameters, uniqueId, and testCaseId properties; added retry and retryOf to FinishTestItemOptions.
Core Implementation
lib/report-portal-client.js
Added itemRetriesChainLastTempIdMap to track the most recent tempId per retry-chain key; updated startTestItem to populate retryOf from the previous attempt's realId when creating a retried item; extended cleanup logic to remove the new map entry.
Test Coverage
__tests__/report-portal-client.spec.js
Added cleanItemRetriesChain test and extended startTestItem tests to validate retry-chain behavior, including correct retryOf population, multi-retry sequences, and tracking of first retry-chain tempIds.
Documentation
CHANGELOG.md
Documented the new retryOf property behavior in the changelog under "Added" section.

Sequence Diagram

sequenceDiagram
    participant Client
    participant itemRetriesChainLastTempIdMap as Retry Chain Map
    participant itemRetriesChainMap as Item Retries Map
    participant API as REST API

    Client->>Client: startTestItem(retry: true)
    Client->>itemRetriesChainLastTempIdMap: Look up previous tempId
    itemRetriesChainLastTempIdMap-->>Client: Return previous tempId
    Client->>itemRetriesChainMap: Get previous item's realId
    itemRetriesChainMap-->>Client: Return realId
    Client->>Client: Set retryOf = realId
    Client->>API: Create item with retryOf
    API-->>Client: Return new item with realId
    Client->>itemRetriesChainLastTempIdMap: Update with new tempId
    itemRetriesChainLastTempIdMap-->>Client: Stored for next retry
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 A chain of retries, now perfectly tracked,
With UUIDs linking each test back,
The rabbit's map remembers what came before,
Each retry knows where to look—and more!
From tempId to realId, the path is clear,
Retry chains flourish without fear! 🔗

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the main change: introducing the retry_of property for JS agents, which is the primary objective reflected in all modified files (CHANGELOG.md, tests, type definitions, and implementation).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/EPMRPP-113709-Introduce-the-retry_of-property-for-JS-agents

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.

Copy link
Copy Markdown

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

🧹 Nitpick comments (1)
CHANGELOG.md (1)

1-2: Consider adding a version header for unreleased changes.

The new entry is added under ### Added without a version header (e.g., ## [Unreleased] or ## [5.5.11]). Previous entries follow the pattern ## [version] - date. This helps maintain consistency and clarifies which version will include this feature.

📝 Suggested format
+## [Unreleased]
 ### Added
 - `retryOf` property automatically populated with the UUID of the previous retry attempt when starting a retried test item.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 1 - 2, Add a version header above the "### Added"
section to follow the existing changelog pattern (e.g., insert "## [Unreleased]"
or the target version like "## [5.5.11] - YYYY-MM-DD") so the new entry about
the `retryOf` property is grouped under a proper release heading; ensure the
`### Added` block remains intact and the `retryOf` line stays unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CHANGELOG.md`:
- Around line 1-2: Add a version header above the "### Added" section to follow
the existing changelog pattern (e.g., insert "## [Unreleased]" or the target
version like "## [5.5.11] - YYYY-MM-DD") so the new entry about the `retryOf`
property is grouped under a proper release heading; ensure the `### Added` block
remains intact and the `retryOf` line stays unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52a5ffab-882d-4d95-8c9b-72d6f94a6a41

📥 Commits

Reviewing files that changed from the base of the PR and between 2f6da92 and d746500.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • __tests__/report-portal-client.spec.js
  • index.d.ts
  • lib/report-portal-client.js

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