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

remove unused BraveFederatedService #27658

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Feb 13, 2025

Resolves brave/brave-browser#44005

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@bridiver bridiver requested review from a team as code owners February 13, 2025 23:35
@bridiver bridiver force-pushed the remove-unused-brave-federated-service branch from b179ae3 to e933bed Compare February 14, 2025 20:37
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

chromium_src and DEPS ++

@bridiver bridiver force-pushed the remove-unused-brave-federated-service branch from 86a52a2 to f39c21a Compare February 15, 2025 13:01
Copy link
Contributor

[puLL-Merge] - brave/brave-core@27658

Description

This PR removes the brave_federated component from the Brave browser codebase. This component appears to have been responsible for handling federated learning functionality, particularly related to operational patterns and data collection for training machine learning models in a privacy-preserving way.

Changes

Changes

By filename:

  1. browser/DEPS and other build files:
  • Removed references to brave_federated component
  • Updated build dependencies
  • Removed federated learning from browser service factories
  1. browser/brave_federated/:
  • Removed entire directory containing the federated service factory implementation
  • Deleted supporting files and configuration
  1. components/brave_federated/:
  • Removed complete implementation of federated learning services including:
    • BraveFederatedService
    • DataStoreService
    • EligibilityService
    • OperationalPatterns
  • Removed associated tests
  • Removed Mojo interfaces and type definitions
  1. components/constants/webui_url_constants.h:
  • Removed constants for federated internals URLs and hosts

The sequence diagram shows how the federated learning system previously operated with data collection and remote server communication, which is now being removed entirely from the codebase.

sequenceDiagram
    participant Browser
    participant FederatedService
    participant DataStore
    participant RemoteServer

    Note over Browser,RemoteServer: Previous Implementation
    Browser->>FederatedService: Initialize
    FederatedService->>DataStore: Create storage
    Browser->>FederatedService: Start collection
    FederatedService->>DataStore: Store training data
    FederatedService->>RemoteServer: Send collection pings
    FederatedService->>RemoteServer: Send delete ping on shutdown

    Note over Browser,RemoteServer: After PR
    Browser->>Browser: Federated learning functionality removed
Loading

Possible Issues

  1. Any features or systems that previously depended on federated learning capabilities may need alternative implementations.
  2. Privacy metrics or analytics that used this system will need to be handled differently.
  3. Operational patterns monitoring will no longer be available for analyzing client availability.

Security Hotspots

  1. Since this removes a data collection mechanism, careful testing should be done to ensure no legacy data storage or collection paths remain active.

@bridiver
Copy link
Collaborator Author

Since this service was always behind a disabled feature flag I left out any cleanup of the prefs/db file

@bridiver bridiver merged commit 4691e65 into master Feb 16, 2025
20 checks passed
@bridiver bridiver deleted the remove-unused-brave-federated-service branch February 16, 2025 14:29
@github-actions github-actions bot added this to the 1.77.x - Nightly milestone Feb 16, 2025
@brave-builds
Copy link
Collaborator

Released in v1.77.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.

Remove Brave Federated Service
4 participants