37 Commits

Author SHA1 Message Date
Philip Jenvey
e8d89d7ab6
refactor: move syncstorage-mysql's error -> db-common
so syncstorage-postgres can share it

Issue STOR-330
2025-10-17 16:13:05 -07:00
Philip Jenvey
0156613781
refactor: separate batch calls into a BatchDb trait
Issue STOR-330
2025-10-17 14:03:19 -07:00
Philip Jenvey
21bcc42feb
refactor: String -> &str
Issue STOR-330
2025-10-17 14:03:19 -07:00
Philip Jenvey
d32c669b7a
refactor: move syncstorage's Db to async-trait (#1830)
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
Closes STOR-144
2025-10-03 14:45:18 -07:00
Barry Chen
730d6b8173
refactor(db): return only a SyncTimestamp from post_bsos db fns
Co-authored-by: Philip Jenvey <pjenvey@underboss.org>
2025-09-29 14:36:09 -05:00
Philip Jenvey
192d64c7c3
feat: switch syncstorage to diesel-async
Closes STOR-364
2025-09-23 18:32:51 -07:00
Philip Jenvey
b89b06d24f
feat: kill Db's impl of Clone (#1789)
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
by utilizing async closures' improved borrowing semantics

Closes STOR-350
2025-09-04 14:58:11 -07:00
Philip Jenvey
38cb38fbd9
refactor: switch syncstorage Db methods to &mut self
Closes STOR-327
2025-09-02 13:50:20 -07:00
Philip Jenvey
48a9e284ac
r 2025-08-29 12:40:53 -07:00
Philip Jenvey
44148da7c8
merge master 2025-08-28 17:25:26 -07:00
Tommie Gannert
b9507e36c3
chore: Upgrade Diesel to 2.x.
See https://diesel.rs/guides/migration_guide.html.

- This pulls in mysqlclient-sys >=0.4.0, which allows using libmariadb instead of libmysqlclient.
  That allows using Debian's bundled client library.
  MySQL's APT repository only has packages for AMD64.
- Connections are now passed as mut refs, which requires RefCell/RwLock.
- Embedded migrations had a slight API change.
- put_bso_sync was calling update_collection without its transaction, which now causes a deadlock.
  Updated to write inside its transaction.

