Skip to content

fix: separate CLI launch description from info-collector description#10

Merged
silvi-t merged 1 commit into
mainfrom
description-fix
Apr 17, 2026
Merged

fix: separate CLI launch description from info-collector description#10
silvi-t merged 1 commit into
mainfrom
description-fix

Conversation

@silvi-t
Copy link
Copy Markdown
Contributor

@silvi-t silvi-t commented Apr 15, 2026

Summary

  • Combine --launch-description with __rp_launch_description using \n\n separator instead of replacing one with the other
  • Remove description from start_launch to prevent RP client from concatenating start and finish descriptions without separation

Problem

When --launch-description "some description" was passed via pipeline, it appeared glued to the "Environment Information" heading with no line break:

some description Environment Information (2 clusters)

Solution

  • Build the full combined description before starting the launch (CLI description + \n\n + info-collector description)
  • Pass description only in finish_launch, not in start_launch

Result

some description
Environment Information (2 clusters)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • CLI-provided and promoted launch descriptions are now combined only when present, joined cleanly, and consistently shown in final reports.
    • Prevented empty or duplicated description fragments so the final report description reflects the intended content and timing.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 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: 858b421e-a759-497b-86f0-378f331549f0

📥 Commits

Reviewing files that changed from the base of the PR and between 2be8c43 and 8339ebb.

📒 Files selected for processing (1)
  • src/reportportal/writer.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/reportportal/writer.py

📝 Walkthrough

Walkthrough

Reworked launch description flow: the code no longer passes an initial description to start_launch; it computes a promoted_description, builds a final_launch_description by joining non-empty self.options.launch_description and promoted_description with \n\n, starts the launch without a description, and sends final_launch_description to finish_launch().

Changes

Cohort / File(s) Summary
Launch description handling
src/reportportal/writer.py
Removed initial_launch_description usage and stop passing description to rp_client.start_launch(); compute promoted_description, build final_launch_description by conditionally joining self.options.launch_description and promoted_description (joined with \n\n when both present), and pass it to rp_client.finish_launch(); minor control-flow adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble at lines, then paste them neat,

I join two whispers with a gentle beat,
Start quiet, finish with the tale aligned,
A stitched-up note for later to find.

🚥 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 title clearly and specifically describes the main change: separating CLI launch description from info-collector description to fix their formatting.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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 description-fix

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 April 15, 2026 08:03
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.

Suggested change for a discussion.

@@ -158,15 +157,15 @@ def _process_test_suites(self, parser: JUnitParser, launch_name: str) -> Optiona
if promoted_props is not None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would propose a simplification. The end goal is to have

{cli_desc}
{separator}
{collector_desc}

While either of those is optional. I think we could simplify this as:

description_list = []

if promoted_description:
    description_list.append(promoted_description)

if initial_launch_description:
    description_list.append(initial_launch_description)

final_launch_description "\n\n".join(description_list)

This way, both are ordered, optional, and separator is there if necessary. Also if we will find another source of description that we need to concatenate, it is easier to extend.

WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we could rename initial_launch_description as cli_launch_description or cofiguration_lauch_descriptoin ? to express it is coming from cli or configuration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've implemented the changes you suggested. I just rearranged the order so that cli_description is first. I think it's better if you intentionally add a description there then you'll see it right at the beginning.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, thank you, I was not meaning to swap the order. You are correct.

@silvi-t silvi-t requested a review from zkraus April 15, 2026 14:15
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.

Sorry to force another round of changes, looking at the simplified code now, I see another room for improvement.

Refactor redundant if statement with promoted_desc

Otherwise it looks great.

@@ -158,15 +157,15 @@ def _process_test_suites(self, parser: JUnitParser, launch_name: str) -> Optiona
if promoted_props is not None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, thank you, I was not meaning to swap the order. You are correct.

Comment thread src/reportportal/writer.py Outdated
Signed-off-by: Silvia Tarabova <starabov@redhat.com>
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.

LGMT

@silvi-t silvi-t merged commit 2f3848e into main Apr 17, 2026
4 checks passed
@silvi-t silvi-t deleted the description-fix branch April 28, 2026 10:28
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