Skip to content

1512: minor: add datafusion version info - #8

Open
martin-augment wants to merge 1 commit into
mainfrom
pr-1512-2026-03-16-08-22-44
Open

1512: minor: add datafusion version info#8
martin-augment wants to merge 1 commit into
mainfrom
pr-1512-2026-03-16-08-22-44

Conversation

@martin-augment

Copy link
Copy Markdown
Owner

1512: To review by AI

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the observability and information reporting of Ballista components by integrating and exposing the underlying DataFusion version. This change allows for easier debugging and system monitoring by providing crucial version details directly in logs and API responses, without altering core functionality.

Highlights

  • Version Information: Added the DataFusion version to the startup log messages for both Ballista executors and schedulers, improving observability.
  • API Enhancements: Included the DataFusion version in the API responses for scheduler state and version endpoints, providing more comprehensive system information.
Changelog
  • ballista/executor/src/executor_process.rs
    • Imported the DATAFUSION_VERSION constant.
    • Updated the executor startup log message to display both Ballista and DataFusion versions.
  • ballista/scheduler/src/api/handlers.rs
    • Imported the DATAFUSION_VERSION constant.
    • Added a datafusion_version field to the SchedulerStateResponse struct.
    • Added a datafusion_version field to the SchedulerVersionResponse struct.
    • Populated the datafusion_version field in the get_scheduler_state handler.
    • Populated the datafusion_version field in the get_scheduler_version handler.
  • ballista/scheduler/src/scheduler_process.rs
    • Imported the DATAFUSION_VERSION constant.
    • Updated the scheduler startup log message to display both Ballista and DataFusion versions.
  • ballista/scheduler/src/standalone.rs
    • Imported the DATAFUSION_VERSION constant.
    • Updated the standalone scheduler startup log message to display both Ballista and DataFusion versions.
Activity
  • The pull request was created by martin-augment.
  • The pull request is marked for review by AI, indicating no human review activity has occurred yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown

Walkthrough

The pull request introduces DataFusion version tracking across multiple Ballista components. Four files are modified to import the DATAFUSION_VERSION constant and integrate it into system outputs. In the executor and scheduler processes, startup log messages are updated to display both Ballista and DataFusion versions. In the scheduler API handlers, a new datafusion_version field is added to the SchedulerStateResponse and SchedulerVersionResponse structures, which are populated with the DataFusion version during response construction. These changes maintain backward compatibility by not altering any exported API signatures.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pr-1512-2026-03-16-08-22-44
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds the DataFusion version to the startup log messages for the Ballista executor and scheduler. It also extends the scheduler's API to include the DataFusion version in the state and version responses. The changes are consistent and improve the observability of the system by providing more detailed version information. The code modifications are correct and well-implemented.

@augmentcode

augmentcode Bot commented Mar 16, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds DataFusion version reporting alongside Ballista version in executor/scheduler startup logs and the scheduler REST API responses (/api/state, /api/version).

Why: Makes it easier to confirm the runtime DataFusion/Ballista version combination when debugging or operating a cluster.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@claude

claude Bot commented Mar 16, 2026

Copy link
Copy Markdown

PR Review: Add DataFusion Version Info

Overall this is a clean, minimal, and useful change that improves observability by surfacing the DataFusion version at startup and via the API. Low risk, backward-compatible. A few observations below.

Observations

1. Import duplication across 4 files (minor)

datafusion::DATAFUSION_VERSION is added as a direct import in 4 separate files. Since ballista_core already depends on datafusion and is the natural home for BALLISTA_VERSION, it would be more maintainable to re-export DATAFUSION_VERSION from ballista_core alongside it:

pub use datafusion::DATAFUSION_VERSION;

Then all four files could import from a single source (use ballista_core::{BALLISTA_VERSION, DATAFUSION_VERSION}), keeping version-related constants in one canonical location.

2. Silently dropped "Rust" qualifier in standalone.rs (minor)

Old: "Ballista v{BALLISTA_VERSION} Rust Scheduler listening on {addr:?}"
New: "Ballista Scheduler v{BALLISTA_VERSION} (DataFusion v{DATAFUSION_VERSION}) listening on {addr:?}"

The "Rust" qualifier is dropped without mention in the PR description. It originally distinguished from an older Java scheduler. Worth confirming this removal is intentional.

3. Mergeable imports in handlers.rs (nit)

Two separate use datafusion::... lines could be merged into one: use datafusion::{DATAFUSION_VERSION, physical_plan::metrics::{MetricValue, MetricsSet, Time}}.

