Skip to content

Fix secondary launch log upload#296

Merged
HardNorth merged 10 commits into
developfrom
fix-secondary-launch-log-upload
Sep 15, 2025
Merged

Fix secondary launch log upload#296
HardNorth merged 10 commits into
developfrom
fix-secondary-launch-log-upload

Conversation

@HardNorth

@HardNorth HardNorth commented Sep 15, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • More reliable launch finalization and log flushing so batched logs are sent before JVM exit; finish flow reordered and more tolerant of executor shutdowns.
  • Documentation

    • CHANGELOG updated to note guaranteed log sending before JVM exit for secondary launches.
  • Tests

    • Tests adapted to the updated finish and log-flush behavior.
  • Style

    • Widespread formatting and minor cleanup with no behavioral changes.
  • Reliability

    • Image handling now validates unreadable content and surfaces a clear I/O error.

@coderabbitai

coderabbitai Bot commented Sep 15, 2025

Copy link
Copy Markdown

Walkthrough

Refactors launch lifecycle and log emission (renamed emitter factory, new start/completeLogEmitter, additional constructors), reorders PrimaryLaunch.finish cleanup, changes SecondaryLaunch.finish to aggregate and wait on all children then flush logs, adds minor utilities/formatting edits and a CHANGELOG entry.

Changes

Cohort / File(s) Summary
Changelog / Docs
CHANGELOG.md
Added “Fixed” entry under Unreleased: ensure all logs are sent before JVM exit for secondary launches.
Launch lifecycle & log emission
src/main/java/com/epam/reportportal/service/LaunchImpl.java, src/main/java/com/epam/reportportal/service/launch/PrimaryLaunch.java, src/main/java/com/epam/reportportal/service/launch/SecondaryLaunch.java
Renamed getLogEmittercreateLogEmitter; added protected constructors (including one taking a LoggingSubscriber and one taking Maybe launchMaybe); added completeLogEmitter(); introduced start(boolean) and public start(); reduced visibility of previous completion method; PrimaryLaunch.finish now runs cleanup after super.finish; SecondaryLaunch.finish now concatenates/waits on all queue children, calls completeLogEmitter() before stop/lock finalization.
Launch map / TreeItem
src/main/java/com/epam/reportportal/service/LaunchImpl.java (nested)
Added ComputationConcurrentHashMap.getOrCompute(Maybe<String> key) to atomically get-or-create TreeItem.
Tests
src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java
Updated to use finish(...) instead of direct completable blocking call; adjusted imports and log assertions; added simulateFinishLaunchResponse call.
Image handling
src/main/java/com/epam/reportportal/utils/files/ImageConverter.java
Use try-with-resources for input stream; check ImageIO.read result and throw IOException on unreadable content.
HTTP utilities
src/main/java/com/epam/reportportal/utils/http/HttpRequestUtils.java, src/main/java/com/epam/reportportal/utils/http/ClientUtils.java
Import reorder/add (ByteSource), formatting/rewrap of multipart and proxy setup code; no behavioral change.
Formatting / minor refactors & imports
src/main/java/com/epam/reportportal/aspect/StepNameUtils.java, src/main/java/com/epam/reportportal/listeners/LogLevel.java, src/main/java/com/epam/reportportal/service/logs/LogBatchingFlowable.java, src/main/java/com/epam/reportportal/utils/AttributeParser.java, src/main/java/com/epam/reportportal/utils/ClientIdProvider.java, src/main/java/com/epam/reportportal/utils/ParameterUtils.java, src/main/java/com/epam/reportportal/utils/TestCaseIdUtils.java, src/main/java/com/epam/reportportal/utils/Waiter.java, src/main/java/com/epam/reportportal/utils/formatting/ExceptionUtils.java, src/main/java/com/epam/reportportal/utils/formatting/MarkdownUtils.java, src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateConfiguration.java, src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java, src/main/java/com/epam/reportportal/utils/properties/OutputTypes.java, src/main/java/com/epam/reportportal/utils/properties/PropertiesLoader.java
Predominantly whitespace/formatting, minor stream/lambda reflows, Javadoc spacing, removed unused imports; TemplateProcessing now logs exception with stacktrace and uses String.join for joining fields; enum constants reformatted to one-per-line.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant LaunchImpl
  participant LogEmitter
  participant PrimaryLaunch
  participant SecondaryLaunch
  participant RP as ReportPortalClient

  rect rgba(230,245,255,0.6)
    Caller->>LaunchImpl: start() / start(statistics)
    LaunchImpl->>LaunchImpl: lazily start launch (Maybe<String>) with caching
    LaunchImpl->>LogEmitter: createLogEmitter(...)  -- create & subscribe batched emitter
  end

  rect rgba(255,250,230,0.6)
    Caller->>PrimaryLaunch: finish(rq)
    PrimaryLaunch->>LaunchImpl: super.finish(rq)
    LaunchImpl->>LogEmitter: completeLogEmitter()  -- flush remaining batches
    PrimaryLaunch-->>PrimaryLaunch: stopRunning(), lock.finishInstanceUuid(uuid)  -- moved after super.finish
  end

  rect rgba(240,255,240,0.6)
    Caller->>SecondaryLaunch: finish(rq)
    SecondaryLaunch->>SecondaryLaunch: concat all queue children -> Completable
    SecondaryLaunch->>SecondaryLaunch: waitForItemsCompletion(...)
    SecondaryLaunch->>LaunchImpl: completeLogEmitter()
    LaunchImpl->>LogEmitter: flush remaining batched logs
    SecondaryLaunch-->>SecondaryLaunch: stopRunning(), lock.finishInstanceUuid(uuid)
  end

  RP-->>LogEmitter: acknowledgements
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

