Repository navigation
Conversation
…Selector.mxml via GitHub
germanocaumo
added a commit
to germanocaumo/bigbluebutton
that referenced
this pull request
Nov 5, 2026
xmlstarlet escapes its output unless -T is given, so a carriage return in meta_bbb-disable-recording-formats reached bbb-record as "&bigbluebutton#13;", and bash doesn't split words on a CR either. "video\r,podcast" then passed bbb-record's check while Events.disabled_recording_formats strips the CR and disables video: the output was removed and rap-enqueue.rb refused to rebuild it. Read the value as text and split on CRs as well.
antobinary
pushed a commit
that referenced
this pull request
Nov 17, 2026
…ormat (#25773) * Proposed fix for #25114 * fix(recording): honour format opt-out and tighten --format handling - rap-enqueue.rb now skips a format the meeting disabled through meta_bbb-disable-recording-formats. Only schedule_next_step checked it, so enqueuing process:<format> directly rebuilt an opted-out format. The parsing is now shared as BigBlueButton.disabled_recording_formats. - `--format` with no value left FORMAT unset and fell through to the all-formats rebuild, deleting every format's output. It now fails fast. - `--format` applies to --rebuildall and --republish instead of being silently ignored, and neither swallows a following flag as the meeting id. Republish scopes its status cleanup to the format being republished. Format validation is shared by both paths and matches as a fixed string. * fix(recording): check the format opt-out before removing output mark_for_rebuild and mark_for_republish delete a format's published output before calling rap-enqueue, so refusing the job there left the recording destroyed with nothing scheduled to rebuild it. Check the opt-out first and bail out without touching anything; the rap-enqueue guard stays for direct invocation. Found by rebuilding a real two-format recording with meta_bbb-disable-recording-formats set. * fix(recording): refuse unchained formats, handle segments, validate once - Refuse --format when the steps chain has no process:<format> entry. Without it the output was removed and publish never scheduled, so the format was deleted and never rebuilt. This is the case a server hits after installing a workflow package but before wiring the step by hand. - Clear and remove segment artefacts (<meeting id>-<break timestamp>) as well as the unsegmented ones, in both the single-format and all-formats paths. Previously a rebuild left stale segment output and done files behind. - Validate --format once before any action runs, instead of per recording inside the loops, and reject it on options that never honoured it: with --delete it was silently ignored and the whole recording was deleted. - Return non-zero when an explicit single-format republish publishes nothing. Sweeping every meeting stays best-effort. * fix(recording): don't abort batch runs, fail closed, skip the ruby start-up Three problems with the opt-out check found while reviewing it: - It called exit, so one opted-out meeting aborted a whole --rebuildall or --republish sweep and every later recording was silently skipped. The mark_for_* helpers now return instead, so a sweep reports and continues while an explicit single meeting still fails the command. - Any failure to read the metadata was indistinguishable from "not disabled", so a broken or version-skewed install would silently ignore the opt-out and delete the output. Reading the formats and refusing on error fails closed. bbb-record ships in bbb-config and the library in bbb-record-core, so that skew is possible in practice. - It spawned ruby per meeting and format, about 0.23s each, on a command that previously spawned none. Grepping events.xml first drops the common case to 0.003s and only parses when the parameter is actually present. * docs(recording): document bbb-record --format - Add the option to the copied bbb-record --help output so it stays in step with usage(). - Describe it next to --rebuild, including the two cases where it refuses: a format that is installed but has no process:<format> step, and one the meeting opted out of. Link the existing #12241 note, since a freshly installed bbb-playback-<format> package is exactly that first case. - Note in the format-installation section that --list-workflows distinguishes enabled steps from installed scripts, and that a format missing from the steps cannot be rebuilt with --format. * fix(recording): only remove what the enqueued job rebuilds, fail closed Addresses review feedback on #25773. - rap-enqueue.rb can only enqueue a bare meeting id, so no job it creates ever rebuilds a segment. Clearing segment artefacts removed output that nothing would restore, so deletions are back to the bare meeting id. - disabled_recording_formats hid read errors behind an empty result, which bbb-record then read as "nothing disabled" and deleted anyway. It now takes strict: to surface the error, while the pipeline callers stay lenient. The shell pre-checks fail closed too. * fix(recording): harden bbb-record --format guards and move opt-out parsing to Events Parse the format opt-out in BigBlueButton::Events from an already parsed events.xml document, instead of a module-level helper that re-read the file through get_meeting_metadata. The worker and rap-enqueue open the file themselves with the block form of File.open and handle IO errors, so the strict flag is no longer needed. bbb-record reads the same attribute with xmlstarlet instead of starting ruby per meeting; bbb-config now depends on xmlstarlet. xmlstarlet exits 1 when the attribute is absent, so only other exit codes refuse. step_after resolves the next step from bigbluebutton.yml and the recording.yml override in one yq eval-all call. The steps map of the last file that defines one wins, matching the shallow merge read_props applies: an override that defines steps replaces the whole map rather than adding entries to it. Reject format names outside [a-z0-9_] before any lookup, require the meeting id and format in the removal helpers before running rm, make MEETING_ID local to mark_for_rebuild and mark_for_republish with an early return when missing, and reword the steps-chain refusal so it also covers a present but null entry. * fix(recording): simplify the bbb-record steps lookup and reduce its comments Take the steps map with '[.steps].[-1]'. The collect skips documents without the key, so filtering out nulls was a no-op. Say why each helper is called rather than restating what it does, move the xmlstarlet exit code note onto the branch that handles it, and drop the comparison to a merge the function does not perform. * fix(recording): fail a single-format republish when enqueuing fails mark_for_republish removes a format's published output before enqueuing the publish step, but counted the format as republished whether or not the enqueue succeeded. An explicit --republish --format then reported success with the output gone and no job scheduled to restore it. Count a format only once rap-enqueue.rb has accepted the job, so the existing check fails the command, and say which output was left removed. A sweep over every meeting keeps reporting and carrying on. * fix(recording): look up the steps chain with yq-go On 4.0, bbb-config depends on bbb-yq-go, which installs mikefarah's yq as /usr/bin/yq-go so it can coexist with Noble's unrelated yq package. Nothing installs a plain yq, so step_after failed and every --format request was refused as an unchained format. * fix(recording): treat a missing events.xml as no format opt-out in bbb-record A plain --republish refused every format of a meeting whose raw events.xml was gone, reporting that its metadata could not be read. That is the normal state of an old recording: cron.daily removes the raw directory 14 days after a recording published, and recordings processed before 4.0 still have the processed files a republish needs. The presentation and video publish scripts do not need the raw files, and bbb-record without this check republished them. With no events.xml there is no opt-out to honour, and rap-enqueue.rb and the workers already treat it as nothing disabled. Do the same, and keep refusing an events.xml that exists but cannot be parsed. * fix(recording): report a failed enqueue on a single-format rebuild Like a single-format republish, the rebuild removes the format's output before enqueuing the process step. When rap-enqueue.rb failed, the command exited non-zero with only the Ruby error, without saying that the output was already gone. Print the same message the republish path does. * chore(recording): keep bbb-record at its previous ShellCheck warnings Two lines this change added drew warnings the script did not have: - rm -rf "$dir"/"$id" in remove_published_output draws SC2115. Every $dir is a configured path plus a literal segment, so it is never empty and ${dir:?} changes nothing at run time. - printf '%s\n' $TYPES in validate_format draws SC2086. TYPES holds one format per line and grep -x matches whole lines, so quoting it gives the same result. * fix(recording): require events.xml to enqueue a format step rap-enqueue.rb read events.xml in a helper that checked File.exist? before opening it and treated a missing file as "nothing disabled". Open it in the enqueue loop instead: a format step whose events.xml is missing or unreadable is not enqueued, and rap-enqueue.rb exits 1 when it skips any meeting, so bbb-record sees the failure. bbb-record no longer treats a missing events.xml as "nothing disabled" either, so --format refuses before removing anything. That exception was for republishing recordings whose raw files the daily cron removed, but the cron only removes them once every format is published, and publishing removes the processed files a republish needs. BaseWorker#disabled_recording_formats drops the same exists check. * fix(recording): match a CR in the format opt-out like Ruby does xmlstarlet escapes its output unless -T is given, so a carriage return in meta_bbb-disable-recording-formats reached bbb-record as " ", and bash doesn't split words on a CR either. "video\r,podcast" then passed bbb-record's check while Events.disabled_recording_formats strips the CR and disables video: the output was removed and rap-enqueue.rb refused to rebuild it. Read the value as text and split on CRs as well. * fix(recording): refuse --format on a meeting without recording marks A full --rebuild removes the meeting's .norecord status before processing it; a single-format rebuild doesn't, so the daily cron later deleted the meeting, including the format it had just published. Refuse it and point at the full rebuild. * fix(recording): read the format opt-out once per format on republish mark_for_republish checked the opt-out of the requested format before its loop and again inside it, reading events.xml twice, and a --republish --format sweep read every meeting's events.xml before checking whether it had anything to republish. The check in the loop is enough. * fix(recording): fail a plain --republish that republished nothing Only --republish --format failed when nothing was republished; a plain --republish of one meeting exited 0 even when every enqueue failed after its output was removed. A sweep over every meeting still ignores the result. * fix(recording): list the steps the workers use in --list-workflows --list-workflows read only bigbluebutton.yml, so steps added in the recording.yml override, as the docs suggest, were not listed, while --rebuild --format accepted them. Share the lookup step_after uses. --------- Co-authored-by: Fred Dixon <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edited bigbluebutton-client/src/org/bigbluebutton/main/views/LanguageSelector.mxml via GitHub
hu_HU was missing