Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openthread_border_router: bump to latest and smaller improvements #3732

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

agners
Copy link
Member

@agners agners commented Aug 16, 2024

Update to the latest OTBR POSIX version b66cabfaa0 (2024-08-14 08:01:56 -0700). Bump to silabs-universal-flasher 0.0.22.

This also adds a patch which gets rid of messages printed by OTBR web on the system console.

Also update to the latest OTBR RCP builds for Yellow/Connect ZBT-1 (formerly SkyConnect). This firmware is built from the very same sources (there was no bump between Gecko SDK v4.4.0.0 and v4.4.3.0). However, it uses the new build infrastructure which could mean that there are small differences in build configuration.

Summary by CodeRabbit

  • New Features

    • Added support for deleting active or pending operational datasets via the REST API.
    • Introduced a command line argument to disable syslog logging in the otbr-web component.
  • Improvements

    • Adjusted route metrics for better network interface preference.
    • Updated firmware file names for improved naming conventions.
  • Version Updates

    • Incremented version numbers to 2.10.0 across configuration files and build settings.
  • Changelog

    • Updated the changelog to reflect new version information and notable changes.

Copy link
Contributor

coderabbitai bot commented Aug 16, 2024

Walkthrough

Walkthrough

The recent updates to the OpenThread Border Router enhance its functionality across multiple aspects. Key improvements include the addition of REST API support for deleting operational datasets, optimized route metrics for better routing preferences, and configurable logging behavior via command line arguments. Versioning has been updated in several components, along with changes in the Docker build process and updates to firmware naming conventions. These enhancements collectively improve system performance, usability, and maintainability.

Changes

Files Change Summary
openthread_border_router/* - Added support for deleting operational datasets in the REST API.
- Lowered route metrics for the OpenThread interface to enhance route selection.
- Introduced a command line option to disable syslog logging for otbr-web.
- Updated version numbers in CHANGELOG.md, build.yaml, and config.yaml.
- Modified Dockerfile to reorder and rename patch files for the build process.
- Updated firmware naming conventions in flashing scripts.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant REST_API
    participant Dataset_Manager
    participant Thread_Leader

    User->>REST_API: Request to delete dataset
    REST_API->>Thread_Leader: Authorize deletion
    Thread_Leader-->>REST_API: Authorization status
    REST_API->>Dataset_Manager: Delete dataset if authorized
    Dataset_Manager-->>REST_API: Confirmation of deletion
    REST_API-->>User: Response with deletion confirmation
Loading

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8204fdb and f901a92.

Files selected for processing (9)
  • openthread_border_router/0001-support-deleting-the-dataset.patch (4 hunks)
  • openthread_border_router/0002-set-netif-route-metric-lower.patch (3 hunks)
  • openthread_border_router/0003-logging-support-disable-syslog-for-otbr-web-as-well.patch (1 hunks)
  • openthread_border_router/CHANGELOG.md (1 hunks)
  • openthread_border_router/Dockerfile (2 hunks)
  • openthread_border_router/build.yaml (1 hunks)
  • openthread_border_router/config.yaml (1 hunks)
  • openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-web/run (1 hunks)
  • openthread_border_router/rootfs/etc/s6-overlay/scripts/universal-silabs-flasher-up (2 hunks)
Files skipped from review as they are similar to previous changes (9)
  • openthread_border_router/0001-support-deleting-the-dataset.patch
  • openthread_border_router/0002-set-netif-route-metric-lower.patch
  • openthread_border_router/0003-logging-support-disable-syslog-for-otbr-web-as-well.patch
  • openthread_border_router/CHANGELOG.md
  • openthread_border_router/Dockerfile
  • openthread_border_router/build.yaml
  • openthread_border_router/config.yaml
  • openthread_border_router/rootfs/etc/s6-overlay/s6-rc.d/otbr-web/run
  • openthread_border_router/rootfs/etc/s6-overlay/scripts/universal-silabs-flasher-up

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (4)
openthread_border_router/0003-logging-support-disable-syslog-for-otbr-web-as-well.patch (1)

4-4: Clarify the subject line.

The subject line "[PATCH] [logging] support disable syslog for otbr-web as well" could be more precise. Consider rephrasing to "Add support to disable syslog for OTBR web interface."

openthread_border_router/0001-support-deleting-the-dataset.patch (3)

Line range hint 6-18:
Ensure Consistency in API Descriptions.

The description for deleting the active operational dataset mentions "Deletes the the active operational dataset." The duplicate "the" should be corrected for clarity.

-        Deletes the the active operational dataset on the current node. Only allowed if the Thread node
+        Deletes the active operational dataset on the current node. Only allowed if the Thread node

Line range hint 6-18:
Clarify the API Response Description.

The response description for the DELETE operation on /node/dataset/pending incorrectly states "Successfully deleted the active operational dataset." It should refer to the pending operational dataset instead.

-          description: Successfully deleted the active operational dataset.
+          description: Successfully deleted the pending operational dataset.

Line range hint 12-47:
Consider Refactoring for Clarity and Maintainability.

The DeleteDataset function contains repeated logic for setting the dataset TLVs based on the dataset type. Consider refactoring to reduce redundancy.

void Resource::DeleteDataset(DatasetType aDatasetType, Response &aResponse) const
{
    otbrError error = OTBR_ERROR_NONE;
    std::string errorCode = GetHttpStatus(HttpStatusCode::kStatusOk);
    otOperationalDatasetTlvs datasetTlvs = {};

    if (aDatasetType == DatasetType::kActive)
    {
        VerifyOrExit(otThreadGetDeviceRole(mInstance) == OT_DEVICE_ROLE_DISABLED, error = OTBR_ERROR_INVALID_STATE);
    }

    otError otError = (aDatasetType == DatasetType::kActive) ? 
                      otDatasetSetActiveTlvs(mInstance, &datasetTlvs) : 
                      otDatasetSetPendingTlvs(mInstance, &datasetTlvs);

    VerifyOrExit(otError == OT_ERROR_NONE, error = OTBR_ERROR_REST);
    aResponse.SetResponsCode(errorCode);

exit:
    if (error == OTBR_ERROR_INVALID_STATE)
    {
        ErrorHandler(aResponse, HttpStatusCode::kStatusConflict);
    }
    else if (error != OTBR_ERROR_NONE)
    {
        ErrorHandler(aResponse, HttpStatusCode::kStatusInternalServerError);
    }
}

…08-14)

Update to the latest OTBR POSIX version b66cabfaa0 (2024-08-14 08:01:56 -0700).
Bump to silabs-universal-flasher 0.0.22.

This also adds a patch which gets rid of messages printed by OTBR web on the
system console.
Update to the latest OTBR RCP builds for Yellow/Connect ZBT-1
(formerly SkyConnect). This firmware is built from the very same
sources (there was no bump between Gecko SDK v4.4.0.0 and v4.4.3.0).
However, it uses the new build infrastructure which could mean that
there are small differences in build configuration.
@puddly puddly merged commit 972ea56 into master Aug 26, 2024
10 checks passed
@puddly puddly deleted the otbr-bump-to-b66cabfaa0 branch August 26, 2024 16:44
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.

2 participants