Skip to content

ci (automated tests): Install Sipp (for future dial-in user tests) - #21919

Merged
gustavotrott merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
gustavotrott:ci-install-sipp
Dec 18, 2024
Merged

gustavotrott merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
gustavotrott:ci-install-sipp

Conversation

@gustavotrott

Copy link
Copy Markdown
Contributor

Installs Sipp in CI server as it enable to run tests for dial-in users.

With sipp installed it is possible to simulate a dial-in user by running:

VOICE_BRIDGE=76034
cd /opt/sipp
sudo sipp -sn uac_pcap -m 1 -aa -d 30000 -s $VOICE_BRIDGE "$(hostname -I | awk '{print $1}')":5060

Replacing the VOICE_BRIDGE with the same number used during /create of the meeting.

More info: https://github.com/SIPp/sipp.git

@gustavotrott gustavotrott added this to the Release 3.0 milestone Dec 17, 2024
@coderabbitai

coderabbitai Bot commented Dec 17, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request modifies the GitHub Actions workflow file .github/workflows/automated-tests.yml, focusing on enhancing the automated testing infrastructure. The changes primarily involve improving the testing environment setup by introducing new steps for dependency installation and configuration.

Key modifications include adding a comprehensive installation process for the SIPp tool, which involves cloning its repository, checking out a specific commit, and compiling it with specific options. A new dial plan configuration for internal calls within FreeSWITCH has been introduced, specifying call handling procedures.

The workflow's Prepare for install step has been updated to include SIPp installation, dependency management, and dial plan file creation. The install-and-run-tests job has been expanded to include artifact downloads for various packages, ensuring all necessary components are available for testing.

Additional refinements include improvements to CA certificate generation and trust processes, aimed at establishing a more robust and secure testing environment. These changes are designed to streamline the automated testing workflow and ensure more comprehensive test coverage.

Sequence Diagram

sequenceDiagram
    participant GA as GitHub Actions
    participant Deps as Dependency Installer
    participant SIPp as SIPp Tool
    participant FreeSWITCH as FreeSWITCH Environment
    
    GA->>Deps: Prepare testing environment
    Deps->>SIPp: Clone and compile
    Deps->>FreeSWITCH: Configure dial plan
    Deps->>GA: Environment ready
    GA->>GA: Generate CA certificate
    GA->>GA: Download test artifacts
    GA->>GA: Run automated tests
Loading

Suggested reviewers

  • antonbsa
  • antobinary

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 for this PR. (Beta)
  • @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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (2)
.github/workflows/automated-tests.yml (2)

269-279: Document the reason for using a specific Sipp commit.

The comment indicates that the current code is not working, but it would be helpful to:

  1. Document the specific issues with the current code
  2. Create a tracking issue to upgrade when these issues are resolved
  3. Consider vendoring this specific version to avoid potential GitHub availability issues

Consider creating a Dockerfile to build Sipp, which would:

  • Make the build process more reproducible
  • Isolate build dependencies from the test environment
  • Enable easier version updates

280-291: Consider adding additional security measures to the dial plan.

While the dial plan correctly handles internal calls, consider adding:

  1. Input validation for destination_number
  2. Rate limiting to prevent DoS attacks
  3. Logging for security auditing
 <include>
   <extension name="bbb_sp_call" continue="true">
       <condition field="network_addr" expression="\${domain}" break="on-false">
+          <action application="log" data="INFO Called number: \${destination_number}"/>
+          <action application="set" data="max_calls=10"/>
           <action application="set" data="bbb_authorized=true"/>
+          <action application="regex" data="\${destination_number}" expression="^[0-9]{6,12}$" break="on-false"/>
           <action application="transfer" data="\${destination_number} XML default"/>
       </condition>
   </extension>
 </include>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3f1da5a and 15238a6.

📒 Files selected for processing (1)
  • .github/workflows/automated-tests.yml (2 hunks)
🔇 Additional comments (1)
.github/workflows/automated-tests.yml (1)

Line range hint 258-268: Verify the impact of systemd configuration changes on bbb-webrtc-sfu performance.

