Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 56 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,14 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

rebalance-integration-test:
name: Rebalance integration test
name: Rebalance integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -304,8 +310,14 @@ jobs:
make test-rebalance

worker-processing-integration-test:
name: Worker processing integration test
name: Worker processing integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -342,8 +354,14 @@ jobs:
make test-worker-processing

upkeep-retry-integration-test:
name: Upkeep retry integration test
name: Upkeep retry integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is upkeep even related to kafka consumer backends?

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -380,8 +398,14 @@ jobs:
make test-upkeep-retry

upkeep-expiry-integration-test:
name: Upkeep expiry integration test
name: Upkeep expiry integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -418,8 +442,14 @@ jobs:
make test-upkeep-expiry

upkeep-delay-integration-test:
name: Upkeep delay integration test
name: Upkeep delay integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -456,8 +486,14 @@ jobs:
make test-upkeep-delay

failed-tasks-integration-test:
name: Failed tasks integration test
name: Failed tasks integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -494,8 +530,14 @@ jobs:
make test-failed-tasks

multi-topic-integration-test:
name: Multi-topic integration test
name: Multi-topic integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down Expand Up @@ -532,8 +574,14 @@ jobs:
make test-multi-topic

push-postgres-integration-test:
name: Push mode postgres integration test
name: Push mode postgres integration test${{ matrix.consumer_backend == 'arroyo' && ' (arroyo)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
consumer_backend: [rdkafka, arroyo]
env:
TASKBROKER_USE_ARROYO_CONSUMER: ${{ matrix.consumer_backend == 'arroyo' }}

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
Expand Down
7 changes: 7 additions & 0 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ pub struct Config {
/// The path to the runtime config file
pub runtime_config_path: Option<String>,

/// Consume with Arroyo's async Kafka consumer instead of rdkafka's stream consumer.
pub use_arroyo_consumer: bool,

/// The frequency at which upkeep tasks
/// (discarding, retrying activations, etc.) are executed.
pub upkeep_task_interval_ms: u64,
Expand Down Expand Up @@ -297,6 +300,7 @@ impl Default for Config {
kafka_send_timeout_ms: 500,
store: StoreConfig::default(),
runtime_config_path: None,
use_arroyo_consumer: false,
upkeep_task_interval_ms: 1000,
upkeep_unhealthy_interval_ms: 5000,
health_check_killswitched: false,
Expand Down Expand Up @@ -1042,6 +1046,7 @@ mod tests {
assert_eq!(config.store.sqlite.vacuum_page_count, None);
assert_eq!(config.canary_tasks, 0);
assert!(config.worker_map.is_empty());
assert!(!config.use_arroyo_consumer);
}

#[test]
Expand Down Expand Up @@ -1236,6 +1241,7 @@ mod tests {
jail.set_env("TASKBROKER_DATABASE_ADAPTER", "postgres");
jail.set_env("TASKBROKER_MAX_PROCESSING_ATTEMPTS", "5");
jail.set_env("TASKBROKER_CANARY_TASKS", "2");
jail.set_env("TASKBROKER_USE_ARROYO_CONSUMER", "true");

let args = Args {
run: Run::Broker,
Expand All @@ -1246,6 +1252,7 @@ mod tests {
assert_eq!(config.store.adapter, DatabaseAdapter::Postgres);
assert_eq!(config.store.max_processing_attempts, 5);
assert_eq!(config.canary_tasks, 2);
assert!(config.use_arroyo_consumer);

Ok(())
});
Expand Down
Loading
Loading