I thump my paw: “Flush logs before we go!”
Queues hum, batches leap, then down the burrow flow.
Primary tidies last, Secondary waits its turn,
Start winds up softly, emitters learn to burn.
Rabbit hops off, commits safe — carrot earned. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix secondary launch log upload" concisely captures the primary intent of the changeset—ensuring logs from secondary launches are fully uploaded/flushed (e.g., SecondaryLaunch.finish rework and LaunchImpl log-flush additions) — and matches the changelog entry and test updates. It is specific, focused on the main issue, and avoids noisy wording or irrelevant details. The title does not need to enumerate refactors or helper changes to be effective for history scanning.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-secondary-launch-log-upload

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62b5a35 and a93fb57.

📒 Files selected for processing (1)
  • src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: build

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
src/main/java/com/epam/reportportal/utils/files/ImageConverter.java (1)

55-66: Close the input stream and guard against null BufferedImage

ImageIO.read(InputStream) does not close the stream and may return null for unsupported formats. Current code risks a resource leak and NPE on image.getWidth(...).

Apply this diff:

-    BufferedImage image = ImageIO.read(source.openBufferedStream());
-    final BufferedImage blackAndWhiteImage = new BufferedImage(
-            image.getWidth(null),
-            image.getHeight(null),
-            BufferedImage.TYPE_BYTE_GRAY
-    );
+    try (java.io.InputStream in = source.openBufferedStream()) {
+        BufferedImage image = ImageIO.read(in);
+        if (image == null) {
+            throw new IOException("Unsupported or unreadable image content");
+        }
+        final BufferedImage blackAndWhiteImage = new BufferedImage(
+                image.getWidth(),
+                image.getHeight(),
+                BufferedImage.TYPE_BYTE_GRAY
+        );
+        final Graphics2D graphics2D = (Graphics2D) blackAndWhiteImage.getGraphics();
+        graphics2D.drawImage(image, 0, 0, null);
+        graphics2D.dispose();
+        return convertToInputStream(blackAndWhiteImage);
+    }
-    final Graphics2D graphics2D = (Graphics2D) blackAndWhiteImage.getGraphics();
-    graphics2D.drawImage(image, 0, 0, null);
-    graphics2D.dispose();
-    return convertToInputStream(blackAndWhiteImage);
🧹 Nitpick comments (3)
src/main/java/com/epam/reportportal/utils/AttributeParser.java (1)

151-152: Trim values before creating attributes

Pre-trimming avoids persisting leading/trailing spaces while preserving existing blank filtering.

Apply this diff:

-            return Arrays.stream(values).filter(StringUtils::isNotBlank).map(v -> createItemAttribute(key, v)).collect(Collectors.toList());
+            return Arrays.stream(values)
+                    .filter(Objects::nonNull)
+                    .map(String::trim)
+                    .filter(StringUtils::isNotBlank)
+                    .map(v -> createItemAttribute(key, v))
+                    .collect(Collectors.toList());
src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java (1)

331-331: Minor: make test more robust to unrelated logs.

Consider asserting the presence of the expected pair rather than exact size to reduce incidental flakiness on slower CI.

-		assertThat(logRequests, hasSize(1));
-		Pair<String, String> log = logRequests.get(0);
-		assertThat(log.getKey(), equalTo(LogLevel.DEBUG.name()));
-		assertThat(log.getValue(), equalTo(logMessage));
+		assertThat(logRequests, hasItem(equalTo(Pair.of(LogLevel.DEBUG.name(), logMessage))));
src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1)

153-155: LGTM: clearer single‑line warning.

Optional micro‑nit: String.join(templateConfig.getFieldDelimiter(), fields) reads a bit cleaner than stream + collector.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01011f7 and 1ce6956.

📒 Files selected for processing (22)
  • CHANGELOG.md (1 hunks)
  • src/main/java/com/epam/reportportal/aspect/StepNameUtils.java (2 hunks)
  • src/main/java/com/epam/reportportal/listeners/LogLevel.java (1 hunks)
  • src/main/java/com/epam/reportportal/service/LaunchImpl.java (11 hunks)
  • src/main/java/com/epam/reportportal/service/launch/PrimaryLaunch.java (1 hunks)
  • src/main/java/com/epam/reportportal/service/launch/SecondaryLaunch.java (2 hunks)
  • src/main/java/com/epam/reportportal/service/logs/LogBatchingFlowable.java (0 hunks)
  • src/main/java/com/epam/reportportal/utils/AttributeParser.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/ClientIdProvider.java (0 hunks)
  • src/main/java/com/epam/reportportal/utils/ParameterUtils.java (3 hunks)
  • src/main/java/com/epam/reportportal/utils/TestCaseIdUtils.java (6 hunks)
  • src/main/java/com/epam/reportportal/utils/Waiter.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/files/ImageConverter.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/formatting/ExceptionUtils.java (2 hunks)
  • src/main/java/com/epam/reportportal/utils/formatting/MarkdownUtils.java (2 hunks)
  • src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateConfiguration.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/http/ClientUtils.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/http/HttpRequestUtils.java (3 hunks)
  • src/main/java/com/epam/reportportal/utils/properties/OutputTypes.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/properties/PropertiesLoader.java (4 hunks)
  • src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java (3 hunks)
💤 Files with no reviewable changes (2)
  • src/main/java/com/epam/reportportal/service/logs/LogBatchingFlowable.java
  • src/main/java/com/epam/reportportal/utils/ClientIdProvider.java
🧰 Additional context used
🧬 Code graph analysis (5)
src/main/java/com/epam/reportportal/aspect/StepNameUtils.java (1)
src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1)
  • TemplateProcessing (40-272)
src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java (2)
src/main/java/com/epam/reportportal/utils/StaticStructuresUtils.java (1)
  • StaticStructuresUtils (26-112)
src/test/java/com/epam/reportportal/test/TestUtils.java (1)
  • TestUtils (48-347)
src/main/java/com/epam/reportportal/utils/TestCaseIdUtils.java (2)
src/main/java/com/epam/reportportal/service/item/TestCaseIdEntry.java (1)
  • TestCaseIdEntry (24-61)
src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1)
  • TemplateProcessing (40-272)
src/main/java/com/epam/reportportal/utils/http/HttpRequestUtils.java (1)
src/main/java/com/epam/reportportal/utils/files/ByteSource.java (1)
  • ByteSource (30-107)
src/main/java/com/epam/reportportal/service/LaunchImpl.java (1)
src/main/java/com/epam/reportportal/utils/StaticStructuresUtils.java (1)
  • StaticStructuresUtils (26-112)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (26)
src/main/java/com/epam/reportportal/utils/Waiter.java (1)

122-126: Javadoc touch-up LGTM

Accurately reflects current behavior; no code changes.

CHANGELOG.md (1)

4-5: Changelog entry reads well

Clear and consistent with prior entries.

src/main/java/com/epam/reportportal/utils/formatting/MarkdownUtils.java (1)

92-93: Formatting-only tweaks look good

Stream and spacing changes are no-ops; readability is fine.

Also applies to: 136-137

src/main/java/com/epam/reportportal/listeners/LogLevel.java (1)

23-29: Enum formatting LGTM

No behavioral changes; aligns with enum style elsewhere.

src/main/java/com/epam/reportportal/utils/properties/OutputTypes.java (1)

22-23: Enum formatting LGTM

Style-only; no API changes.

src/main/java/com/epam/reportportal/utils/http/HttpRequestUtils.java (2)

64-72: Multipart parts reflow is a no-op

Only formatting; deprecated RequestBody.create kept for back-compat as noted.

Also applies to: 89-94


21-21: Approve — keep project's ByteSource import

No occurrences of com.google.common.io.ByteSource were found in the repository; using com.epam.reportportal.utils.files.ByteSource is correct.

src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateConfiguration.java (1)

