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

Starting new Remote Settings API #6417

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Oct 18, 2024

Implemented client functionality and started the general structure for the types. The big item left todo is storage.

Added a CLI to test it, you can run it using cargo rs.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

Branch builds: add [firefox-android: branch-name] to the PR title.

@bendk
Copy link
Contributor Author

bendk commented Oct 18, 2024

This new API is still a WIP, but I think we still could merge this since no consumers are using it yet. I tested it with the cargo rs CLI and it seemed to work.

@leplatrem I added you as a reviewer mostly to make sure that the client code is hitting the right endpoints and following the client specs correctly.

}

struct RemoteSettingsClientInner {
storage: Storage,
Copy link
Contributor Author

@bendk bendk Oct 18, 2024

Choose a reason for hiding this comment

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

I believe that Storage will want to use &mut in a lot of its methods, since that's what rusqlite::Connection::transaction() uses and in general we want exclusive access to the connection. But I'm not totally sure this is right and maybe we should move it outside the mutex.

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 214 lines in your changes missing coverage. Please review.

Project coverage is 21.83%. Comparing base (eb1f268) to head (78ba5d2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
components/remote_settings/src/client.rs 0.00% 104 Missing ⚠️
components/remote_settings/src/service.rs 0.00% 54 Missing ⚠️
components/remote_settings/src/lib.rs 0.00% 32 Missing ⚠️
components/remote_settings/src/storage.rs 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6417      +/-   ##
==========================================
- Coverage   21.99%   21.83%   -0.16%     
==========================================
  Files         342      344       +2     
  Lines       30729    30951     +222     
==========================================
  Hits         6759     6759              
- Misses      23970    24192     +222     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Implemented the high-level API and the client functionality. Storage is
a big TODO.

Added a CLI to test it, you can run it using `cargo rs`.
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