Skip to content

refactor(bbb-web): Log Conversion Process Output - #23321

Merged
antobinary merged 5 commits into
bigbluebutton:v3.0.x-releasefrom
paultrudel:log-process-output
Jun 10, 2025
Merged

antobinary merged 5 commits into
bigbluebutton:v3.0.x-releasefrom
paultrudel:log-process-output

Conversation

@paultrudel

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds support for logging conversion process output from the handlers that wrap the processes. Data is logged to the bbb-web.log. Log data coming from stdout is logged at the debug level to not pollute the bbb-web logs. Log data from stderr is logged at the error level. Each process is also assigned a unique ID to make tracing any issues easier.

Motivation

This additional logging will give up better insight into the functioning of the conversion processes and make debugging any issues much easier.

@coderabbitai

coderabbitai Bot commented Jun 4, 2025 •

Copy link
Copy Markdown
Contributor
## Walkthrough

This change introduces unique identifier strings for each process handler instance used in the presentation conversion pipeline. Constructors for handler classes such as `ImageResizerHandler`, `ImageResolutionServiceHandler`, `Office2PdfConverterHandler`, `PdfPageCounterHandler`, `Png2SvgConversionHandler`, `SvgConversionHandler`, `Pdf2PngPageConverterHandler`, `AddNamespaceToSvgHandler`, and `PdfFontType3DetectorHandler` are updated to accept an `id` parameter, which is stored in a new private field. The `getIdTag()` method is overridden in each handler to return this identifier. Instantiations of these handlers throughout the codebase now provide descriptive, unique IDs based on job type, presentation ID, file name, or page number. Additionally, `AbstractCommandHandler` adds logging enhancements and public methods to access collected output.

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Client
    participant MainService
    participant Handler as ProcessHandler (with ID)
    participant Process

    Client->>MainService: Initiate conversion (e.g., resize, convert PDF)
    MainService->>Handler: Instantiate Handler with unique ID
    MainService->>Process: Start external process
    Process->>Handler: Output events (stdout, stderr, exit)
    Handler->>Handler: Collect output, log with ID tag
    Handler->>MainService: Provide output via getStdout/getStdErr
    MainService->>Client: Return results

