Skip to content

Conversation

@varant-zlai
Copy link
Collaborator

@varant-zlai varant-zlai commented Apr 2, 2025

Summary

Adding verbs for modular join flow to driver

Checklist

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested
  • Documentation update
  • Not tested

Summary by CodeRabbit

  • New Features
    • Introduced three new job types: source-job, join-part-job, and merge-job.
    • Added a command-line option to specify the join part name for join-part jobs.
    • Enhanced command-line interface to execute new job types through updated subcommands.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 2, 2025

Walkthrough

This update expands the job execution functionality. In the Python components, three new job modes are added in the constants definitions and a corresponding command-line option is integrated into the main function. In the Scala driver, three new job run objects are defined to handle source, join-part, and merge job types, each equipped with their specific arguments and execution flow.

Changes

File(s) Change Summary
api/python/ai/chronon/repo/constants.py Added three new job modes (source-job, join-part-job, merge-job), updated MODE_ARGS with their argument configurations, and added corresponding routes under "joins".
api/python/ai/chronon/repo/run.py Introduced new CLI parameter --join-part-name in the main function via the @click.option decorator; updated function signature to include join_part_name.
spark/src/main/scala/ai/chronon/spark/Driver.scala Added three new objects: SourceJobRun, JoinPartJobRun, and MergeJobRun, each with their respective Args classes and a run method; updated main driver to dispatch these new subcommands.

Possibly related PRs

Suggested reviewers

  • nikhil-zlai
  • piyush-zlai
  • david-zlai
  • varant-zlai

Poem

Three new jobs enter the stage,
Modes defined to engage.
A join-part name now sets the tone,
With source and merge, our code has grown.
🎉 Code leaps forward, in bytes it's known!

Warning

Review ran into problems

🔥 Problems

GitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository.

Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 0fefb96 and d3e06a0.

📒 Files selected for processing (1)
  • api/python/ai/chronon/repo/constants.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • api/python/ai/chronon/repo/constants.py
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: streaming_tests
  • GitHub Check: streaming_tests
  • GitHub Check: spark_tests
  • GitHub Check: spark_tests
  • GitHub Check: join_tests
  • GitHub Check: join_tests
  • GitHub Check: groupby_tests
  • GitHub Check: groupby_tests
  • GitHub Check: analyzer_tests
  • GitHub Check: non_spark_tests
  • GitHub Check: non_spark_tests
  • GitHub Check: fetcher_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: fetcher_tests
  • GitHub Check: enforce_triggered_workflows

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
spark/src/main/scala/ai/chronon/spark/Driver.scala (2)

883-944: Join part logic is solid. Consider more tests.


946-989: Merge flow is clear. Address TODO for bootstrapping?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 65427a9 and 0fefb96.

📒 Files selected for processing (3)
  • api/python/ai/chronon/repo/constants.py (3 hunks)
  • api/python/ai/chronon/repo/run.py (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/Driver.scala (4 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
spark/src/main/scala/ai/chronon/spark/Driver.scala (4)
api/src/main/scala/ai/chronon/api/Constants.scala (1)
  • Constants (23-100)
api/src/main/scala/ai/chronon/api/ThriftJsonCodec.scala (1)
  • ThriftJsonCodec (41-137)
spark/src/main/scala/ai/chronon/spark/Args.scala (3)
  • Args (25-41)
  • parseConf (31-34)
  • toString (34-40)
spark/src/main/scala/ai/chronon/spark/JoinUtils.scala (2)
  • JoinUtils (37-620)
  • computeLeftSourceTableName (606-619)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: join_tests
  • GitHub Check: join_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (7)
api/python/ai/chronon/repo/run.py (2)

167-167: Option aligns with new job flow.


200-201: Signature updated correctly.

api/python/ai/chronon/repo/constants.py (3)

29-31: New modes fit well.


58-60: Mode bindings match arguments.


92-94: Routes align with new job modes.

spark/src/main/scala/ai/chronon/spark/Driver.scala (2)

20-20: Imports are relevant.

Also applies to: 22-22, 29-29


824-881:

❓ Verification inconclusive

Implementation looks fine. Check startDate vs endDate to avoid empty output.


🏁 Script executed:

#!/bin/bash
# Test SourceJob with identical start/end date
echo "Please run: spark-submit ... --start-ds=2024-01-01 --end-ds=2024-01-01 --mode=source-job ..."
echo "Verify the output is non-empty."

Length of output: 267


Action: Confirm Date Range Behavior
The implementation appears sound. However, please verify manually that providing identical start and end dates (yielding a single-day range) does not result in an empty output when running the SourceJob.

Co-authored-by: Thomas Chow <[email protected]>
@varant-zlai varant-zlai merged commit 3730ce1 into main Apr 2, 2025
20 checks passed
@varant-zlai varant-zlai deleted the vz--add_driver_verbs_for_modular_flow branch April 2, 2025 02:36
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary

Adding verbs for modular join flow to driver

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
- [x] Not tested


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced three new job types: source-job, join-part-job, and
merge-job.
- Added a command-line option to specify the join part name for
join-part jobs.
- Enhanced command-line interface to execute new job types through
updated subcommands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
Co-authored-by: tchow-zlai <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
kumar-zlai pushed a commit that referenced this pull request Apr 29, 2025
## Summary

Adding verbs for modular join flow to driver

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
- [x] Not tested


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced three new job types: source-job, join-part-job, and
merge-job.
- Added a command-line option to specify the join part name for
join-part jobs.
- Enhanced command-line interface to execute new job types through
updated subcommands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
Co-authored-by: tchow-zlai <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

Adding verbs for modular join flow to driver

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
- [x] Not tested


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced three new job types: source-job, join-part-job, and
merge-job.
- Added a command-line option to specify the join part name for
join-part jobs.
- Enhanced command-line interface to execute new job types through
updated subcommands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
Co-authored-by: tchow-zlai <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

Adding verbs for modular join flow to driver

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
- [x] Not tested


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced three new job types: source-job, join-part-job, and
merge-job.
- Added a command-line option to specify the join part name for
join-part jobs.
- Enhanced command-line interface to execute new job types through
updated subcommands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
Co-authored-by: tchow-zlai <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
## Summary

Adding verbs for modular join flow to driver

## Cheour clientslist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
- [x] Not tested


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced three new job types: source-job, join-part-job, and
merge-job.
- Added a command-line option to specify the join part name for
join-part jobs.
- Enhanced command-line interface to execute new job types through
updated subcommands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
Co-authored-by: tchow-zlai <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
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.

4 participants