4. API change is additive — no breaking change

Adding datafusion_version to SchedulerStateResponse and SchedulerVersionResponse is purely additive for JSON consumers. No deny_unknown_fields constraint is present, so this is safe.

5. Test coverage

No tests added or updated. Risk is low since these are startup messages and informational fields, but existing integration tests for /state or /version endpoints (if any) may need updating.

Summary

Area Assessment
Code quality Good — clean, consistent changes
Correctness No issues found
Backward compatibility Safe — additive API change
Security No concerns
Tests None added; acceptable for this scope

The import consolidation via a ballista_core re-export (point 1) would be the most impactful improvement, but the PR is mergeable as-is for this minor version-info addition.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ballista/scheduler/src/api/handlers.rs (1)

99-130: Consider adding handler-level contract tests for the new field.

A small JSON response assertion for get_scheduler_state and get_scheduler_version would prevent accidental regressions of datafusion_version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ballista/scheduler/src/api/handlers.rs` around lines 99 - 130, Add
handler-level contract tests that call get_scheduler_state and
get_scheduler_version and assert the JSON responses include the new
datafusion_version field (and other important fields like
version/started/scheduling_policy) to prevent regressions; specifically, write
tests that invoke get_scheduler_state (using SchedulerServer::state or a test
double) and deserialize the Json response into SchedulerStateResponse to assert
datafusion_version equals DATAFUSION_VERSION and similarly call
get_scheduler_version and assert SchedulerVersionResponse.datafusion_version
equals DATAFUSION_VERSION, ensuring the test covers cfg-dependent flags as
needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ballista/scheduler/src/api/handlers.rs`:
- Around line 99-130: Add handler-level contract tests that call
get_scheduler_state and get_scheduler_version and assert the JSON responses
include the new datafusion_version field (and other important fields like
version/started/scheduling_policy) to prevent regressions; specifically, write
tests that invoke get_scheduler_state (using SchedulerServer::state or a test
double) and deserialize the Json response into SchedulerStateResponse to assert
datafusion_version equals DATAFUSION_VERSION and similarly call
get_scheduler_version and assert SchedulerVersionResponse.datafusion_version
equals DATAFUSION_VERSION, ensuring the test covers cfg-dependent flags as
needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a0c4df0-b636-4a1d-9813-64d66e67b6f6

📥 Commits

Reviewing files that changed from the base of the PR and between 7e121cb and 39b9b24.

📒 Files selected for processing (4)
  • ballista/executor/src/executor_process.rs
  • ballista/scheduler/src/api/handlers.rs
  • ballista/scheduler/src/scheduler_process.rs
  • ballista/scheduler/src/standalone.rs

@martin-augment

Copy link
Copy Markdown
Owner Author

99-130: Consider adding handler-level contract tests for the new field.

A small JSON response assertion for get_scheduler_state and get_scheduler_version would prevent accidental regressions of datafusion_version.

value:good-to-have; category:bug; feedback: The CodeRabbit AI reviewer is correct! The Ballista project has no unit/IT tests for the REST API based on Axum. It would be good to start adding such! They would help preventing regressions in the future.

@martin-augment

Copy link
Copy Markdown
Owner Author

5. Test coverage

No tests added or updated. Risk is low since these are startup messages and informational fields, but existing integration tests for /state or /version endpoints (if any) may need updating.

value:good-to-have; category:bug; feedback: The Claude AI reviewer is correct! The Ballista project has no unit/IT tests for the REST API based on Axum. It would be good to start adding such! They would help preventing regressions in the future.

@martin-augment

Copy link
Copy Markdown
Owner Author

1. Import duplication across 4 files (minor)

datafusion::DATAFUSION_VERSION is added as a direct import in 4 separate files. Since ballista_core already depends on datafusion and is the natural home for BALLISTA_VERSION, it would be more maintainable to re-export DATAFUSION_VERSION from ballista_core alongside it:

pub use datafusion::DATAFUSION_VERSION;

Then all four files could import from a single source (use ballista_core::{BALLISTA_VERSION, DATAFUSION_VERSION}), keeping version-related constants in one canonical location.

value:good-to-have; category:bug; feedback: The Claude AI reviewer is correct! By using a re-export it will be much easier to update the path of DATAFUSION_VERSION if it ever changes in DataFusion itself. Currently it would have to be updated in 4 places. If re-export is used then it will be just one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants