Skip to content

Enable more modules in our CI + fix missing triggers #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

piyush-zlai
Copy link
Contributor

@piyush-zlai piyush-zlai commented Jan 31, 2025

Summary

Noticed that some of our modules are missing in CI (e.g. gcp and aws). Also some of our path triggers were missing some locations so we might have prs slipping through with bugs.

Checklist

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

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to trigger on any push or pull request, expanding the scope of test runs.
    • Introduced a new workflow for testing non-Spark Scala modules.
    • Refactored BigTable KV Store test to use ScalaTest conventions and updated emulator setup.
    • Updated Dockerfile to install OpenJDK 17 instead of Amazon Corretto.

Copy link

coderabbitai bot commented Jan 31, 2025

Walkthrough

The pull request modifies the GitHub Actions workflows for Scala and Python testing by removing specific path filters from the push and pull_request triggers, allowing broader execution. Additionally, it introduces a new workflow for non-Spark Scala modules and updates the BigTableKVStoreTest.scala file to use a ScalaTest-compatible emulator setup, replacing the previous JUnit 4 approach.

Changes

File Change Summary
.github/workflows/test_scala_no_spark.yaml Renamed workflow; removed specific paths from triggers; deleted steps for hub, service, and orchestrator tests.
.github/workflows/test_python.yaml Removed path filters from triggers, allowing broader workflow execution.
.github/workflows/test_scala_spark.yaml Removed specific paths from triggers, allowing broader workflow execution.
.github/workflows/test_scala_no_spark_2.yaml Introduced new workflow for non-Spark Scala modules with concurrency settings and multiple test steps.
cloud_gcp/src/test/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreTest.scala Replaced BigtableEmulatorRule with Emulator; removed JUnit 4 annotation; updated emulator setup method.
.github/image/Dockerfile Replaced Amazon Corretto installation with OpenJDK; updated JAVA_HOME path; added libc6-compat and gcompat.

Possibly related PRs

Suggested Reviewers

  • nikhil-zlai
  • chewy-zlai
  • sean-zlai
  • varant-zlai
  • david-zlai

Poem

🚀 Workflows dancing, tests taking flight
Emulators humming with digital might
From GCP to AWS, code paths unfurl
Scala's magic in a continuous swirl
Testing, testing, one-two-three! 🧪

Warning

Review ran into problems

🔥 Problems

GitHub Actions: 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 44f4207 and 928d841.

📒 Files selected for processing (1)
  • .github/image/Dockerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/image/Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: mutation_spark_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: other_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: enforce_triggered_workflows
  • GitHub Check: build-and-push

🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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

@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 (1)
.github/workflows/test_scala_no_spark.yaml (1)

96-114: Fix trailing whitespace in test commands.

Remove trailing spaces in the following lines:

  • Line 109: sbt "++ 2.12.18 cloud_gcp/test"
  • Line 114: sbt "++ 2.12.18 cloud_aws/test"
-          sbt "++ 2.12.18 cloud_gcp/test"    
+          sbt "++ 2.12.18 cloud_gcp/test"
-          sbt "++ 2.12.18 cloud_aws/test"    
+          sbt "++ 2.12.18 cloud_aws/test"
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 109-109: trailing spaces

(trailing-spaces)


[error] 114-114: trailing spaces

(trailing-spaces)

📜 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 2658a80 and f538e59.