The removal of CPU scheduling policies for bbb-webrtc-sfu could potentially impact its performance under load.

✅ Verification successful

Modifying CPU scheduling policy is a documented workaround for containerized environments

Based on the documentation found in docs/docs/support/troubleshooting.md, bbb-webrtc-sfu normally runs with CPUSchedulingPolicy=fifo, and the documentation explicitly states that in systems without appropriate capabilities (SYS_NICE), the application will fail to start. The override to set CPUSchedulingPolicy=other and Nice=19 is a documented workaround for containerized environments where real-time scheduling isn't possible.

Let's verify the default service configuration:


CPU scheduling policy changes are consistent with default configuration

The changes in the PR are appropriate as they maintain the same Nice value (19) from the default service configuration while changing only the scheduling policy from fifo to other. This modification is a documented workaround for containerized environments where real-time scheduling isn't possible, as mentioned in the troubleshooting documentation. The change won't negatively impact performance as it's specifically designed to handle environments where fifo scheduling cannot be used.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the default systemd configuration for bbb-webrtc-sfu

# Check the original service file
rg -A 10 "CPUSchedulingPolicy|Nice" /lib/systemd/system/bbb-webrtc-sfu.service

# List any other override configurations
fd "override.conf" /etc/systemd/system/ -x cat {}

Length of output: 323


Script:

#!/bin/bash
# Let's check the repository for any systemd service files or configurations related to bbb-webrtc-sfu
fd "bbb-webrtc-sfu.service"

# Search for any existing CPU scheduling or Nice value configurations in the codebase
rg -i "CPUSchedulingPolicy|Nice" --type yaml --type conf

# Look for any documentation or discussions about performance settings
rg -i "scheduling|priority|performance" -g "*.md" -g "*.txt"

Length of output: 3994


Script:

#!/bin/bash
# Check the default service configuration in the packages template
cat build/packages-template/bbb-webrtc-sfu/bbb-webrtc-sfu.service

Length of output: 732

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@gustavotrott
gustavotrott merged commit ff53b08 into bigbluebutton:v3.0.x-release Dec 18, 2024
ramonlsouza pushed a commit that referenced this pull request Oct 22, 2026
…ry for the SDK job

The quarantine tags were spelled out in four npm scripts and in the
legacy media job, and the copies had drifted: the legacy job never
gained @known-issue. They are now defined once, as config.quarantine in
the suite's package.json. The npm scripts read it through npm's
$npm_package_config_quarantine and the legacy job calls a new npm script
(test-chromium-media-ci) instead of its own command. Every selection
lists the same tests as before, title for title (gate 551, legacy job
112); no @media test carries @known-issue today, so the legacy job gains
the tag without losing a test.

With one retry in CI, a test that fails once and then passes keeps the
job green and leaves only a warning annotation, so new flakiness merges
unnoticed. The CI reporter now also lists those tests, with the first
line of the first attempt's error, under "Passed only on retry" in the
job summary of every step that uses it. It does not fail the job. A
first attempt that timed out printed no annotation at all; it now gets
the same warning as one that failed.

SIPp was built on every install (about 50 seconds each, ten installs per
pull request run) since #21919 in December 2024, "for future dial-in
user tests". No such test was written and no pull request is open for
one, so the build and the CI-only FreeSWITCH dial plan that came with it
are removed. To bring them back for a dial-in test, restore the block
from 15238a6 into the "Prepare for install" step of
.github/actions/install-bbb/action.yml.

The plugin SDK job builds the samples that have tests in the downloaded
SDK version instead of a fixed list, which named a sample that SDK
1.0.0-beta.2 does not have and missed the media area sample.

The README of the suite gets a table of how the selections relate, the
quarantine tags' new home, the retry summary, a note on documenting
sdk-flaky-tests.txt entries, and no longer the Meteor recording section.

Left for the nightly workflow: the job that installs a server with
maskTagThreshold=1 for the @setting-required test, and the
bbb-web-properties input of install-bbb it needs.
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.

2 participants