Skip to content

Add FXIOS-15014 [RS] Expose reset _storage method to consumers#7253

Merged
bendk merged 3 commits intomozilla:mainfrom
issammani:feat/expose-rs-reset-storage
Mar 10, 2026
Merged

Add FXIOS-15014 [RS] Expose reset _storage method to consumers#7253
bendk merged 3 commits intomozilla:mainfrom
issammani:feat/expose-rs-reset-storage

Conversation

@issammani
Copy link
Contributor

📜 Tickets

Jira ticket
Github issue

This PR:

  • Exposes reset_storage for remote settings clients.
  • Adds test.

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.

@issammani
Copy link
Contributor Author

cc @bendk @Cramsden

@issammani issammani force-pushed the feat/expose-rs-reset-storage branch from 9dd4a68 to 8e439d3 Compare March 2, 2026 19:21
bendk
bendk previously approved these changes Mar 4, 2026
Copy link
Contributor

@bendk bendk left a comment

Choose a reason for hiding this comment

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

Looks good to me, I just found some minor issues. Feel free to deal with them however you want, I don't need to re-review.

}
}

#[cfg(not(feature = "signatures"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? I'd expect the test to work regardless of that feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had the test initially in lib.rs and it was failing because I was mocking the response with the signature. I don't think it's necessary now though. Thanks !


rs_client.reset_storage().expect("Failed to reset storage");

// After reset, both records and attachments should be gone
Copy link
Contributor

Choose a reason for hiding this comment

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

This could also test that records/attachments with packaged data are reverted to the packaged versions. I don't think that's totally necessary though, the addition of this test is already great. If you don't want test the packaged data, how about writing a comment mentioning that there could be a test.

Copy link
Contributor Author

@issammani issammani Mar 10, 2026

Choose a reason for hiding this comment

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

Done in 8edd66f

@mergify mergify bot dismissed bendk’s stale review March 10, 2026 12:24

The pull request has been modified, dismissing previous reviews.

@issammani issammani force-pushed the feat/expose-rs-reset-storage branch from 3233a7a to 8edd66f Compare March 10, 2026 12:25
Copy link
Contributor

@bendk bendk left a comment

Choose a reason for hiding this comment

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

Still looks good, let's merge this.

@bendk bendk added this pull request to the merge queue Mar 10, 2026
Merged via the queue into mozilla:main with commit 0af5b6f Mar 10, 2026
13 of 14 checks passed
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