Repository navigation
feat(plugins)!: support pre-release plugin SDK versions and bump SDK to 1.0.0-beta.2 - #25864
Conversation
akka-apps checks whether the html5 plugin SDK version satisfies each
plugin manifest's requiredSdkVersion using java-semver's
Version.satisfies(). Its expression parser does not accept pre-release
identifiers, so a requirement such as "^1.0.0-beta.2" throws during
meeting creation:
Unexpected error while parsing SDK versions: Illegal character near 'beta.2'
and the plugin is not loaded. The plugin SDK has recently started
publishing pre-release versions (1.0.0-beta.x), so the core needs to
handle them both as its own SDK version and in plugin requirements.
Add SemverRange, which parses the requirement itself and uses
java-semver only to parse and order versions. Both requiredSdkVersion
and html5PluginSdkVersion are versions of the
bigbluebutton-html-plugin-sdk npm package, and plugin authors write
that range as they would in a package.json, so the parser follows
npm's range grammar: comparators, caret, tilde, x-ranges, partial
versions, hyphen ranges and sets joined by whitespace or ||, plus
java-semver's &. With it, "^1.0.0-beta.2" accepts 1.0.0-beta.3 and
rejects 1.0.0-beta.1.
For the forms plugin manifests use (caret, tilde, x-ranges and full
versions), results are the same as java-semver's. Less common ranges
follow npm: space-separated comparators (">=0.1.5 <0.2.0"), which
java-semver fails to parse, are accepted, and a partial version after
> or <=, or as a hyphen range's upper bound, covers the whole missing
part, so "<=1.2" includes 1.2.5 and ">1" excludes 1.5.0.
Stripping the pre-release tag before calling java-semver was discarded
because it treats 1.0.0-beta.1 and 1.0.0-beta.2 as the same version.
Replacing java-semver with another library was discarded as a larger
dependency change for the same result.
SemverRange matches pre-releases by ordering alone, as java-semver does: 1.0.0-beta.2 sorts below 1.0.0, so it satisfies "0.x" (<1.0.0), ">=0.1.5" or "*". A core running a 1.0 pre-release of the SDK therefore loads plugins written for the 0.x API that never declared support for it. Apply npm's pre-release rule, completing its range semantics: a pre-release version only satisfies a comparator set in which some comparator names a pre-release of the same major.minor.patch. "^1.0.0-beta.2" accepts 1.0.0-beta.3 and 1.0.0 but rejects 1.1.0-alpha.1, and "0.x" rejects 1.0.0-beta.2. Plugins opt into beta cores deliberately, e.g. "^0.1.5 || ^1.0.0-beta.1". See https://github.com/npm/node-semver#prerelease-tags. Versions without a pre-release tag are unaffected, so this only changes results while the core runs a pre-release SDK.
The html5 client depends on plugin SDK 0.1.26. Update it to the 1.0.0-beta.2 pre-release and set html5PluginSdkVersion in bigbluebutton.properties to match, since akka-apps validates plugin manifests' requiredSdkVersion against that value. BREAKING CHANGE: plugins whose requiredSdkVersion only covers the 0.x SDK, such as "^0.1.26" or "~0.0.77", are no longer loaded. To load on this core, a plugin must declare a range that names a 1.0.0 pre-release, e.g. "^1.0.0-beta.2", or "^0.1.5 || ^1.0.0-beta.1" to keep supporting both lines.
The plugin docs explain requiredSdkVersion ranges without mentioning how they treat pre-release SDK versions, and state that "^1.0.0" accepts 1.x releases. With the core on 1.0.0-beta.2, "^1.0.0" rejects the SDK, so an author following the docs publishes a manifest that does not load. The 4.0 release notes still list html5PluginSdkVersion as bumped to 0.1.26 and do not warn that 0.x plugins stop loading. Describe the pre-release rule in the SDK compatibility section, with "^0.1.5 || ^1.0.0-beta.1" as the range that supports both lines. Update the release notes to the 1.0.0-beta.2 bump and add a section covering the breaking change: manifests must be republished before or with the upgrade, and an html5PluginSdkVersion override in bbb-web.properties must be removed or updated, since it makes akka-apps validate manifests against an SDK version the client does not run.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe change adds npm-style semantic version range matching for plugin SDK compatibility checks. Plugin validation now uses this utility, and the HTML5 plugin SDK dependency and configured SDK version change to Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The version update appears ready for normal checks. Plugins restricted to the 0.x SDK still need the documented manifest update before deployment. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The new SDK version intentionally stops loading plugins whose manifests declare only older SDK ranges. The server’s configured version, deployed client, and plugin manifests must remain aligned during rollout and rollback. No new security bypass was confirmed. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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. Comment |
🚨 Automated tests failed |
GuiLeme
left a comment
There was a problem hiding this comment.
LGTM.
Tested locally and code looks solid.
56853f5
into
bigbluebutton:v4.0.x-develop
BBB 4.0 core moves its html5 plugin SDK to 1.0.0-beta.2, and the manifest requires ~0.1.2, which excludes it: the core refuses to load the plugin. Require ^1.0.0-beta.1. The core validates this range with SemverRange (bigbluebutton/bigbluebutton#25864), which follows npm's range semantics, so a pre-release core SDK only satisfies a range naming a pre-release of the same major.minor.patch. Bump the bigbluebutton-html-plugin-sdk dependency to 1.0.0-beta.1 so the plugin builds against the same SDK major the manifest requires. Keeping 0.1.x cores through "~0.1.2 || ^1.0.0-beta.1" was discarded: cores without SemverRange validate with java-semver, whose parser throws on any pre-release in the range, so the plugin fails to load there either way. Pre-release-free ranges such as "*" or ">0.2 & <2" load on those cores but are rejected by SemverRange on a beta SDK. No single range covers both, so this drops support for cores on SDK 0.1.x. BREAKING CHANGE: the plugin no longer loads on BBB cores running plugin SDK 0.1.x or lacking SemverRange.
What does this PR do?
Moves the html5 client to plugin SDK
1.0.0-beta.2and makes akka-apps accept pre-release SDK versions when it checks plugin manifests.a398e63463): java-semver's expression parser can't read pre-release identifiers, sorequiredSdkVersion: "^1.0.0-beta.2"throws during meeting creation and the plugin never loads. The newSemverRangefollows npm's range grammar and uses java-semver only to parse and order versions. For the range forms plugins use today (caret, tilde, x-ranges, exact versions), it returns the same results as before.416cebe564): comparing by order alone lets1.0.0-beta.2satisfy0.x,>=0.1.5and*. That would load 0.x plugins that never declared support for 1.0. With this change, a pre-release SDK only satisfies ranges that name a pre-release of the samemajor.minor.patch. Stable versions behave exactly as before.8942409b66):bigbluebutton-html-plugin-sdkgoes to1.0.0-beta.2, andhtml5PluginSdkVersionis updated to match.8aea9d9c1c): the pre-release rule is described inplugins.md, and the release notes are updated.! Breaking change
Plugins whose
requiredSdkVersiononly covers 0.x (^0.1.26,~0.0.77) stop loading on this core, and each meeting logs a load failure inbbb-apps-akka. Manifests must declare a pre-release range:^1.0.0-beta.2, or^0.1.5 || ^1.0.0-beta.1to keep supporting 3.x.Before or together with this deploy:
html5PluginSdkVersionoverride in/etc/bigbluebutton/bbb-web.properties, otherwise manifests are checked against an SDK version the client doesn't run.How to test
requiredSdkVersion: "^0.1.5 || ^1.0.0-beta.1"and check that it loads."^0.1.26"and check that it doesn't load and that a load failure is logged in akka-apps.