- Update docker compose steps for mysql and spanner to use pytest
- Add infra and configuration for pytest to run tests
- Remove old "run.py" test setup
Closes STOR-235
* feat: Remove support for BrowserID
* mark test only functions as such. I think we can drop MapAndThenTrait for more recent implementations of rust.
Closes: SYNC-3684
* feat: Allow uid range for purge function
In an attempt to parallelize this script after a very long delay,
specify a range so that multiple scripts can try to process
different ranges of the database.
Closes#1548
* bug: Add try/except handler for force
This will wrap the force `delete_service_data` with a try/except handler
so as not to prevent the tokenserver record from being removed if the
delete_service_data fails.
* Try/except will capture any errors from trying to call the delete on a
given node, this could fail if the auth or node aren't correct.
* Override will override the attempted node. This will allow us to force
the delete message, even if the original data was copied over and the
node was incorrect.
* 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
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
Note: this commit contains a breaking change. Previously, there was a migration that included two services with static IDs by default, but this commit adds a new migration that removes those two services and adjusts the code to account for the change.
Closes#1144
* allowed cors origin and max_age to be configurable
* e2e test edit
* moved comment
* feedback changes
* e2e test edit
* remove extra line at end of file
Co-authored-by: JR Conlin <jconlin+git@mozilla.com>
* bug: fold commit message bsos into pending batch
The client may sometimes include bsos in the batch
commit message. The problem is that due to the way
that data is written to spanner, mutations do not
retain the ability to see data previously written
in the same transaction. This causes collisions.
To solve this, treat the bsos included in the commit
as another batch update, then commit all the data.
This does run the risk of bumping up against the
mutation limit, but it ensures the best chance of
data consistency.
Writing the commit bsos prior to batch commit will
result in the "newer" records being overwritten by
"older" ones in the batch.
Writing the commit bsos after the batch commit runs
the same mutation index conflict problem.
Closes#882
Co-authored-by: Philip Jenvey <pjenvey@underboss.org>