Skip to content

chore: add bazel build file for cloud_aws #343

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

Merged
merged 13 commits into from
Feb 12, 2025
Merged

chore: add bazel build file for cloud_aws #343

merged 13 commits into from
Feb 12, 2025

Conversation

tchow-zlai
Copy link
Collaborator

@tchow-zlai tchow-zlai commented Feb 7, 2025

Summary

  • Adding new BUILD for cloud_aws
  • Adding the above to the CI/CD

Checklist

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

Summary by CodeRabbit

  • New Features
    • Enhanced AWS integration with a new library for AWS functionality and a framework for job submission.
    • Introduced a new utility for managing job submissions, statuses, and terminations.
    • Added dedicated triggers for cloud modules to improve workflow automation.
  • Tests
    • Improved testing coverage with additional utilities for validating cloud functionalities and increased timeout settings for asynchronous operations.
  • Chores
    • Updated dependency configurations to incorporate essential AWS SDK components.

Copy link

coderabbitai bot commented Feb 7, 2025

Walkthrough

This pull request updates the GitHub Actions workflow to trigger on changes in the cloud_aws directory by adding a new path and job step. It introduces new Scala libraries, a test suite, and AWS SDK dependencies in the build files. Additionally, minor changes are made to the AWS API implementation and DynamoDB key-value store tests, and a new (stub) LivySubmitter class is introduced for handling job submission operations.

Changes

