Skip to content

Make DatabaseLoginsStorage async #6791

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

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

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Jun 13, 2025

There hasn't been agreement on a grand vision for async Rust in app-services (#6549). I think part of the reason is that ADR is discussing too many things. This is my attempt to take a small change from that ADR and see if we agree.

This change takes the async wrapping code that's currently in android-components and moves it to our app-services wrapper. This improves the API boundary IMO. The SYNC sync and the credentials management teams are responsible for threading issues. For example, we're the one's thinking through how to avoid blocking too many threads when we're waiting on the primary password dialog. Since we're responsible for threading issues, we should own the code

On a practical level: I have some ideas on how to improve our threading strategy and it's simpler to think about those changes if all the code is in one repo.

Here's the corresponding android-components change: bendk/firefox@d038ba6

If we agree on this, then I think we can do something similar for iOS.

What do others think? Is this a good idea? Do we need/want an ADR for this?

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.

There hasn't been agreement on a grand vision for async Rust in
app-services (mozilla#6549).  I think part of the reason is that ADR is
discussing too many things.  This is my attempt to take a small change
from that ADR and see if we agree.

This change takes the async wrapping code that's currently in
android-components and moves it to our app-services wrapper.  This
improves the API boundary IMO. The SYNC sync and the credentials
management teams are responsible for threading issues.  For example,
we're the one's thinking through how to avoid blocking too many threads
when we're waiting on the primary password dialog.  Since we're
responsible for threading issues, we should own the code

On a practical level: I have some ideas on how to improve our threading
strategy and it's simpler to think about those changes if all the code
is in one repo.

Here's the corresponding android-components change:
bendk/firefox@d038ba6

If we agree on this, then I think we can do something similar for iOS.

What do others think?  Is this a good idea?  Do we need/want an ADR for this?
@bendk bendk force-pushed the push-pytzmytkqxmy branch from 051d80f to 8a3152c Compare June 13, 2025 18:42
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.

1 participant