📒 Files selected for processing (2)
  • .github/workflows/test_scala_no_spark.yaml (3 hunks)
  • cloud_gcp/src/test/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreTest.scala (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_scala_no_spark.yaml

[error] 109-109: trailing spaces

(trailing-spaces)


[error] 114-114: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (4)
cloud_gcp/src/test/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreTest.scala (3)

33-46: LGTM! Clean migration to ScalaTest.

The shift from JUnit4 to ScalaTest's BeforeAndAfter trait with bundled emulator setup improves test isolation.


Line range hint 48-61: LGTM! Consistent emulator configuration.

The emulator port configuration is correctly applied to both data and admin settings.


Line range hint 67-350: LGTM! Comprehensive test coverage.

Test suite covers CRUD operations, error handling, and time series scenarios thoroughly.

.github/workflows/test_scala_no_spark.yaml (1)

12-17: LGTM! Path triggers correctly configured.

New paths for cloud modules are properly added to both push and PR triggers.

Also applies to: 28-33

Copy link

@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 (1)
.github/workflows/test_scala_no_spark.yaml (1)

79-87: Fix trailing spaces in sbt commands.

-          sbt "++ 2.12.18 cloud_gcp/test"    
+          sbt "++ 2.12.18 cloud_gcp/test"
-          sbt "++ 2.12.18 cloud_aws/test"    
+          sbt "++ 2.12.18 cloud_aws/test"
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 82-82: trailing spaces

(trailing-spaces)


[error] 87-87: trailing spaces

(trailing-spaces)

📜 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 f538e59 and 32aafdd.

📒 Files selected for processing (3)
  • .github/workflows/test_python.yaml (0 hunks)
  • .github/workflows/test_scala_no_spark.yaml (1 hunks)
  • .github/workflows/test_scala_spark.yaml (0 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/test_python.yaml
  • .github/workflows/test_scala_spark.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_scala_no_spark.yaml

[error] 82-82: trailing spaces

(trailing-spaces)


[error] 87-87: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: mutation_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: other_spark_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (2)
.github/workflows/test_scala_no_spark.yaml (2)

Line range hint 3-11: LGTM! Removing path filters ensures comprehensive CI coverage.

Removing specific path filters ensures PRs can't bypass checks.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 82-82: trailing spaces

(trailing-spaces)


[error] 87-87: trailing spaces

(trailing-spaces)


69-72: LGTM! Good addition of service_commons tests.

Memory settings match existing steps.

Copy link

@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 (3)
.github/workflows/test_scala_no_spark_2.yaml (3)

30-33: Consider using environment file for SBT_OPTS.

The SBT_OPTS setting is duplicated across test steps.

 - name: Set SBT resources
   run: |
     echo "SBT_OPTS=-Xmx8G -Xms2G" >> $GITHUB_ENV
+    echo "SCALA_VERSION=2.12.18" >> $GITHUB_ENV

Then use ${{ env.SBT_OPTS }} and ${{ env.SCALA_VERSION }} in test steps.


57-57: Fix trailing whitespace.

Remove trailing spaces from lines 57 and 62.

-          sbt "++ 2.12.18 cloud_gcp/test"    
+          sbt "++ 2.12.18 cloud_gcp/test"
-          sbt "++ 2.12.18 cloud_aws/test"    
+          sbt "++ 2.12.18 cloud_aws/test"

Also applies to: 62-62

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 57-57: trailing spaces

(trailing-spaces)


34-62: Consider parallelizing test execution.

Running tests sequentially might increase workflow duration.

Consider using matrix strategy to run tests in parallel:

strategy:
  matrix:
    module: [hub, service, service_commons, orchestration, cloud_gcp, cloud_aws]
steps:
  - name: Run ${{ matrix.module }} tests
    run: |
      sbt "++ 2.12.18 ${{ matrix.module }}/test"
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 57-57: trailing spaces

(trailing-spaces)


[error] 62-62: trailing spaces

(trailing-spaces)

📜 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 32aafdd and c6fe228.

📒 Files selected for processing (2)
  • .github/workflows/test_scala_no_spark.yaml (1 hunks)
  • .github/workflows/test_scala_no_spark_2.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test_scala_no_spark.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_scala_no_spark_2.yaml

[error] 57-57: trailing spaces

(trailing-spaces)


[error] 62-62: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: other_spark_tests
  • GitHub Check: mutation_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (2)
.github/workflows/test_scala_no_spark_2.yaml (2)

1-13: LGTM: Workflow configuration is well-structured.

Concurrency settings will help manage resources efficiently.


15-26: LGTM: Job configuration uses appropriate container setup.

Container credentials and workspace settings are properly configured.

Copy link

@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: 1

📜 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 c6fe228 and 65d3cd9.

📒 Files selected for processing (1)
  • .github/image/Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: table_utils_delta_format_spark_tests
  • GitHub Check: other_spark_tests
  • GitHub Check: mutation_spark_tests
  • GitHub Check: join_spark_tests
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: fetcher_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: no_spark_scala_tests
🔇 Additional comments (1)
.github/image/Dockerfile (1)

8-8: LGTM: OpenJDK installation looks good.


# java
ENV JAVA_HOME=/usr/lib/jvm/default-jvm
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix JAVA_HOME path for Alpine.

The path is incorrect for Alpine Linux.

-ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
+ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk

@piyush-zlai
Copy link
Contributor Author

Killing this as we're cutting over to bazel..

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.

1 participant