81-84: Formatting-only change looks good.

The equals method has been reformatted for better readability while maintaining the same logic and field comparisons.

src/main/java/com/epam/reportportal/utils/formatting/ExceptionUtils.java (1)

44-45: Formatting-only change looks good.

The stream operation has been reformatted across multiple lines for better readability without changing the logic.

src/main/java/com/epam/reportportal/utils/http/ClientUtils.java (1)

46-62: Formatting improvements enhance readability.

The method signature and lambda expressions have been reformatted to single lines, making the code more concise while preserving functionality.

src/main/java/com/epam/reportportal/utils/TestCaseIdUtils.java (2)

83-83: Loop declaration condensed appropriately.

The multi-line for-loop declaration has been collapsed to a single line, improving code compactness without affecting readability.


157-160: Stream operations reformatted consistently.

The parameter mapping and template processing calls have been consolidated to single lines, maintaining consistency with the project's formatting style.

src/main/java/com/epam/reportportal/utils/ParameterUtils.java (1)

149-152: Stream concatenation reformatted for clarity.

The Stream.concat operation has been reformatted with better indentation, making the structure of the concatenated streams more apparent.

src/main/java/com/epam/reportportal/utils/properties/PropertiesLoader.java (1)

94-95: Nested Optional operations condensed effectively.

The fallback chain for property resolution has been reformatted to a more compact form while maintaining readability.

src/main/java/com/epam/reportportal/service/LaunchImpl.java (7)

144-145: Good refactoring: renamed method improves clarity.

Renaming getLogEmitter to createLogEmitter better reflects that this method creates a new emitter rather than retrieving an existing one.


163-195: Well-structured new constructors expand API flexibility.

The addition of protected constructors provides better flexibility for subclasses while maintaining clean separation of concerns.


439-453: Critical fix: New completeLogEmitter() method ensures log delivery.

This is the key fix for the secondary launch log upload issue. The method properly:

  1. Checks if the emitter is already complete
  2. Sends a final log message to flush any pending batches
  3. Waits for the last batch to be processed before completing
  4. Uses a timeout to prevent indefinite blocking

This ensures all logs are sent before JVM exit, which was the core issue being addressed.


493-493: Good integration of the new log completion mechanism.

The finish method now properly calls completeLogEmitter() to ensure all logs are flushed before terminating, which directly addresses the PR's objective.


953-986: Well-designed public API additions to TreeItem.

The new public methods provide necessary access for subclasses while maintaining encapsulation:

  • withParent() - Builder pattern for setting parent
  • addToQueue() - Controlled child addition
  • getChildren() - Safe copy return
  • getParent() - Simple getter

These changes appear to support the reworked SecondaryLaunch.finish logic mentioned in the summary.


996-998: Good atomic operation encapsulation.

The new getOrCompute() method properly encapsulates the atomic computeIfAbsent operation, providing a cleaner API for the concurrent map usage.


417-421: Verify visibility change impact on existing consumers.

Method completeLogCompletables() was changed from public to private — confirm no external callers or downstream modules depend on it.

Location: src/main/java/com/epam/reportportal/service/LaunchImpl.java (≈ lines 417–421)

private Completable completeLogCompletables() {
    Completable items = Completable.merge(logCompletables);
    logCompletables.clear();
    return items;
}

Run locally to verify:

  • git grep -n "completeLogCompletables" || true
  • rg -n "completeLogCompletables" --hidden -S -g '!/test/' || true
  • rg -n '"completeLogCompletables"' -S || true # catch reflection/string usages

If any external usage exists, restore visibility or update callers.

src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java (3)

27-27: LGTM: uses shared constant for filtering.

Switching to StaticStructuresUtils.LAUNCH_FINISHED_MESSAGE avoids string drift between prod and tests.


297-297: LGTM: reduced suppression scope.

Dropping ResultOfMethodCallIgnored is correct after removing blockingAwait(...).


325-325: Finish instead of manual log awaits — good.

Calling launch.finish(...) aligns the test with the new flushing path.

src/main/java/com/epam/reportportal/service/launch/SecondaryLaunch.java (1)

38-38: LGTM: required import.

src/main/java/com/epam/reportportal/aspect/StepNameUtils.java (1)

49-50: LGTM: formatting‑only, behavior preserved.

Also applies to: 72-73, 80-80

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/com/epam/reportportal/service/LaunchImpl.java (1)

349-352: Align executor-shutdown handling: throw or return Maybe.empty()

