Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(taskbroker): Enable querying for namespace specific tasks #74

Merged
merged 12 commits into from
Dec 9, 2024
Prev Previous commit
Next Next commit
bump sentry_protos
enochtangg committed Dec 6, 2024
commit f8a3a53a67ecb65b9ead36d3ff740c421f3b905d
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sentry_protos = "0.1.37"
sentry_protos = "0.1.39"
anyhow = "1.0.92"
chrono = { version = "0.4.26" }
sqlx = { version = "0.8.2", features = ["sqlite", "runtime-tokio", "chrono"] }
@@ -30,8 +30,6 @@ metrics-exporter-statsd = "0.9.0"
metrics = "0.24.0"
elegant-departure = { version = "0.3.1", features = ["tokio"] }
uuid = { version = "1.11.0", features = ["v4"] }
tower = "0.5.1"
http = "1.1.0"

[dev-dependencies]
rand = "0.8.5"
2 changes: 1 addition & 1 deletion python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ orjson>=3.10.10
protobuf>=5.28.3
pytest>=8.3.3
pyyaml>=6.0.2
sentry-protos>=0.1.37
sentry-protos>=0.1.39
2 changes: 1 addition & 1 deletion src/grpc_server.rs
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ impl ConsumerService for MyConsumerService {
error: None,
};

let fetch_next = &request.get_ref().fetch_next;
let fetch_next = &request.get_ref().fetch_next_task;
match fetch_next {
Some(fetch_next) => {
let start_time = Instant::now();

Unchanged files with check annotations Beta

use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Instant;
use tower::{Layer, Service};

Check failure on line 4 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

unresolved import `tower`
#[derive(Debug, Clone, Default)]
pub struct MetricsLayer {}
impl<S> Layer<S> for MetricsLayer {
type Service = MetricsMiddleware<S>;
fn layer(&self, service: S) -> Self::Service {

Check failure on line 12 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

ambiguous associated type
MetricsMiddleware { inner: service }
}
}
type BoxFuture<'a, T> = Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
impl<S, ReqBody, ResBody> Service<http::Request<ReqBody>> for MetricsMiddleware<S>

Check failure on line 24 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

failed to resolve: use of undeclared crate or module `http`
where
S: Service<http::Request<ReqBody>, Response = http::Response<ResBody>> + Clone + Send + 'static,

Check failure on line 26 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

failed to resolve: use of undeclared crate or module `http`

Check failure on line 26 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

failed to resolve: use of undeclared crate or module `http`
S::Future: Send + 'static,
ReqBody: Send + 'static,
{
type Error = S::Error;
type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>;
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {

Check failure on line 34 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

ambiguous associated type
self.inner.poll_ready(cx)
}
fn call(&mut self, req: http::Request<ReqBody>) -> Self::Future {

Check failure on line 38 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

failed to resolve: use of undeclared crate or module `http`

Check failure on line 38 in src/grpc_middleware.rs

GitHub Actions / Tests (ubuntu)

ambiguous associated type
let clone = self.inner.clone();
let mut inner = std::mem::replace(&mut self.inner, clone);