Repository navigation
fix(bbb-web): fix plugins not loading nor running into breakout-rooms - #21525
Conversation
WalkthroughThe pull request introduces several modifications across multiple files related to the handling of breakout rooms and associated plugin properties within the BigBlueButton application. Key changes include the addition of a Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (4)
bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/CreateBreakoutRoom.java (1)
28-28: Add JavaDoc for the pluginProp fieldConsider adding documentation to explain the purpose and expected content of the pluginProp field, similar to other fields in the class.
+ /** + * Properties for plugins that should be enabled in the breakout room. + * Inherited from the parent meeting's plugin configuration. + */ public final Map<String, Object> pluginProp;akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (2)
102-102: Consider adding logging for plugin propagation.To aid in debugging and monitoring, consider adding debug logs when plugin properties are propagated to breakout rooms.
+ log.debug(s"Propagating plugins to breakout room ${breakout.id}") pluginProp = liveMeeting.props.pluginProp,
102-102: Consider adding documentation about plugin behavior.To improve maintainability, consider adding code comments explaining:
- Which plugins are propagated to breakout rooms
- How plugins behave in breakout rooms vs main room
- Any limitations or special considerations
+ // Propagate all plugins from parent meeting to breakout room + // This ensures consistent plugin functionality across main and breakout rooms pluginProp = liveMeeting.props.pluginProp,bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/OldMeetingMsgHdlrActor.scala (1)
129-131: Consider adding error handling for plugin properties.The current implementation directly passes the plugin properties without validation. Consider adding error handling to gracefully handle cases where plugin properties are malformed or incompatible with breakout rooms.
Example improvement:
- msg.body.room.pluginProp, + Option(msg.body.room.pluginProp).getOrElse(Map.empty[String, Object]),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (6)
- akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (1 hunks)
- bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/BreakoutMsgs.scala (2 hunks)
- bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (2 hunks)
- bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java (1 hunks)
- bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/CreateBreakoutRoom.java (4 hunks)
- bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/OldMeetingMsgHdlrActor.scala (1 hunks)
🔇 Additional comments (9)
bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/CreateBreakoutRoom.java (2)
3-4: LGTM: Import addition is appropriateThe added Map import is necessary for the new plugin properties functionality.
Line range hint
28-71: Verify integration with plugin manifest processingThe changes look good for enabling plugin support in breakout rooms. Let's verify the integration points to ensure proper handling of plugin properties.
✅ Verification successful
Based on the results, I can now generate a final response as we have sufficient information about the integration points.
Plugin properties are properly integrated in the breakout room creation flow
The verification shows a complete chain of plugin property handling:
pluginPropis correctly passed from parent meeting to breakout rooms inCreateBreakoutRoomsCmdMsgHdlr.scala- The property is properly propagated through the message system (
BreakoutMsgs.scala,Meeting2x.scala)MeetingService.javahandles the creation with plugin propertiesRunningMeeting.scalaprocesses the plugin properties usingPluginModel.createPluginModelFromJson- Plugin data persistence is handled in
MeetingDAO.scala🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration between CreateBreakoutRoom and plugin manifest processing # Test 1: Check for plugin manifest processing logic echo "Checking for plugin manifest processing..." rg -l "manifest\.json.*plugin" # Test 2: Check for other uses of pluginProp echo "Checking for pluginProp usage..." rg "pluginProp" # Test 3: Check for breakout room creation handling echo "Checking breakout room creation handling..." ast-grep --pattern 'createBreakoutRoom($$$)'Length of output: 3520
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (2)
102-102: LGTM! The plugin property propagation looks correct.The addition of
pluginPropfrom the parent meeting to the breakout room details effectively addresses the core issue of plugins not working in breakout rooms.
102-102: Verify plugin property handling.Let's verify that plugin properties are properly handled throughout the breakout room lifecycle.
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/BreakoutMsgs.scala (2)
3-4: LGTM!The import statement is correctly placed and necessary for the new
pluginPropfield type.
61-61: Verify serialization handling and document the new field.The new
pluginPropfield enables plugin support in breakout rooms, which aligns with the PR objectives. However, please address the following:
- Document the purpose and expected content structure of the
pluginPropfield- Ensure proper serialization/deserialization handling for the new field
Run this script to verify serialization handling:
✅ Verification successful
Let me gather more information about the serialization handling by checking the actual implementation details.
Let me check one more aspect to understand how Scala case classes are serialized in this project.
Let me check the actual serialization implementation in the project.
Based on the gathered information, I can now provide the final response:
The
pluginPropfield is properly handled by the existing serialization frameworkThe codebase uses Jackson for JSON serialization/deserialization with proper Scala support through
DefaultScalaModule. Theutil.Map[String, AnyRef]type is natively supported by Jackson, and the project'sJsonUtilclass is configured to handle null values and unknown properties appropriately. SinceBreakoutRoomDetailis a case class, it automatically gets proper serialization support.Key findings:
- The project uses Jackson with Scala support (DefaultScalaModule)
- Case classes are automatically handled by the serialization framework
util.Map[String, AnyRef]is a standard type that Jackson handles correctly- The serialization configuration in
JsonUtilis properly set up withDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESHowever, documentation of the field's purpose and structure is still needed in the code comments.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for JSON serialization/deserialization code that needs to be updated # Look for JSON serialization/deserialization code rg -l "(?i)(json|jackson|gson|serializ|deserializ).*BreakoutRoomDetail" # Look for any migration scripts or database schema updates rg -l "(?i)(migration|schema|upgrade|database).*BreakoutRoom"Length of output: 295
Script:
#!/bin/bash # Check the implementation of BreakoutRoomDetail and related classes ast-grep --pattern 'case class BreakoutRoomDetail' # Look for any JSON conversion/handling related to BreakoutRoom messages rg -A 5 -B 5 "BreakoutRoomDetail.*(?i)(json|convert|serial|deserial)" # Check if there are any existing plugin property handling in the codebase rg -A 3 "pluginProp.*Map\[String, AnyRef\]"Length of output: 3902
Script:
#!/bin/bash # Check for message serialization patterns in the project rg -A 5 "trait BbbCoreMsg" # Look for any existing serialization utilities or message converters rg -l "(?i)(json|convert|serialize).*Message" --type scala # Check for any documentation about message handling fd README -e md | xargs rg -l "(?i)(message|serialization)"Length of output: 3338
Script:
#!/bin/bash # Check the JsonUtil and Deserializer implementations cat bbb-common-message/src/main/scala/org/bigbluebutton/common2/util/JsonUtil.scala cat bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/Deserializer.scala # Look for existing test cases cat bbb-common-message/src/test/scala/org/bigbluebutton/common2/messages/DeserializerTests.scalaLength of output: 8118
bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/OldMeetingMsgHdlrActor.scala (1)
130-130: LGTM! Verify plugin property propagation.The addition of
pluginPropto theCreateBreakoutRoommessage aligns with the PR objective of enabling plugin functionality in breakout rooms.Let's verify the plugin property propagation chain:
✅ Verification successful
Let me try a different search strategy to verify the plugin property propagation.
Based on the search results, I can now verify the plugin property propagation chain. Let me generate the final response.
Plugin property propagation is correctly implemented
The code shows a complete chain of plugin property propagation from parent meeting to breakout rooms:
pluginPropis properly passed throughCreateBreakoutRoommessage in Java and Scala classes- The property is handled in multiple layers:
OldMeetingMsgHdlrActor.scalapasses it in the messageMeetingService.javapropagates it during breakout room creationCreateBreakoutRoomsCmdMsgHdlr.scalacopies it from parent meeting vialiveMeeting.props.pluginPropRunningMeeting.scalainitializes plugins usingPluginModel.createPluginModelFromJson(props.pluginProp)🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the complete chain of plugin property propagation # from parent meeting to breakout rooms. # Check CreateBreakoutRoom message handling rg -A 5 "CreateBreakoutRoom.*pluginProp" # Check BreakoutRoomDetail construction rg -A 5 "BreakoutRoomDetail.*pluginProp" # Check if there are any plugin manifest processors rg -A 5 "processPluginManifests.*isBreakout"Length of output: 132
Script:
#!/bin/bash # Let's search for plugin-related code patterns more broadly # Search for plugin property handling in breakout context rg -l "plugin.*breakout" --type scala # Search for CreateBreakoutRoom class/case class definition ast-grep --pattern 'case class CreateBreakoutRoom' # Search for BreakoutRoom related structures that might handle plugins rg -A 10 "case class .*Breakout.*Room" # Search for plugin manifest or property handling rg -A 5 "pluginProp"Length of output: 37026
bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (2)
467-469: Good use of method overloading forcreateMeetingmethodThe introduction of an overloaded
createMeetingmethod that acceptspluginsenhances flexibility and maintains backward compatibility by defaulting thepluginsparameter tonull.Also applies to: 470-473
825-825: Verifymessage.pluginPropinitialization before passing tocreateMeetingEnsure that
message.pluginPropis properly initialized before passing it tocreateMeeting(breakout, message.pluginProp), to prevent potentialNullPointerExceptions or unexpected behavior ifpluginPropisnull.
gustavotrott
left a comment
There was a problem hiding this comment.
It's working properly, good work!
I left only a small suggestion to make the code simpler.
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (2)
467-467: LGTM! Consider adding rate limiting for URL fetching.The implementation is robust with proper error handling, checksum validation, and metadata processing. However, since it makes HTTP requests to fetch plugin manifests, consider adding rate limiting to prevent potential DoS vectors.
Consider:
- Adding a connection timeout
- Implementing retry with backoff
- Adding rate limiting per meeting/session
Line range hint
467-492: Initialize plugins map to prevent NPE in breakout rooms.When creating a breakout room meeting and
pluginsis null,pluginsMapbecomes null which could cause a NullPointerException when passed tom.setPlugins().Apply this fix:
Map<String, Object> pluginsMap; if (m.isBreakout()) { - pluginsMap = plugins; + pluginsMap = (plugins != null) ? plugins : new HashMap<>(); } else { pluginsMap = requestPluginManifests(m); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (2 hunks)
🔇 Additional comments (2)
bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (2)
823-823: LGTM! Properly passes plugin properties to breakout rooms.The change correctly implements the PR objective by passing plugin properties to breakout rooms during creation, enabling plugins to function in breakout rooms as intended.
Line range hint
467-823: Verify plugin-related method consistency.Let's verify that all plugin-related method calls and configurations are consistent across the codebase.
✅ Verification successful
Based on the gathered information, I can now provide the final response:
Plugin handling is correctly implemented and consistent across the codebase
The verification shows that:
- The Meeting class properly maintains plugin state with
private Map<String, Object> pluginsandprivate ArrayList<PluginManifest> pluginManifests- Plugin handling for breakout rooms is correctly implemented, with breakout rooms using parent meeting's plugins (
pluginsMap = plugins) while regular meetings fetch manifests (pluginsMap = requestPluginManifests(m))- The plugin manifest system is properly encapsulated in the
PluginManifestclass- All plugin-related method calls are consistent with no conflicting implementations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for plugin-related method calls and configurations # Test 1: Check for plugin method calls echo "Checking plugin method calls..." rg -A 2 "setPlugins|getPlugins|requestPluginManifests" # Test 2: Check for plugin configurations in manifest files echo "Checking plugin configurations..." fd -e json -e xml "manifest" --exec grep -l "plugin" # Test 3: Check for breakout room plugin handling echo "Checking breakout room plugin handling..." rg -A 5 "isBreakout.*plugin|createBreakoutRoom.*plugin"Length of output: 18149
Script:
#!/bin/bash # Let's verify the plugin handling in the Meeting class and related components # Check for plugin-related method implementations echo "=== Checking plugin method implementations ===" ast-grep --pattern 'class Meeting { $$$ setPlugins($$$) { $$$ } $$$ }' # Check for breakout room plugin handling in MeetingService echo "=== Checking breakout room plugin handling in MeetingService ===" rg -B 5 -A 2 "createMeeting.*plugins.*breakout|isBreakout.*plugins" bbb-common-web/ # Check for plugin manifest handling echo "=== Checking plugin manifest handling ===" rg -B 2 -A 5 "requestPluginManifests" bbb-common-web/ # Check for plugin-related configurations echo "=== Checking plugin configurations ===" fd "application.conf|application.properties" --exec grep -l "plugin"Length of output: 2388
Script:
#!/bin/bash # Let's verify the complete plugin handling flow # Check Meeting class plugin-related fields and methods echo "=== Checking Meeting class plugin handling ===" rg -B 2 -A 2 "private.*plugins|getPlugins|setPlugins|pluginManifests" bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java # Check CreateMeeting message handling echo "=== Checking CreateMeeting message handling ===" rg -B 5 -A 5 "class CreateMeeting|handle.*CreateMeeting" bbb-common-web/src/main/java/org/bigbluebutton/api/ # Check plugin manifest related code echo "=== Checking plugin manifest related code ===" rg -B 2 -A 2 "class.*PluginManifest|implements.*PluginManifest" bbb-common-web/ # Check breakout room creation with plugins echo "=== Checking breakout room creation with plugins ===" rg -B 3 -A 3 "createBreakoutRoom.*plugin|processCreateBreakoutRoom.*plugin" bbb-common-web/Length of output: 9807
Automated tests Summary✅ All the CI tests have passed! |



What does this PR do?
It fixes plugins not running into breakout-rooms, so now, the same plugins that run on the main-room are going to also run into the breakouts.
Closes Issue(s)
Closes bigbluebutton/bigbluebutton-html-plugin-sdk#127
Motivation
There are some required plugins that will run into breakouts, so this must have been sorted out.
How to test
Really simple:
.propertiesbbb-web configuration)More
Demo of the newly fixed behaviour:
demo-plugin-running-on-breakouts.mp4
For this Demo, and for the tests, I used SampleActionButtonDropdownPlugin already in the manifest structure. But it's possible to test it with the pick-random-user-plugin as well (this last one has the manifest structure already)