Signed-off-by: Tommie Gannert <tommie@gannert.se>
2025-08-28 17:07:15 -07:00
Taddes
f7197fefb8
chore: update syncstorage rust (#1749)
chore: update syncstorage rust
2025-08-13 15:14:34 -04:00
Taddes
4ddf5b4169
refactor: convert db extract calls to async (#1715)
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
refactor: convert db extract calls to async
2025-07-18 15:37:44 -04:00
Taddes
0768d4975d
chore: remove extraneous dependencies (#1700)
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
chore: remove extraneous dependencies
2025-05-22 19:06:58 -04:00
Philip Jenvey
0148e04dd2
chore: bump to latest rust
for cargo nextest/backtrace
2025-05-07 16:49:09 -07:00
Philip Jenvey
0ca435fb1a
refactor: simplify metric_label to return a &str
Issue STOR-64
2025-04-23 16:01:07 -07:00
JR Conlin
70f101f9d4
Chore/2410 update (#1618)
* chore: Update pyo3

Closes: #1617
---------

Co-authored-by: Philip Jenvey <pjenvey@underboss.org>
2024-12-04 13:53:56 -08:00
Taddes
cc6dd13749
feat: add hashed_device_id to HawkIdentifier (#1615)
feat: add hashed_device_id to HawkIdentifier and UserIdentifier
2024-10-25 10:24:57 -04:00
Taddes
715cf950ba
feat: add hashed_fxa_uid to HawkPayload (#1613)
add hashed_fxa_uid to HawkPayload, HawkIdentifier, UserIdentifier
2024-10-21 19:41:43 -04:00
JR Conlin
1713962c6a
Chore/update 2406 (#1576)
chore: Updates for Jun-2024

* f normalize diesel to 1.4

We're currenlty locked to diesel 1.4 due to some significant changes
in the `diesel_logger` crate and how it expects `Connections` to be
defined.
2024-06-25 13:29:42 -07:00
JR Conlin
771813087c
feat: Add normalized ReportableError to errors (#1559)
* feat: Add normalized ReportableError to errors

We want to do things like add tags and other features to sync errors the
way that we do in other packages. To do so, we're backporting
ReportableError from Autopush to Syncstorage.

This also addresses some clippy fixes required by 1.78

This continues to use the `Taggable` trait, which we may want to
port to autopush.

Closes SYNC-4262
2024-05-20 08:51:58 -07:00
JR Conlin
ab7b4221fd
bug: Allow threadpool size to be set. (#1560)
* bug: Allow threadpool size to be set.

It appears that the replacement for setting ACTIX_THREADPOOL would be to
call `ServiceBuilder.worker_max_blocking_threads()` This PR introduces
the ability to set this value by using the
`worker_max_blocking_threads`configuration variable.

Closes #SYNC-4271
2024-05-16 16:36:41 -07:00
Tarik Eshaq
1b11684648
feat: Puts pyo3 behind feature flag and derives tokens directly in Rust (#1513)
* Removes pyo3 and derives tokens directly in Rust

* Adds tests for JWT verifying

* Adds tests for token generation

* Adds metrics for oauth verify error cases

* Updates jsonwebtoken to not include default features (including pem loading)

* Adds context and logs errors during oauth verify

* Uses ring for cryptographic rng

* Adds back python impl under feature flag

* Uses one cached http client for reqwest
2024-02-12 11:14:15 -05:00
Philip Jenvey
fb70128824
fix: switch more test flags to cfg(debug_assertions) (#1488)
switch mutation usage to an explicit flag

fix the db tests' uid handling

SYNC-3955
2023-10-10 17:41:42 -07:00
JR Conlin
1f9323b7b3
feat: convert dependencies to use workspaces
Update package description and some dependencies to use `workspace`
inheritance.

* Also updates circleci to produce dockerhub image.

Closes #1461
Issue #1362

* f touch to retry circleci

* f try to pre-emptively lock protobuf to the older 2.25.2 version

* f force Cargo.lock to use protobuf 2.25.2, dammit

* f move protobuf pin to syncstorage-spanner

* f revert cargo.lock

* f revert #448

* f update base64 / tickle circleci

* f update cadence (and kick circleci)

* f clippy

* f switch to latest google-cloud-rust

* f update to use google-cloud-rust
2023-08-29 13:57:53 -07:00
Philip Jenvey
80d21e7143
merge master 2023-03-07 12:02:16 -08:00
Ethan Donowitz
b5b7e57f93
refactor: add database crates (#1407)
Closes #1277
2023-01-10 16:06:03 -05:00
Ethan Donowitz
0ae5fd2059
refactor: add settings crates (#1306)
This is a breaking change. This commit separates syncstorage and tokenserver settings into separate structs that are contained by a parent `Settings` struct. This means that any env vars that hold settings specific to syncstorage (e.g. `SYNC_DATABASE_URL`) have been renamed to `SYNC_SYNCSTORAGE__DATABASE_URL`. Any settings that were moved from the top-level `Settings` struct to the lower level, syncstorage-specific struct will now have a `SYNC_SYNCSTORAGE__` prefix instead of a `SYNC_` prefix.

Closes #1276
2022-10-19 17:15:56 -04:00
Ethan Donowitz
3a21947cf5
chore: tag 0.12.4 (#1420) 2022-10-10 10:45:04 -07:00
Ethan Donowitz
fca795e3c0
chore: update to Rust 1.64.0 (#1415) 2022-10-05 12:54:51 -04:00
Ethan Donowitz
780167e6e1
chore: tag 0.12.3 (#1404) 2022-09-23 18:26:00 -04:00
Ethan Donowitz
3ad543b160
chore: tag 0.12.2 (#1399) 2022-09-19 13:53:45 -04:00
Ethan Donowitz
db037d0322
chore: tag 0.12.1 (#1386) 2022-08-25 17:48:01 -04:00
Ethan Donowitz
75231c8feb
feat: add __error__ endpoint to Tokenserver (#1375)
Closes #1364
2022-08-18 10:02:49 -04:00
Ethan Donowitz
a193148142
chore: tag 0.12.0 (#1353) 2022-07-05 14:24:10 -04:00
Philip Jenvey
403e9a2ad5
merge master 2022-06-06 16:45:23 -07:00
Ethan Donowitz
a52900f6a9
refactor: add common crates (#1281)
Closes #1275
2022-05-06 17:42:50 -04:00