Found: LaunchImpl constructors throw InternalReportPortalClientException when given a shutdown ExecutorService (src/main/java/com/epam/reportportal/service/LaunchImpl.java:178–182 and 222–226), but start() logs and returns Maybe.empty() when the executor is shut down (src/main/java/com/epam/reportportal/service/LaunchImpl.java:349–352). The codebase also uses Maybe.empty() for NOOP defaults (e.g., src/main/java/com/epam/reportportal/service/Launch.java:244).

Action (choose one):

  • Make start() throw InternalReportPortalClientException to match constructor precondition checks — update callers/tests.
  • Or keep start() returning Maybe.empty() and document runtime-no-op behavior in Javadoc; ensure all callers tolerate empty Maybe.

Apply the chosen approach consistently across LaunchImpl and related APIs.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce6956 and 4b82e4e.

📒 Files selected for processing (2)
  • src/main/java/com/epam/reportportal/service/LaunchImpl.java (11 hunks)
  • src/main/java/com/epam/reportportal/service/launch/PrimaryLaunch.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/epam/reportportal/service/launch/PrimaryLaunch.java
🧰 Additional context used
🧬 Code graph analysis (1)
src/main/java/com/epam/reportportal/service/LaunchImpl.java (1)
src/main/java/com/epam/reportportal/utils/StaticStructuresUtils.java (1)
  • StaticStructuresUtils (26-112)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: build
🔇 Additional comments (12)
src/main/java/com/epam/reportportal/service/LaunchImpl.java (12)

144-156: LGTM! Method renamed for clarity

The rename from getLogEmitter to createLogEmitter better reflects that this method creates and configures a new log emitter rather than simply retrieving an existing one.


163-194: Enhanced constructor with comprehensive documentation

The constructor documentation clearly explains the parameters and their purposes. The validation of the executor service shutdown state is appropriate to prevent issues with resource management.


196-207: Clean convenience constructor implementation

The constructor provides a sensible default by using the standard LoggingSubscriber, reducing boilerplate for common use cases.


209-236: Well-documented constructor for existing launch scenarios

The constructor properly handles the case where a launch ID is already available, with appropriate documentation explaining the behavior difference.


244-253: Good scheduler management with proper documentation

The method documentation clearly explains the one-scheduler-per-executor mapping, which is important for understanding the resource management strategy.


284-291: Added getter for statistics service

Package-private visibility is appropriate for internal access to the statistics service.


340-365: Enhanced start method with statistics control

The method provides good error handling for shutdown executors and allows fine-grained control over statistics reporting.


417-421: Method visibility changed to private

The method completeLogCompletables() has been changed from public to private visibility, which is appropriate since it's an internal implementation detail.


434-453: New centralized log emitter completion method

This method provides a clean way to finalize batched log uploads with proper timeout handling. The implementation ensures the last log batch is sent and waits for processing completion.


460-495: Improved finish method with proper log completion

The finish method now properly calls completeLogEmitter() at the end, ensuring all logs are flushed before the launch completes. The error handling for shutdown executors is consistent with the start method.


948-957: Enhanced TreeItem documentation

The TreeItem class methods now have comprehensive Javadoc documentation that clearly explains their purpose and behavior, improving code maintainability.

Also applies to: 959-966, 968-976, 978-986


990-999: Well-documented ComputationConcurrentHashMap method

The getOrCompute method documentation clearly explains its atomic behavior for getting or creating TreeItem instances.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1)

105-107: Log the exception for diagnosability

Include the caught throwable in the log to retain the stack trace.

-			LOGGER.error("Unable to parse: {}", templatePart);
+			LOGGER.error("Unable to parse: {}", templatePart, e);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b82e4e and 62b5a35.

📒 Files selected for processing (3)
  • src/main/java/com/epam/reportportal/utils/files/ImageConverter.java (1 hunks)
  • src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1 hunks)
  • src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/java/com/epam/reportportal/utils/files/ImageConverter.java
  • src/test/java/com/epam/reportportal/service/step/ManualNestedStepTest.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: build
🔇 Additional comments (1)
src/main/java/com/epam/reportportal/utils/formatting/templating/TemplateProcessing.java (1)

151-153: Good simplification: replace stream join with String.join

Semantics are unchanged; simpler and marginally cheaper. Please confirm templateConfig.getFieldDelimiter() is guaranteed non-null (same requirement as before).

@HardNorth HardNorth merged commit dfc320f into develop Sep 15, 2025
3 checks passed
@HardNorth HardNorth deleted the fix-secondary-launch-log-upload branch September 15, 2025 19:38
@coderabbitai coderabbitai Bot mentioned this pull request Oct 15, 2025
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