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
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
- full-integration (with examples)
- all

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -91,13 +95,11 @@ jobs:
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 15
# Always run on push to main/master and PRs, or when manually triggered
# Run on all PRs and pushes to main/master, or when manually triggered
if: >-
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')) ||
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.test_type == 'integration' ||
github.event.inputs.test_type == 'all'))
github.event_name == 'workflow_dispatch'

services:
postgres:
Expand Down Expand Up @@ -153,13 +155,11 @@ jobs:
name: Full Integration Tests (with Examples)
runs-on: ubuntu-latest
timeout-minutes: 20
# Run on main branch, or when manually triggered with 'full-integration' or 'all'
# Run on all PRs and pushes to main/master, or when manually triggered
if: >-
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/master' ||
(github.event_name == 'workflow_dispatch' &&
(github.event.inputs.test_type == 'full-integration (with examples)' ||
github.event.inputs.test_type == 'all'))
github.event_name == 'pull_request' ||
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch'

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion crates/zart/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
//!
//! Register the handler, start a worker, and fire an execution:
//!
//! ```rust,ignore
//! ```text
//! let mut registry = TaskRegistry::new();
//! registry.register("onboard-user", OnboardUser);
//!
Expand Down
5 changes: 5 additions & 0 deletions crates/zart/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ impl TaskRegistry {
self.handlers.get(task_name).map(|h| h.as_ref())
}

/// Returns the names of all registered handlers (for diagnostics).
pub(crate) fn handler_names(&self) -> Vec<&str> {
self.handlers.keys().map(|s| s.as_str()).collect()
}

/// Execute a registered handler with the given raw JSON data.
///
/// This sets up task-local scoping and delegates to the internal adapter.
Expand Down
6 changes: 5 additions & 1 deletion crates/zart/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ async fn dispatch_task(
let handler = match registry.get_handler(&task.task_name) {
Some(h) => h,
None => {
warn!("No handler registered for task {}", &task.task_name);
warn!(
"No handler registered for task '{}'; registered handlers: [{}]",
&task.task_name,
registry.handler_names().join(", ")
);
let _ = scheduler
.mark_failed(
&task.task_id,
Expand Down
Loading