mirror of
https://github.com/mozilla-services/syncstorage-rs.git
synced 2025-08-06 03:46:57 +02:00
Merge pull request #1696 from mozilla-services/fix/tokenserver-e2e-pyfxa-STOR-204
Some checks are pending
Glean probe-scraper / glean-probe-scraper (push) Waiting to run
Some checks are pending
Glean probe-scraper / glean-probe-scraper (push) Waiting to run
fix: re-enable tokensever e2e tests
This commit is contained in:
commit
4ba7b32dc8
@ -225,7 +225,7 @@ commands:
|
||||
jobs:
|
||||
checks:
|
||||
docker:
|
||||
- image: cimg/rust:1.81.0 # RUST_VER
|
||||
- image: cimg/rust:1.86 # RUST_VER
|
||||
auth:
|
||||
username: $DOCKER_USER
|
||||
password: $DOCKER_PASS
|
||||
@ -242,7 +242,7 @@ jobs:
|
||||
|
||||
build-and-test:
|
||||
docker:
|
||||
- image: cimg/rust:1.81.0 # RUST_VER
|
||||
- image: cimg/rust:1.86 # RUST_VER
|
||||
auth:
|
||||
username: $DOCKER_USER
|
||||
password: $DOCKER_PASS
|
||||
@ -296,7 +296,7 @@ jobs:
|
||||
#- save-sccache-cache
|
||||
build-mysql-image:
|
||||
docker:
|
||||
- image: cimg/rust:1.81.0 # RUST_VER
|
||||
- image: cimg/rust:1.86 # RUST_VER
|
||||
auth:
|
||||
username: $DOCKER_USER
|
||||
password: $DOCKER_PASS
|
||||
@ -331,7 +331,7 @@ jobs:
|
||||
|
||||
build-spanner-image:
|
||||
docker:
|
||||
- image: cimg/rust:1.81.0 # RUST_VER
|
||||
- image: cimg/rust:1.86 # RUST_VER
|
||||
auth:
|
||||
username: $DOCKER_USER
|
||||
password: $DOCKER_PASS
|
||||
|
@ -25,6 +25,7 @@ authors = [
|
||||
"Mozilla Services Engineering <services-engineering+code@mozilla.com>",
|
||||
]
|
||||
edition = "2021"
|
||||
rust-version = "1.86"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
@ -3,7 +3,8 @@ ARG DATABASE_BACKEND=spanner
|
||||
ARG MYSQLCLIENT_PKG=libmariadb-dev-compat
|
||||
|
||||
# NOTE: Ensure builder's Rust version matches CI's in .circleci/config.yml
|
||||
FROM docker.io/lukemathwalker/cargo-chef:0.1.67-rust-1.81-bullseye AS chef
|
||||
# RUST_VER
|
||||
FROM docker.io/lukemathwalker/cargo-chef:0.1.71-rust-1.86-bullseye AS chef
|
||||
WORKDIR /app
|
||||
|
||||
FROM chef AS planner
|
||||
|
@ -1,3 +1,3 @@
|
||||
cryptography==44.0.2
|
||||
pyfxa==0.7.7
|
||||
pyfxa==0.8.1
|
||||
tokenlib==2.0.0
|
||||
|
@ -69,7 +69,6 @@ pub trait ReportableError: std::fmt::Display + std::fmt::Debug {
|
||||
/// [ReportableError] if it implements the trait. Otherwise callers of this
|
||||
/// method will likely subsequently call [Error::source] to return the
|
||||
/// source (if any) as the parent [Error] trait.
|
||||
|
||||
fn reportable_source(&self) -> Option<&(dyn ReportableError + 'static)> {
|
||||
None
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ impl TokenserverRequest {
|
||||
/// `keys_changed_at` <= `generation` at all times.
|
||||
///
|
||||
/// * `client_state` is a key fingerprint and should never change back
|
||||
/// to a previously-seen value.
|
||||
/// to a previously-seen value.
|
||||
///
|
||||
/// Callers who provide identity claims that violate any of these rules
|
||||
/// either have stale credetials (in which case they should re-authenticate)
|
||||
|
@ -182,7 +182,7 @@ impl fmt::Display for LogItems {
|
||||
|
||||
struct LogItemsMutator<'a>(&'a HttpRequest);
|
||||
|
||||
impl<'a> LogItemsMutator<'a> {
|
||||
impl LogItemsMutator<'_> {
|
||||
pub fn insert(&mut self, k: String, v: String) {
|
||||
let mut exts = self.0.extensions_mut();
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ impl FromRequest for PreConditionHeaderOpt {
|
||||
/// Extract and validate the precondition headers
|
||||
fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future {
|
||||
let req = req.clone();
|
||||
Box::pin(async move { Self::extrude(req.headers()).map_err(Into::into) })
|
||||
Box::pin(async move { Self::extrude(req.headers()) })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,6 @@ pub async fn delete_collection(
|
||||
Ok(resp.json(timestamp))
|
||||
})
|
||||
.await
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub async fn get_collection(
|
||||
|
@ -37,7 +37,7 @@ pub fn reject_user_agent<B>(
|
||||
+ 'static),
|
||||
) -> LocalBoxFuture<'static, Result<ServiceResponse<EitherBody<B>>, actix_web::Error>> {
|
||||
match request.headers().get(USER_AGENT).cloned() {
|
||||
Some(header) if header.to_str().map_or(false, should_reject) => Box::pin(async move {
|
||||
Some(header) if header.to_str().is_ok_and(should_reject) => Box::pin(async move {
|
||||
trace!("Rejecting User-Agent: {:?}", header);
|
||||
let (req, payload) = request.into_parts();
|
||||
MetricsWrapper::extract(&req)
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![allow(non_local_definitions)]
|
||||
pub mod error;
|
||||
pub mod params;
|
||||
pub mod results;
|
||||
@ -229,7 +230,7 @@ pub trait Db: Debug {
|
||||
)
|
||||
}
|
||||
|
||||
/// Internal methods used by the db tests
|
||||
// Internal methods used by the db tests
|
||||
|
||||
fn get_collection_id(&self, name: String) -> DbFuture<'_, i32, Self::Error>;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![allow(non_local_definitions)]
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
|
@ -776,7 +776,6 @@ impl SpannerDb {
|
||||
} else {
|
||||
sync_timestamp_from_rfc3339(row[0].get_string_value())
|
||||
}
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
async fn get_storage_usage_async(
|
||||
@ -1502,7 +1501,6 @@ impl SpannerDb {
|
||||
} else {
|
||||
SyncTimestamp::from_i64(0).map_err(|e| DbError::integrity(e.to_string()))
|
||||
}
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
async fn put_bso_async(&self, params: params::PutBso) -> DbResult<results::PutBso> {
|
||||
|
@ -124,11 +124,10 @@ impl DbPool for SpannerDbPool {
|
||||
self.get_async()
|
||||
.await
|
||||
.map(|db| Box::new(db) as Box<dyn Db<Error = Self::Error>>)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
fn validate_batch_id(&self, id: String) -> DbResult<()> {
|
||||
super::batch::validate_batch_id(&id).map_err(Into::into)
|
||||
super::batch::validate_batch_id(&id)
|
||||
}
|
||||
|
||||
fn box_clone(&self) -> Box<dyn DbPool<Error = Self::Error>> {
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![allow(non_local_definitions)]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate diesel_migrations;
|
||||
|
@ -6,11 +6,11 @@ psutil
|
||||
pyjwt
|
||||
pyramid
|
||||
pyramid_hawkauth
|
||||
pyfxa
|
||||
pyfxa==0.8.1
|
||||
pytest
|
||||
requests
|
||||
simplejson
|
||||
sqlalchemy
|
||||
sqlalchemy==1.4.46
|
||||
tokenlib
|
||||
webtest
|
||||
wsgiproxy2
|
||||
|
@ -33,8 +33,6 @@ PASSWORD_LENGTH = 32
|
||||
SCOPE = 'https://identity.mozilla.com/apps/oldsync'
|
||||
|
||||
|
||||
@unittest.skip("Pending PyFxA oauth fix: "
|
||||
"https://github.com/mozilla/PyFxA/issues/101")
|
||||
class TestE2e(TestCase, unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
Loading…
Reference in New Issue
Block a user