Skip to content

fix(query): use SUITE type filter in test target#16

Merged
silvi-t merged 1 commit into
Kuadrant:mainfrom
silvi-t:fix-test-target-filtering
May 14, 2026
Merged

fix(query): use SUITE type filter in test target#16
silvi-t merged 1 commit into
Kuadrant:mainfrom
silvi-t:fix-test-target-filtering

Conversation

@silvi-t
Copy link
Copy Markdown
Contributor

@silvi-t silvi-t commented May 13, 2026

PR description:

Summary

  • Fix --test-target filter in rptool query failing with "No test target found"
  • _resolve_test_target was filtering by type=TEST but test targets are SUITE type items in ReportPortal

Test plan

  • rptool query --launch-name "nightly-all #609" --test-target kuadrant --status FAILED --names-only returns expected results

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved test target resolution to correctly identify suite-type items in ReportPortal instead of test-type items, ensuring more accurate target selection.

Review Change Stack

Signed-off-by: Silvia Tarabova <starabov@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abae5d82-cfa3-40f5-9b36-311b499b550e

📥 Commits

Reviewing files that changed from the base of the PR and between 20e2e91 and ccd24cc.

📒 Files selected for processing (1)
  • src/reportportal/rp_query.py

📝 Walkthrough

Walkthrough

A single-line change to _resolve_test_target() that switches the ReportPortal API item type filter from TEST to SUITE when querying for the parent item ID based on the provided test target name.

Changes

ReportPortal Item Type Filter

Layer / File(s) Summary
ReportPortal item type filter for test target resolution
src/reportportal/rp_query.py
The _resolve_test_target() function now filters ReportPortal items by SUITE type instead of TEST type when locating the parent item ID for the specified target name.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Kuadrant/testsuite-rptool#1: Both PRs modify src/reportportal/rp_query.py's _resolve_test_target() logic for --test-target resolution, with this PR switching the item type lookup from TEST to SUITE.

Suggested reviewers

  • zkraus

Poem

🐰 A filter changed from TEST to SUITE,
One line tweaked, the query's more astute,
ReportPortal items now align,
With parent types so fine and divine! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarises the main change: updating the test target filter from TEST type to SUITE type in the query logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@silvi-t silvi-t requested a review from zkraus May 13, 2026 11:30
Copy link
Copy Markdown
Contributor

@zkraus zkraus left a comment

Choose a reason for hiding this comment

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

LGTM.

@silvi-t silvi-t merged commit 7aa4f20 into Kuadrant:main May 14, 2026
4 checks passed
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.

2 participants