File(s) Change Summary
.github/workflows/.../test_scala_non_spark.yaml Added cloud_aws/** trigger and a new job step to run Bazel tests for the AWS module.
cloud_aws/BUILD.bazel, tools/build_rules/.../maven_repository.bzl Introduced new Scala libraries (cloud_aws_lib, test_lib) and a test suite, and appended AWS SDK dependencies.
cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala, cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala Added an SDK import and modified region setting in the AWS API; introduced a new LivySubmitter class with stub methods.
cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala Optimized import statements, created the DDBTestUtils object with test case classes and implicit JSON support, and reformatted validation logic.
cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala Refactored multiGet and multiPut methods for readability without logic changes.
.bazelrc Modified test command configuration for proper formatting.

Suggested reviewers

  • piyush-zlai
  • nikhil-zlai
  • kumar-zlai
  • chewy-zlai

Poem

In clouded code our tests now soar,
AWS paths open a new door,
Libraries and scripts finely align,
Livy submits dreams in design,
Together we script beneath bright skies 🚀.

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 ad255db and ec77c30.

📒 Files selected for processing (1)
  • cloud_aws/BUILD.bazel (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cloud_aws/BUILD.bazel
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: bazel_config_tests
  • GitHub Check: non_spark_tests

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

🧹 Nitpick comments (1)
cloud_aws/BUILD.bazel (1)

1-19: Group related dependencies together.

Consider organizing dependencies into logical groups with comments:

 deps = [
+        # AWS SDK dependencies
         maven_artifact("software.amazon.awssdk:dynamodb"),
         maven_artifact("software.amazon.awssdk:regions"),
         maven_artifact("software.amazon.awssdk:aws-core"),
         maven_artifact("software.amazon.awssdk:sdk-core"),
         maven_artifact("software.amazon.awssdk:utils"),
+        # Scala dependencies
         scala_artifact("org.scala-lang.modules:scala-collection-compat"),
+        # Utility dependencies
         maven_artifact("com.google.guava:guava"),
         maven_artifact("org.slf4j:slf4j-api"),
+        # Internal dependencies
         "//spark:lib",
         "//online:lib",
         "//api:lib",
         "//api:thrift_java",
     ],
📜 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 021af72 and fa6fde8.

📒 Files selected for processing (5)
  • .github/workflows/test_scala_non_spark.yaml (3 hunks)
  • cloud_aws/BUILD.bazel (1 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala (2 hunks)
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (2 hunks)
  • tools/build_rules/dependencies/maven_repository.bzl (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: non_spark_tests
  • GitHub Check: bazel_config_tests
  • GitHub Check: enforce_triggered_workflows
  • GitHub Check: scala_compile_fmt_fix
🔇 Additional comments (5)
cloud_aws/BUILD.bazel (2)

43-50: LGTM!

Test suite configuration is properly set up with necessary dependencies and JVM flags.


21-33: Verify DynamoDBLocal version compatibility.

Check if version 2.5.1 of DynamoDBLocal is compatible with AWS SDK 2.30.13.

✅ Verification successful

🌐 Web query:

What is the latest version of DynamoDBLocal that is compatible with AWS SDK 2.30.13?

💡 Result:

The latest compatible version of **DynamoDB Local** with AWS SDK for Java **v2.x** (including **v2.30.13**) is **v2.x**, specifically **version ≥2.0**. Here’s why:

### Compatibility Overview
1. **SDK v2 Support**:
   - Starting with **DynamoDB Local v1.16+** (released May 2021), AWS added experimental support for SDK v2 via server mode[5][10].
   - Full native support arrived in **DynamoDB Local v2.x** (released July 2023), which migrated to Jakarta EE namespaces and dropped legacy javax dependencies[1][8][9].

### Key Versions
| DynamoDB Local Version | AWS SDK Compatibility | Notes |
|------------------------|-----------------------|-------|
| **v1.x** (Legacy)      | Partial support via server mode | Requires manual configuration[5][10]. End-of-life: January 2025[10]. |
| **v2.x** (Current)     | Full native support   | Uses Jakarta EE namespaces and aligns with SDK v2 standards[8][9]. |

### Recommendations
- Use **DynamoDB Local v2.x** (latest: **v2.5+**) for seamless compatibility with AWS SDK for Java **v2.x**, including `CreateTableRequest` and other modern APIs[6][8].
- Avoid v1.x unless maintaining legacy codebases[10].

For example, in Maven projects:
```xml
<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>DynamoDBLocal</artifactId>
    <version>2.5+</version>
</dependency>
```

This ensures compatibility with AWS SDK v2 features like enhanced client operations[6][8].

Citations:

- 1: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocalHistory.html
- 2: https://aws.amazon.com/about-aws/whats-new/2021/05/amazon-dynamodb-local-now-supports-the-aws-sdk-for-java-2-x/
- 3: https://github.com/awslabs/amazon-dynamodb-local-samples/issues/14
- 4: https://www.serverless.com/plugins/serverless-dynamodb-local
- 5: https://github.com/aws/aws-sdk-java-v2/issues/982
- 6: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/dynamodb/model/CreateTableRequest.html
- 7: https://github.com/awslabs/amazon-dynamodb-local-samples/issues/18
- 8: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html
- 9: https://mvnrepository.com/artifact/com.amazonaws/DynamoDBLocal/2.0.0
- 10: https://repost.aws/ko/articles/AR3JPKxzfSQ--ZhOwXMKPZyg/amazon-dynamodb-local-1-x-end-of-support-is-january-2025?sc_ichannel=ha&sc_ilang=en&sc_isite=repost&sc_iplace=hp&sc_icontent=AR3JPKxzfSQ--ZhOwXMKPZyg&sc_ipos=4

DynamoDBLocal version compatibility verified.

• DynamoDBLocal v2.x (preferably v2.5+) is fully compatible with AWS SDK 2.30.13.
• Version 2.5.1 aligns with these compatibility requirements.

tools/build_rules/dependencies/maven_repository.bzl (1)

84-92: Verify AWS SDK version.

Check if 2.30.13 is the latest stable version of the AWS SDK.

.github/workflows/test_scala_non_spark.yaml (2)

15-15: LGTM!

Path triggers for cloud_aws are properly added to both push and pull_request events.

Also applies to: 30-30


115-120: LGTM!

Test step configuration matches other modules and uses correct target.

sys.env.get("AWS_DEFAULT_REGION").foreach { region =>
try {
builder = builder.region(Region.of(region))
builder // = builder.region(Region.of(region))
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Restore or remove commented code.

The region setting is commented out which could affect AWS operations. Either restore it or remove it completely.

-        builder // = builder.region(Region.of(region))
+        builder = builder.region(Region.of(region))
📝 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
builder // = builder.region(Region.of(region))
builder = builder.region(Region.of(region))

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

🧹 Nitpick comments (1)
cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala (1)

5-5: Add ScalaDoc for the class.

Add class-level documentation explaining the purpose and AWS Livy integration details.

+/**
+ * Submits Spark jobs to an AWS EMR cluster using Apache Livy REST API.
+ */
 class LivySubmitter extends JobSubmitter {
📜 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 ec99701 and f26eafc.

📒 Files selected for processing (1)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: non_spark_tests

Comment on lines +7 to +11
override def submit(jobType: JobType,
jobProperties: Map[String, String],
files: List[String],
args: String*): String = ???

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Implement required methods.

All three overridden methods are unimplemented. Please provide implementations for:

  • submit: Job submission via Livy REST API
  • status: Job status checking
  • kill: Job termination

Would you like me to help implement these methods with proper AWS Livy integration?

Also applies to: 12-13, 14-15

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

🧹 Nitpick comments (1)
cloud_aws/BUILD.bazel (1)

37-37: Avoid duplicate source patterns.

Same pattern src/test/**/*.scala used in both test_lib and tests.

-    srcs = glob(["src/test/**/*.scala"]),
+    srcs = glob(["src/test/scala/lib/**/*.scala"]),

Also applies to: 45-45

📜 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 f26eafc and afb2715.

📒 Files selected for processing (6)
  • .github/workflows/test_scala_non_spark.yaml (3 hunks)
  • cloud_aws/BUILD.bazel (1 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala (2 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala (1 hunks)
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (2 hunks)
  • tools/build_rules/dependencies/maven_repository.bzl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala
  • .github/workflows/test_scala_non_spark.yaml
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala
  • tools/build_rules/dependencies/maven_repository.bzl
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: non_spark_tests
  • GitHub Check: scala_compile_fmt_fix
🔇 Additional comments (2)
cloud_aws/BUILD.bazel (2)

33-33: Verify _CIRCE_DEPS and _SCALA_TEST_DEPS are defined.

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Search for deps definitions
rg "_CIRCE_DEPS|_SCALA_TEST_DEPS" --type bazel

Length of output: 306


Review Verification: Definitions Found

The search shows that while _CIRCE_DEPS and _SCALA_TEST_DEPS are referenced in multiple BUILD files, no explicit definitions were located in the BUILD files. However, these variables are likely defined in a separate .bzl file, as is common in Bazel setups. Please verify that they are indeed defined in the referenced .bzl file (or an equivalent centralized dependency configuration).


6-11: Pin AWS SDK versions for reproducible builds.

❌ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Check for version constraints in WORKSPACE file
rg "software\.amazon\.awssdk" -A 2

Length of output: 6481


AWS SDK versions are already pinned elsewhere.

  • cloud_aws/BUILD.bazel intentionally omits explicit versions.
  • Versions are set centrally in tools/build_rules/dependencies/maven_repository.bzl (e.g. "2.30.13").

Likely an incorrect or invalid review comment.

name = "tests",
srcs = glob(["src/test/**/*.scala"]),
# defined in prelude_bazel file
jvm_flags = _JVM_FLAGS_FOR_ACCESSING_BASE_JAVA_CLASSES,
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify _JVM_FLAGS_FOR_ACCESSING_BASE_JAVA_CLASSES is defined.


🏁 Script executed:

#!/bin/bash
# Search for JVM flags definition
rg "_JVM_FLAGS_FOR_ACCESSING_BASE_JAVA_CLASSES" --type bazel

Length of output: 459


Undefined _JVM_FLAGS_FOR_ACCESSING_BASE_JAVA_CLASSES identified:
The flag is referenced in multiple BUILD files (cloud_aws, cloud_gcp, flink, online, spark) but no definition is found in the repository. Please define it or update its references.

@tchow-zlai tchow-zlai force-pushed the tchow/aws-infra branch 2 times, most recently from 8ba0cd1 to 3415cca Compare February 12, 2025 02:12
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

♻️ Duplicate comments (1)
cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala (1)

7-15: ⚠️ Potential issue

Implement required methods.

All three overridden methods are unimplemented.

📜 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 8ba0cd1 and 3415cca.

📒 Files selected for processing (6)
  • .github/workflows/test_scala_non_spark.yaml (3 hunks)
  • cloud_aws/BUILD.bazel (1 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala (2 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/LivySubmitter.scala (1 hunks)
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (2 hunks)
  • tools/build_rules/dependencies/maven_repository.bzl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala
  • tools/build_rules/dependencies/maven_repository.bzl
  • .github/workflows/test_scala_non_spark.yaml
  • cloud_aws/BUILD.bazel
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: bazel_config_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: non_spark_tests
  • GitHub Check: enforce_triggered_workflows
  • GitHub Check: enforce_triggered_workflows


import ai.chronon.spark.{JobSubmitter, JobType}

class LivySubmitter extends JobSubmitter {
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add AWS Livy client initialization.

Initialize Livy client in constructor or companion object.

-class LivySubmitter extends JobSubmitter {
+class LivySubmitter(
+  livyEndpoint: String,
+  awsRegion: String
+) extends JobSubmitter {
+  private val livyClient = LivyClient.builder()
+    .endpoint(livyEndpoint)
+    .region(awsRegion)
+    .build()
📝 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
class LivySubmitter extends JobSubmitter {
class LivySubmitter(
livyEndpoint: String,
awsRegion: String
) extends JobSubmitter {
private val livyClient = LivyClient.builder()
.endpoint(livyEndpoint)
.region(awsRegion)
.build()
// Other methods and implementations...
}

tchow-zlai and others added 8 commits February 11, 2025 19:35
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>

Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
@tchow-zlai
Copy link
Collaborator Author

@kumar-zlai I think the flags are still not working for setting java build version - any thoughts here?

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

🧹 Nitpick comments (1)
cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (1)

121-121: Timeout increased from 1s to 1min.

The increased timeout is good for reliability, but consider extracting it as a constant.

+ private val DefaultTimeout = 1.minute
- Await.result(kvStore.multiPut(putReqs), 1.minute)
+ Await.result(kvStore.multiPut(putReqs), DefaultTimeout)

Also applies to: 127-127, 134-134, 154-154, 162-164, 184-184, 190-190

📜 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 d237756 and ad255db.

📒 Files selected for processing (4)
  • .bazelrc (1 hunks)
  • .github/workflows/test_scala_non_spark.yaml (3 hunks)
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala (2 hunks)
  • cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (7 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .bazelrc
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/test_scala_non_spark.yaml
  • cloud_aws/src/main/scala/ai/chronon/integrations/aws/AwsApiImpl.scala
🧰 Additional context used
🧠 Learnings (1)
cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (3)
Learnt from: piyush-zlai
PR: zipline-ai/chronon#33
File: cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala:175-175
Timestamp: 2024-11-12T09:38:33.532Z
Learning: Hardcoding future timestamps in tests within `DynamoDBKVStoreTest.scala` is acceptable when data is generated and queried within the same time range, ensuring the tests remain valid over time.
Learnt from: piyush-zlai
PR: zipline-ai/chronon#33
File: cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala:82-89
Timestamp: 2024-11-12T09:38:33.532Z
Learning: DynamoDB does not create duplicate tables when attempting to create a table that already exists, so checking for duplicates in tests is redundant.
Learnt from: piyush-zlai
PR: zipline-ai/chronon#33
File: cloud_aws/src/main/scala/ai/chronon/integrations/aws/DynamoDBKVStoreImpl.scala:245-260
Timestamp: 2024-11-12T09:38:33.532Z
Learning: In `DynamoDBKVStoreImpl.scala`, refactoring methods like `extractTimedValues` and `extractListValues` to eliminate code duplication is discouraged if it would make the code more convoluted.
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: bazel_config_tests
  • GitHub Check: non_spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: enforce_triggered_workflows
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (3)
cloud_aws/src/test/scala/ai/chronon/integrations/aws/DynamoDBKVStoreTest.scala (3)

3-22: LGTM! Import organization looks clean.

The imports are well-organized and grouped logically.


24-30: Good encapsulation of test utilities.

Moving case classes to DDBTestUtils object improves code organization.

Also applies to: 33-39


237-237: Fixed comparison in validateExpectedListResponse.

The comparison mSeq.length <= maxElements is correct for validating paginated results.

Comment on lines +78 to 81
override def afterAll(): Unit = {
// client.close()
// server.stop()
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Cleanup code is commented out.

The cleanup code in afterAll should be uncommented to properly release resources.

-  override def afterAll(): Unit = {
-//    client.close()
-//    server.stop()
-  }
+  override def afterAll(): Unit = {
+    client.close()
+    server.stop()
+  }
📝 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
override def afterAll(): Unit = {
// client.close()
// server.stop()
}
override def afterAll(): Unit = {
client.close()
server.stop()
}

Co-authored-by: Thomas Chow <[email protected]>
@tchow-zlai tchow-zlai merged commit e4196e2 into main Feb 12, 2025
6 of 11 checks passed
@tchow-zlai tchow-zlai deleted the tchow/aws-infra branch February 12, 2025 06:44
@coderabbitai coderabbitai bot mentioned this pull request Feb 13, 2025
4 tasks
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary

- Adding new BUILD for cloud_aws
- Adding the above to the CI/CD

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced AWS integration with a new library for AWS functionality and
a framework for job submission.
- Introduced a new utility for managing job submissions, statuses, and
terminations.
- Added dedicated triggers for cloud modules to improve workflow
automation.
- **Tests**
- Improved testing coverage with additional utilities for validating
cloud functionalities and increased timeout settings for asynchronous
operations.
- **Chores**
- Updated dependency configurations to incorporate essential AWS SDK
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

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

- Adding new BUILD for cloud_aws
- Adding the above to the CI/CD

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced AWS integration with a new library for AWS functionality and
a framework for job submission.
- Introduced a new utility for managing job submissions, statuses, and
terminations.
- Added dedicated triggers for cloud modules to improve workflow
automation.
- **Tests**
- Improved testing coverage with additional utilities for validating
cloud functionalities and increased timeout settings for asynchronous
operations.
- **Chores**
- Updated dependency configurations to incorporate essential AWS SDK
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

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

- Adding new BUILD for cloud_aws
- Adding the above to the CI/CD

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced AWS integration with a new library for AWS functionality and
a framework for job submission.
- Introduced a new utility for managing job submissions, statuses, and
terminations.
- Added dedicated triggers for cloud modules to improve workflow
automation.
- **Tests**
- Improved testing coverage with additional utilities for validating
cloud functionalities and increased timeout settings for asynchronous
operations.
- **Chores**
- Updated dependency configurations to incorporate essential AWS SDK
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

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

- Adding new BUILD for cloud_aws
- Adding the above to the CI/CD

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced AWS integration with a new library for AWS functionality and
a framework for job submission.
- Introduced a new utility for managing job submissions, statuses, and
terminations.
- Added dedicated triggers for cloud modules to improve workflow
automation.
- **Tests**
- Improved testing coverage with additional utilities for validating
cloud functionalities and increased timeout settings for asynchronous
operations.
- **Chores**
- Updated dependency configurations to incorporate essential AWS SDK
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to track
the status of stacks when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

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

- Adding new BUILD for cloud_aws
- Adding the above to the CI/CD

## Cheour clientslist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced AWS integration with a new library for AWS functionality and
a framework for job submission.
- Introduced a new utility for managing job submissions, statuses, and
terminations.
- Added dedicated triggers for cloud modules to improve workflow
automation.
- **Tests**
- Improved testing coverage with additional utilities for validating
cloud functionalities and increased timeout settings for asynchronous
operations.
- **Chores**
- Updated dependency configurations to incorporate essential AWS SDK
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- av pr metadata
This information is embedded by the av CLI when creating PRs to traour clients
the status of staour clientss when using Aviator. Please do not delete or edit
this section of the PR.
```
{"parent":"main","parentHead":"","trunk":"main"}
```
-->

---------

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.

3 participants