Skip to content

Bug 2049856 - Remove old viaduct backend code [ci full]#7450

Open
bendk wants to merge 1 commit into
mozilla:mainfrom
bendk:bdk/push-xrpkntkxroku
Open

Bug 2049856 - Remove old viaduct backend code [ci full]#7450
bendk wants to merge 1 commit into
mozilla:mainfrom
bendk:bdk/push-xrpkntkxroku

Conversation

@bendk

@bendk bendk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
  • Removed the old backend and backend::ffi modules
  • Renamed new_backend to backend.

Changed the default timeout for viaduct::Client to 7 seconds for iOS and 10 seconds otherwise. This matches the behavior of we had for Request::send(). Should we make these longer?

Also: removed viaduct-reqwest which was no longer used. Removed the rusqlite::bundled feature from ads-client. It's not set by other crates and this fixed a build issue for me.

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.

@bendk bendk requested a review from a team as a code owner June 25, 2026 14:14
@bendk bendk requested review from justindarc and removed request for a team June 25, 2026 14:14
Comment thread components/viaduct/src/client.rs Outdated
#[cfg(target_os = "ios")]
timeout: 7000,
#[cfg(not(target_os = "ios"))]
timeout: 10000,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From markh in an earlier version:

I don't think these make sense - I've lost some of the history, but I don't think the very first cuts of viaduct had such short timeouts. The problem is that none of us will ever see a problem as we are on good networks, but things just randomly break in the field - ie, the 10s sync timeout was introduced (I'm quite sure we never started with that timeout), but it took some time for us to finally notice in user-generated bug reports that it was a problem.
I'd rather invert this - have sane defaults and individual clients who really do need insanely short timeouts get to override?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this, I bumped the timeout back up to 60s.

I got confused because this was the defaults for the old backend that I was removing: https://github.com/mozilla/application-services/pull/7449/changes#diff-f05535f2df59d33408a4bec415bf621aa648501e7f6f5279424e7d74684636c7L39. However, I guess that wasn't actually taking effect because all platforms are using the new backend now, which is why we can open this PR in the first place.

The thing I still don't understand why we weren't seeing timeouts before we switched to the new backend. With the old backend the defaults did seem to be 7s and 10s and I don't see how they were overridden.

@bendk bendk force-pushed the bdk/push-xrpkntkxroku branch 4 times, most recently from 59f916d to dd1f60a Compare June 25, 2026 14:54
@bendk bendk requested review from mhammond and removed request for justindarc June 25, 2026 15:01
@bendk bendk changed the title Bug 2049856 - Remove old viaduct backend code Bug 2049856 - Remove old viaduct backend code [ci full] Jun 25, 2026
@bendk bendk force-pushed the bdk/push-xrpkntkxroku branch from dd1f60a to ccbdf5e Compare June 25, 2026 15:04
* Removed the old `backend` and `backend::ffi` modules
* Renamed `new_backend` to `backend`.

Changed the default timeout for `viaduct::Client` to 7 seconds for iOS
and 10 seconds otherwise.  This matches the behavior of we had for
`Request::send()`.  Should we make these longer?

Also:
 * Fixed build errors when crates depend on viaduct with the ohttp
   feature, but not rusqlite.
 * removed viaduct-reqwest which was no longer used. 
 * Removed un-used protobuf code.
@bendk bendk force-pushed the bdk/push-xrpkntkxroku branch from ccbdf5e to f515016 Compare June 25, 2026 17:16
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