Suggested reviewers

  • antobinary
  • ritzalam

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between a8c9c527f3d157f2088ab8ee1bf5f224a2936501 and 2319188d333dfb39d736fa2510a59654d62e71ab.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AbstractCommandHandler.java` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AbstractCommandHandler.java

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (4)</summary>

* GitHub Check: build-package (bbb-web)
* GitHub Check: build-package (others)
* GitHub Check: build-package (bbb-graphql-server)
* GitHub Check: build-package (bbb-playback-record)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIn8AMzQxfAoAClUBMAB3EgEASi4AGXwiSABhfAwpCkR4KusKfAZpZAB5PE8w2MhstGQHAWZ1Gno5SGxESh40b1wKbCVffus7DEcBaYAmAGYdrYBGfixcWBJIACF4IguvYIu8Aix/bnw6ghcNGDPGWExSFAYeaKbAtZBkP4YFr0LylIjwDBlBhobgqeBedTwaSQBKpCI/JjVSh1Bq8ZqtbHMTBoUhjeSZHJ5L4AZW4ongCXgyJ8snCp3OkNo0Vq+OovSo3Hx0nOZLBU2QGHw2UgsLK/PgfHwnTwEXwUsgDNyAg0qpx6JILNwmFoznoWtwXUgaUQuFo9vyOKazH1sopyFQqtp6Fw+qUAmwZWiUl8BHQEnw8HoDDuuBoFARap+qsQ4WyCGi9itGBtFHolCafGdrvLHvtjoDcJiYv5kHLeKjJC8XwAgrRaJiqmgeeESMlYAoibV6lhfYh/ch+nUiOR6GgJhh4EFzon2B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nwRIZMM3iQxnhkvCuiVgURMjNlQBQXwSM1GEARRy88CQEeE9slyVDW8GoDzR1ObFOp+klaNbfaPW01oABuY4HGi9HNYAA5B4MnEz9IIo4/fiKIyhKJsop6Q6f9xETa1fhXRbPIpLzxAi/m6gy2pWKqBaTiS6SHxEwlmmBJiRYSGRFYj8BoBoko/bHokioDJJ3EaSLxAYC1lHx1AAAfUTCIAHZJojaHQAdkmwGMniQwLbP0QPhaAAATgAAMuwAQAAFZDgSkUQAADYBAwc2gAAHYY5gctAInIAAcaAAACwCBkQyc9OVnODlZyEgWwBIOHKzk+y/ZEAdAOHKLkCAEgDAcOckAOAkAY5BwcOenM7lZytgDAG0OnNoAtBE5JAcOQIFoAxzw5eQQOTHIYAVzdEWstAOnIYCBzG5WwROQkB2C0B25a8rYMHM7kqB05CkA4PXPDklytgWctAFsEDk7Bx5wco4HPP9m7ADggcg4J3NoB7AN5CQAQDsEDlJzr5SQLYOHIODBy0A4cqeeXLHlbASAicg4CoErlVyoA9s3AE7J56uyEh7s2gA7MMT6AgAA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=bigbluebutton/bigbluebutton&utm_content=23321):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (6)
bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/SvgConversionHandler.java (2)

17-21: LGTM! Consider adding null check for defensive programming.

The addition of the id field and constructor is well-implemented. The field is appropriately marked as final ensuring immutability after construction.

Consider adding a null check in the constructor for more robust code:

 public SvgConversionHandler(String id) {
+    if (id == null) {
+        throw new IllegalArgumentException("id cannot be null");
+    }
     this.id = id;
 }

19-21: Consider adding null validation for the constructor parameter.

The constructor accepts an id parameter but doesn't validate if it's null. Consider adding a null check to prevent potential issues downstream.

 public SvgConversionHandler(String id) {
+    if (id == null) {
+        throw new IllegalArgumentException("ID cannot be null");
+    }
     this.id = id;
 }
bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfPageCounter.java (2)

45-45: Good implementation of handler identification.

The descriptive ID string follows a consistent pattern and will improve process tracing. The combination of prefix and filename should provide sufficient uniqueness for debugging purposes.

Consider adding null safety for the filename:

-PdfPageCounterHandler pHandler = new PdfPageCounterHandler("pdfpagecount-" + presentationFile.getName());
+String fileName = presentationFile.getName();
+PdfPageCounterHandler pHandler = new PdfPageCounterHandler("pdfpagecount-" + (fileName != null ? fileName : "unknown"));

45-45: Consider null safety when generating the handler ID.

The ID generation uses presentationFile.getName() which could potentially return null, leading to an ID like "pdfpagecount-null". Consider adding a null check or fallback.

-PdfPageCounterHandler pHandler = new PdfPageCounterHandler("pdfpagecount-" + presentationFile.getName());
+String fileName = presentationFile.getName() != null ? presentationFile.getName() : "unknown";
+PdfPageCounterHandler pHandler = new PdfPageCounterHandler("pdfpagecount-" + fileName);
bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java (1)

106-106: Good use of composite ID for uniqueness, but consider null safety.

The ID generation pattern "png2svg-" + pres.getId() + "-" + page effectively creates unique identifiers by combining presentation ID and page number. However, consider adding null safety for pres.getId().

-Png2SvgConversionHandler pHandler = new Png2SvgConversionHandler("png2svg-" + pres.getId() + "-" + page);
+String presId = pres.getId() != null ? pres.getId() : "unknown";
+Png2SvgConversionHandler pHandler = new Png2SvgConversionHandler("png2svg-" + presId + "-" + page);
bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResolutionService.java (1)

43-43: Consistent implementation of the identifier pattern with null safety consideration.

The change follows the established pattern with a descriptive prefix. Same as in PdfPageCounter.java, consider null safety for presentationFile.getName().

-ImageResolutionServiceHandler imgResHandler = new ImageResolutionServiceHandler("imgresolution-" + presentationFile.getName());
+String fileName = presentationFile.getName() != null ? presentationFile.getName() : "unknown";
+ImageResolutionServiceHandler imgResHandler = new ImageResolutionServiceHandler("imgresolution-" + fileName);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c335c48 and dd9023b.

📒 Files selected for processing (16)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AbstractCommandHandler.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AddNamespaceToSvgHandler.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/ImageResizerHandler.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/ImageResolutionServiceHandler.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Office2PdfConverterHandler.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Pdf2PngPageConverterHandler.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/PdfFontType3DetectorHandler.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/PdfPageCounterHandler.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Png2SvgConversionHandler.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/SvgConversionHandler.java (2 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResizerImp.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResolutionService.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfPageCounter.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java (1 hunks)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SvgImageCreatorImp.java (5 hunks)
👮 Files not reviewed due to content moderation or server errors (4)
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/SvgConversionHandler.java
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfPageCounter.java
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java
  • bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResolutionService.java
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build-package (others)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-playback-record)
🔇 Additional comments (37)
bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/SvgConversionHandler.java (3)

17-21: LGTM! Clean implementation of the ID-based logging enhancement.

The addition of the id field and constructor follows good Java practices with proper encapsulation and immutability. The getIdTag() override correctly returns the stored identifier for enhanced process tracking.

Also applies to: 63-66


63-66: Clean implementation of the getIdTag() method.

The override correctly returns the stored identifier, following the expected pattern for process handler identification.


63-66: Clean implementation of the identifier pattern.

The getIdTag() method override correctly returns the stored identifier, following the established pattern for process handler identification.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PdfPageCounter.java (1)

45-45: LGTM! Proper integration of unique handler identification.

The ID string construction using "pdfpagecount-" + presentationFile.getName() provides a descriptive and unique identifier for this PDF page counting process, aligning well with the logging enhancement objectives.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PngCreatorImp.java (2)

106-106: LGTM! Comprehensive ID construction for granular process tracking.

The ID string "png2svg-" + pres.getId() + "-" + page provides excellent granularity by including both presentation ID and page number, enabling precise tracking of individual page conversion processes.


106-106: Excellent use of contextual information for process identification.

The ID string combines presentation ID and page number, which will be particularly valuable for debugging multi-page conversion processes. This follows the established pattern and provides meaningful traceability.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResolutionService.java (2)

43-43: LGTM! Consistent implementation of process identification.

The ID string construction "imgresolution-" + presentationFile.getName() follows the established pattern and provides clear identification for the image resolution detection process.


43-43: Consistent implementation of the identification pattern.

The handler instantiation follows the same descriptive pattern established in other files, using a meaningful prefix and filename. This consistency across the codebase will make debugging and log analysis much easier.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/Office2PdfPageConverter.java (1)

66-66: LGTM! Proper implementation of unique identifier for handler.

The ID construction using "office2pdf-" + pres.getId() ensures uniqueness per presentation and aligns well with the logging enhancement objectives.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/ImageResizerImp.java (2)

49-49: Good approach for generating unique job identifiers.

Using System.currentTimeMillis() provides sufficient uniqueness for logging and debugging purposes in this context.


57-57: LGTM! Proper handler instantiation with unique identifier.

The handler is correctly instantiated with the generated job ID, enabling better process traceability.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/PdfPageCounterHandler.java (2)

35-39: Well-implemented constructor and field initialization.

The id field is properly marked as final and initialized through the constructor, following good encapsulation practices.


55-58: Correct implementation of getIdTag() override.

The method properly returns the stored identifier, enabling unique identification of this handler instance.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/ImageResizerHandler.java (2)

30-34: Clean implementation of identifier support.

The constructor and field initialization follow the same pattern as other handlers, maintaining consistency across the codebase.


36-39: Proper getIdTag() implementation.

The override correctly returns the stored identifier, enabling unique process identification for logging purposes.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/PdfFontType3DetectorHandler.java (2)

30-34: LGTM! Clean implementation of unique identifier support.

The addition of the id field and constructor follows proper Java practices with immutable field design and clear initialization.


48-51: Proper override implementation.

The getIdTag() method override correctly returns the identifier, enabling the logging enhancement functionality.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/ImageResolutionServiceHandler.java (2)

29-33: Consistent implementation of identifier support.

The id field and constructor implementation follows the same clean pattern established across the handler classes.


72-75: Correct getIdTag() override.

The method override properly implements the identifier access for logging purposes.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Office2PdfConverterHandler.java (2)

30-34: Well-implemented identifier functionality.

The id field and constructor maintain consistency with the logging enhancement pattern across all handler classes.


36-39: Proper getIdTag() implementation.

The override correctly provides access to the unique identifier for logging purposes.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AddNamespaceToSvgHandler.java (2)

9-13: Excellent completion of the identifier pattern.

The id field and constructor implementation completes the consistent refactoring across all handler classes for enhanced logging capabilities.


15-18: Consistent getIdTag() override.

The method override maintains the established pattern, ensuring uniform identifier access across the conversion pipeline.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Pdf2PngPageConverterHandler.java (2)

28-32: Clean implementation of unique identifier pattern.

The addition of the id field and constructor follows the consistent pattern being applied across all handlers for improved process traceability and logging.


34-37: Proper override of getIdTag() method.

The method correctly returns the stored identifier, enabling the AbstractCommandHandler's enhanced logging to use meaningful process IDs.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/SvgImageCreatorImp.java (5)

65-65: Well-designed ID pattern for font detection process.

The ID pattern "font3pdf-" + pres.getId() + "-" + page provides clear traceability linking the process to specific presentation and page.


104-104: Consistent ID pattern for PNG to SVG conversion.

The ID "png2svg-" + pres.getId() + "-" + page maintains consistency with other handlers and provides clear process identification.


149-149: Descriptive ID for SVG conversion process.

The ID "pdf2svg-" + pres.getId() + "-" + page clearly identifies the conversion type and associated content.


230-230: Clear identification for PDF to PNG conversion.

The ID "pdf2png-" + pres.getId() + "-" + page follows the established pattern and provides excellent traceability.


294-294: Appropriate ID for SVG namespace processing.

The ID "svg-namespace-" + pres.getId() + "-" + page clearly identifies this specific post-processing step.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/Png2SvgConversionHandler.java (2)

29-33: Consistent ID field implementation.

The ID field and constructor follow the same pattern as other handlers, maintaining consistency across the codebase.


35-38: Proper getIdTag() override.

The method correctly returns the stored ID for use in logging and process identification.

bbb-common-web/src/main/java/org/bigbluebutton/presentation/handlers/AbstractCommandHandler.java (5)

54-59: Enhanced stdout handling with defensive programming.

The addition of null and remaining bytes checks, along with debug logging using process ID tags, significantly improves visibility into process execution while maintaining robustness.


66-69: Improved stderr handling with error-level logging.

The enhanced stderr processing with error-level logging using ID tags will make debugging conversion issues much easier.


75-75: Valuable process exit logging.

Adding exit code logging with process ID context provides crucial information for diagnosing conversion failures.


106-112: Useful public accessor methods for collected output.

These methods provide clean access to the collected stdout and stderr output, which aligns perfectly with the PR objectives of improving process output visibility.


114-120: Well-designed getIdTag() method with appropriate fallback.

The method provides a sensible fallback to "unknown-pid" when the process isn't available, ensuring logging always has a meaningful identifier. Subclasses can override this to provide more descriptive IDs.

@antobinary antobinary added this to the Release 3.0 milestone Jun 4, 2025
@antobinary

Copy link
Copy Markdown
Member

Thank you for adding these!
Could you please include in the description examples of an error? Any specific steps for me to follow to be able to test?

@paultrudel

paultrudel commented Jun 4, 2025 •

Copy link
Copy Markdown
Collaborator Author

Thank you for adding these! Could you please include in the description examples of an error? Any specific steps for me to follow to be able to test?

I don't have any specific example of an error log since I don't have any presentations that cause errors in conversion to test with. Every run of one of the process does output a blank error message. It is just standard and not indicative of an actual problem. You can also upload a presentation and look at the bbb-web logs, assuming you have the log level set to debug, you can see the logs from each process.

An example of what a process log looks like is
[png2svg-{presId}-{page}] some information

@ritzalam

ritzalam commented Jun 5, 2025

Copy link
Copy Markdown
Member

If possible, please add the meetingId and presId in the logs so we can easily filter the logs. Thanks.

@antobinary
antobinary requested a review from gustavotrott June 6, 2025 20:07
paultrudel and others added 2 commits June 9, 2025 16:02
…ndlers/AbstractCommandHandler.java

Co-authored-by: Gustavo Trott <[email protected]>
…ndlers/AbstractCommandHandler.java

Co-authored-by: Gustavo Trott <[email protected]>
@paultrudel
paultrudel requested a review from gustavotrott June 9, 2025 20:04
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 9, 2025

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@gustavotrott gustavotrott left a comment

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.

lgtm

@antobinary
antobinary merged commit 1f87f5c into bigbluebutton:v3.0.x-release Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants