Skip to content

fix: enable tracing with the scheduler's rest-api feature - #2747

Merged
milenkovicm merged 1 commit into
apache:mainfrom
andygrove:scheduler-rest-api-tracing
Nov 2, 2026
Merged

milenkovicm merged 1 commit into
apache:mainfrom
andygrove:scheduler-rest-api-tracing

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

No issue filed; the bug is described below. Related: #2745, which proposes compiling the event-log writer without the REST API.

Rationale for this change

ballista-scheduler doesn't compile with --no-default-features --features rest-api:

error[E0433]: cannot find module or crate `tracing` in this scope
error: could not compile `ballista-scheduler` (lib) due to 18 previous errors

The REST handlers (src/api/handlers.rs) and the event-log history (src/history/mod.rs) log through tracing, which is an optional dependency. Only the default build-binary feature enabled it, so the default build hid the problem. An embedder that turns off the default features and asks for rest-api, for example to get the event-log writer, can't build. Apache DataFusion Comet hit this in apache/datafusion-comet#7420 and works around it by enabling tracing itself.

What changes are included in this PR?

  • The rest-api feature enables tracing.
  • The --no-default-features CI job also checks the scheduler with only rest-api enabled.

Are there any user-facing changes?

No. Builds that already compiled are unchanged. ballista-scheduler with --no-default-features --features rest-api now compiles.

The REST handlers and the event-log history log through `tracing`, which only
the default `build-binary` feature enabled, so building ballista-scheduler with
`--no-default-features --features rest-api` failed with 18 unresolved `tracing`
errors. `rest-api` now enables `tracing`, and CI checks that build.

@milenkovicm milenkovicm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @andygrove

@milenkovicm
milenkovicm added this pull request to the merge queue Nov 2, 2026
Merged via the queue into apache:main with commit c720591 Nov 2, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants