From 1c1f1f2993f3aa2c114753df1a70d5aadd1fa51a Mon Sep 17 00:00:00 2001 From: JarroVGIT Date: Tue, 9 Jun 2026 12:15:21 +0200 Subject: [PATCH 1/5] Replace `#[async_trait]` with fully qualified `#[async_trait::async_trait]` across project --- ballista/core/src/client_pool.rs | 2 +- ballista/core/src/event_loop.rs | 2 +- ballista/core/src/planner.rs | 2 +- ballista/core/src/serde/generated/ballista.rs | 4 ++-- ballista/executor/src/client_pool.rs | 2 +- ballista/executor/src/execution_engine.rs | 4 ++-- ballista/scheduler/src/cluster/memory.rs | 4 ++-- .../scheduler/src/scheduler_server/query_stage_scheduler.rs | 2 +- ballista/scheduler/src/test_utils.rs | 4 ++-- docs/source/user-guide/extensions-example.md | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ballista/core/src/client_pool.rs b/ballista/core/src/client_pool.rs index 3ae02cef3a..4acbe647a9 100644 --- a/ballista/core/src/client_pool.rs +++ b/ballista/core/src/client_pool.rs @@ -31,7 +31,7 @@ use std::sync::Arc; // --------------------------------------------------------------------------- /// Manages a pool of reusable [BallistaClient] connections. -#[async_trait] +#[async_trait::async_trait] pub trait BallistaClientPool: Send + Sync + Debug { /// Acquire an idle client for `(host, port, config)`, or create a new one if the /// pool is empty for that key. The returned [PooledClient] returns itself diff --git a/ballista/core/src/event_loop.rs b/ballista/core/src/event_loop.rs index 8e794ffd3c..1fb5c3792d 100644 --- a/ballista/core/src/event_loop.rs +++ b/ballista/core/src/event_loop.rs @@ -27,7 +27,7 @@ use tokio::sync::mpsc; use crate::error::{BallistaError, Result}; /// Trait defining actions to be performed in response to events in an event loop. -#[async_trait] +#[async_trait::async_trait] pub trait EventAction: Send + Sync { /// Called when the event loop starts. fn on_start(&self); diff --git a/ballista/core/src/planner.rs b/ballista/core/src/planner.rs index 54e3f605f0..3879e83388 100644 --- a/ballista/core/src/planner.rs +++ b/ballista/core/src/planner.rs @@ -101,7 +101,7 @@ impl BallistaQueryPlanner { } } -#[async_trait] +#[async_trait::async_trait] impl QueryPlanner for BallistaQueryPlanner { async fn create_physical_plan( &self, diff --git a/ballista/core/src/serde/generated/ballista.rs b/ballista/core/src/serde/generated/ballista.rs index 269827145e..0143fd975f 100644 --- a/ballista/core/src/serde/generated/ballista.rs +++ b/ballista/core/src/serde/generated/ballista.rs @@ -1695,7 +1695,7 @@ pub mod scheduler_grpc_server { )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SchedulerGrpcServer. - #[async_trait] + #[async_trait::async_trait] pub trait SchedulerGrpc: std::marker::Send + std::marker::Sync + 'static { /// Executors must poll the scheduler for heartbeat and to receive tasks async fn poll_work( @@ -2733,7 +2733,7 @@ pub mod executor_grpc_server { )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with ExecutorGrpcServer. - #[async_trait] + #[async_trait::async_trait] pub trait ExecutorGrpc: std::marker::Send + std::marker::Sync + 'static { async fn launch_task( &self, diff --git a/ballista/executor/src/client_pool.rs b/ballista/executor/src/client_pool.rs index b3f425870e..5dcfaa56eb 100644 --- a/ballista/executor/src/client_pool.rs +++ b/ballista/executor/src/client_pool.rs @@ -146,7 +146,7 @@ fn evict(idle: &IdleMap, timeout: Duration) { }); } -#[async_trait] +#[async_trait::async_trait] impl BallistaClientPool for DefaultBallistaClientPool { async fn acquire( &self, diff --git a/ballista/executor/src/execution_engine.rs b/ballista/executor/src/execution_engine.rs index c57d104227..1c6b1db06f 100644 --- a/ballista/executor/src/execution_engine.rs +++ b/ballista/executor/src/execution_engine.rs @@ -64,7 +64,7 @@ pub trait ExecutionEngine: Sync + Send { /// and can be executed as one unit with each partition running in parallel. /// The output of each partition is re-partitioned and written to disk in /// Arrow IPC format. Subsequent stages read these results via ShuffleReaderExec. -#[async_trait] +#[async_trait::async_trait] pub trait QueryStageExecutor: Sync + Send + Debug + Display { /// Executes a single partition of this query stage. /// @@ -230,7 +230,7 @@ impl Display for DefaultQueryStageExec { } } -#[async_trait] +#[async_trait::async_trait] impl QueryStageExecutor for DefaultQueryStageExec { async fn execute_query_stage( &self, diff --git a/ballista/scheduler/src/cluster/memory.rs b/ballista/scheduler/src/cluster/memory.rs index 54eba10b17..f751cc057c 100644 --- a/ballista/scheduler/src/cluster/memory.rs +++ b/ballista/scheduler/src/cluster/memory.rs @@ -63,7 +63,7 @@ pub struct InMemoryClusterState { cluster_event_sender: ClusterEventSender, } -#[async_trait] +#[async_trait::async_trait] impl ClusterState for InMemoryClusterState { async fn bind_schedulable_tasks( &self, @@ -320,7 +320,7 @@ impl ExtendedJobStatus { } } -#[async_trait] +#[async_trait::async_trait] impl JobState for InMemoryJobState { async fn submit_job( &self, diff --git a/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs b/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs index db85deaede..e3eb6df05d 100644 --- a/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs +++ b/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs @@ -65,7 +65,7 @@ impl QueryStageSchedul } } -#[async_trait] +#[async_trait::async_trait] impl EventAction for QueryStageScheduler { diff --git a/ballista/scheduler/src/test_utils.rs b/ballista/scheduler/src/test_utils.rs index 93ca29d752..ba285fb6cb 100644 --- a/ballista/scheduler/src/test_utils.rs +++ b/ballista/scheduler/src/test_utils.rs @@ -80,7 +80,7 @@ const TEST_SCHEDULER_NAME: &str = "localhost:50050"; #[derive(Debug)] pub struct ExplodingTableProvider; -#[async_trait] +#[async_trait::async_trait] impl TableProvider for ExplodingTableProvider { fn as_any(&self) -> &dyn Any { self @@ -346,7 +346,7 @@ impl VirtualExecutor { #[derive(Default)] pub struct BlackholeTaskLauncher {} -#[async_trait] +#[async_trait::async_trait] impl TaskLauncher for BlackholeTaskLauncher { async fn launch_tasks( &self, diff --git a/docs/source/user-guide/extensions-example.md b/docs/source/user-guide/extensions-example.md index 4d41da323c..a24f26ecff 100644 --- a/docs/source/user-guide/extensions-example.md +++ b/docs/source/user-guide/extensions-example.md @@ -347,7 +347,7 @@ transformation is performed using implementing `ExtensionPlanner` trait: #[derive(Debug, Clone, Default)] pub struct CustomPlannerExtension {} -#[async_trait] +#[async_trait::async_trait] impl ExtensionPlanner for CustomPlannerExtension { async fn plan_extension( &self, From 904bfad7cce6fca5183f05dc0cfda73dcca691e3 Mon Sep 17 00:00:00 2001 From: JarroVGIT Date: Tue, 9 Jun 2026 12:19:55 +0200 Subject: [PATCH 2/5] Remove `use async_trait::async_trait;` statements --- ballista/core/src/client_pool.rs | 1 - ballista/core/src/event_loop.rs | 1 - ballista/core/src/planner.rs | 1 - ballista/executor/src/client_pool.rs | 1 - ballista/executor/src/execution_engine.rs | 1 - ballista/scheduler/src/cluster/memory.rs | 1 - ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs | 1 - ballista/scheduler/src/test_utils.rs | 1 - 8 files changed, 8 deletions(-) diff --git a/ballista/core/src/client_pool.rs b/ballista/core/src/client_pool.rs index 4acbe647a9..9e92c7e3d2 100644 --- a/ballista/core/src/client_pool.rs +++ b/ballista/core/src/client_pool.rs @@ -21,7 +21,6 @@ use crate::client::BallistaClient; use crate::error::Result; use crate::extension::BallistaConfigGrpcEndpoint; use crate::utils::GrpcClientConfig; -use async_trait::async_trait; use std::fmt::Debug; use std::ops::{Deref, DerefMut}; use std::sync::Arc; diff --git a/ballista/core/src/event_loop.rs b/ballista/core/src/event_loop.rs index 1fb5c3792d..9066d6031a 100644 --- a/ballista/core/src/event_loop.rs +++ b/ballista/core/src/event_loop.rs @@ -20,7 +20,6 @@ use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; -use async_trait::async_trait; use log::{error, info}; use tokio::sync::mpsc; diff --git a/ballista/core/src/planner.rs b/ballista/core/src/planner.rs index 3879e83388..e1ed75998c 100644 --- a/ballista/core/src/planner.rs +++ b/ballista/core/src/planner.rs @@ -19,7 +19,6 @@ use crate::config::BallistaConfig; use crate::execution_plans::{DistributedExplainAnalyzeExec, DistributedQueryExec}; use crate::serde::BallistaLogicalExtensionCodec; -use async_trait::async_trait; use datafusion::arrow::datatypes::Schema; use datafusion::common::tree_node::{TreeNode, TreeNodeVisitor}; use datafusion::error::DataFusionError; diff --git a/ballista/executor/src/client_pool.rs b/ballista/executor/src/client_pool.rs index 5dcfaa56eb..ed1260c0a0 100644 --- a/ballista/executor/src/client_pool.rs +++ b/ballista/executor/src/client_pool.rs @@ -29,7 +29,6 @@ //! A optional background tokio task evicts idle connections that have not been used //! within the configured `idle_timeout`. -use async_trait::async_trait; use ballista_core::client::BallistaClient; use ballista_core::client_pool::{BallistaClientPool, PooledClient}; use ballista_core::error::Result; diff --git a/ballista/executor/src/execution_engine.rs b/ballista/executor/src/execution_engine.rs index 1c6b1db06f..57ab6d0549 100644 --- a/ballista/executor/src/execution_engine.rs +++ b/ballista/executor/src/execution_engine.rs @@ -21,7 +21,6 @@ //! query stages in a distributed setting. The execution engine is responsible //! for creating query stage executors from physical plans. -use async_trait::async_trait; use ballista_core::client_pool::BallistaClientPool; use ballista_core::execution_plans::sort_shuffle::SortShuffleWriterExec; use ballista_core::execution_plans::{ShuffleReaderExec, ShuffleWriterExec}; diff --git a/ballista/scheduler/src/cluster/memory.rs b/ballista/scheduler/src/cluster/memory.rs index f751cc057c..b4f4e36aa8 100644 --- a/ballista/scheduler/src/cluster/memory.rs +++ b/ballista/scheduler/src/cluster/memory.rs @@ -20,7 +20,6 @@ use crate::cluster::{ JobStatus, TaskDistributionPolicy, bind_task_bias, bind_task_round_robin, }; use crate::state::execution_graph::ExecutionGraphBox; -use async_trait::async_trait; use ballista_core::error::{BallistaError, Result}; use ballista_core::serde::protobuf::{ AvailableTaskSlots, ExecutorHeartbeat, ExecutorStatus, FailedJob, QueuedJob, diff --git a/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs b/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs index e3eb6df05d..c2a4e58004 100644 --- a/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs +++ b/ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs @@ -18,7 +18,6 @@ use std::sync::Arc; use std::time::Duration; -use async_trait::async_trait; use ballista_core::serde::protobuf::{FailedJob, JobStatus}; use log::{error, info, trace, warn}; diff --git a/ballista/scheduler/src/test_utils.rs b/ballista/scheduler/src/test_utils.rs index ba285fb6cb..1c580da628 100644 --- a/ballista/scheduler/src/test_utils.rs +++ b/ballista/scheduler/src/test_utils.rs @@ -25,7 +25,6 @@ use std::future::Future; use std::sync::Arc; use std::time::Duration; -use async_trait::async_trait; use crate::config::SchedulerConfig; use crate::metrics::SchedulerMetricsCollector; From f5ee692819ebb8e5a52d0adec023735f73103a5d Mon Sep 17 00:00:00 2001 From: JarroVGIT Date: Tue, 9 Jun 2026 12:21:15 +0200 Subject: [PATCH 3/5] Replace `tonic::async_trait` with `async_trait::async_trait` on non-gRPC related trait definitions --- ballista/scheduler/src/cluster/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ballista/scheduler/src/cluster/mod.rs b/ballista/scheduler/src/cluster/mod.rs index 5c47675380..b28d7960c7 100644 --- a/ballista/scheduler/src/cluster/mod.rs +++ b/ballista/scheduler/src/cluster/mod.rs @@ -154,7 +154,7 @@ pub type ExecutorSlot = (String, u32); /// Trait for maintaining a globally consistent view of cluster resources. /// /// Implementations track executor registration, heartbeats, and available task slots. -#[tonic::async_trait] +#[async_trait::async_trait] pub trait ClusterState: Send + Sync + 'static { /// Initializes the cluster state backend. /// @@ -277,7 +277,7 @@ pub type JobStateEventStream = Pin + Send>> /// Trait for persisting state related to executing jobs. /// /// Implementations handle job lifecycle, execution graphs, and session management. -#[tonic::async_trait] +#[async_trait::async_trait] pub trait JobState: Send + Sync { /// Accepts a job into the scheduler's queue. /// From 70680fd529989217f909d0d4a51fc02352195480 Mon Sep 17 00:00:00 2001 From: JarroVGIT Date: Tue, 9 Jun 2026 12:43:14 +0200 Subject: [PATCH 4/5] Revert: do not change the generated code. --- ballista/core/src/serde/generated/ballista.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ballista/core/src/serde/generated/ballista.rs b/ballista/core/src/serde/generated/ballista.rs index 0143fd975f..269827145e 100644 --- a/ballista/core/src/serde/generated/ballista.rs +++ b/ballista/core/src/serde/generated/ballista.rs @@ -1695,7 +1695,7 @@ pub mod scheduler_grpc_server { )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SchedulerGrpcServer. - #[async_trait::async_trait] + #[async_trait] pub trait SchedulerGrpc: std::marker::Send + std::marker::Sync + 'static { /// Executors must poll the scheduler for heartbeat and to receive tasks async fn poll_work( @@ -2733,7 +2733,7 @@ pub mod executor_grpc_server { )] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with ExecutorGrpcServer. - #[async_trait::async_trait] + #[async_trait] pub trait ExecutorGrpc: std::marker::Send + std::marker::Sync + 'static { async fn launch_task( &self, From 1558331d7be731cf7890d82542ffbf59217f004d Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Tue, 9 Jun 2026 13:56:58 +0300 Subject: [PATCH 5/5] Add AI config files --- .cursor/rules.md | 5 +++++ .gemini/rules.md | 5 +++++ AGENTS.md | 5 +++++ CLAUDE.md | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 .cursor/rules.md create mode 100644 .gemini/rules.md create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/.cursor/rules.md b/.cursor/rules.md new file mode 100644 index 0000000000..00385e6f5f --- /dev/null +++ b/.cursor/rules.md @@ -0,0 +1,5 @@ +The AI agents should never link to any issue or a pull request +in any GitHub repository in the code reviews! + +The AI agents should not review AI agents' config files like CLAUDE.md or AGENTS.md! + diff --git a/.gemini/rules.md b/.gemini/rules.md new file mode 100644 index 0000000000..00385e6f5f --- /dev/null +++ b/.gemini/rules.md @@ -0,0 +1,5 @@ +The AI agents should never link to any issue or a pull request +in any GitHub repository in the code reviews! + +The AI agents should not review AI agents' config files like CLAUDE.md or AGENTS.md! + diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..00385e6f5f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,5 @@ +The AI agents should never link to any issue or a pull request +in any GitHub repository in the code reviews! + +The AI agents should not review AI agents' config files like CLAUDE.md or AGENTS.md! + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..00385e6f5f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +The AI agents should never link to any issue or a pull request +in any GitHub repository in the code reviews! + +The AI agents should not review AI agents' config files like CLAUDE.md or AGENTS.md! +