Skip to content

Conversation

@kumar-zlai
Copy link
Contributor

@kumar-zlai kumar-zlai commented Feb 11, 2025

Summary

Modified our github workflow to run scalaFmt checks using bazel instead of sbt and deleted the build.sbt file as it's no longer needed now.

Checklist

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

Summary by CodeRabbit

  • Chores

    • Streamlined build and continuous integration setups, transitioning away from legacy tooling.
    • Modernized internal infrastructure for improved consistency and stability.
  • Refactor / Style

    • Enhanced code readability with comprehensive cosmetic and documentation updates.
    • Unified formatting practices across the codebase to support future maintainability.
    • Adjusted formatting of comments and code blocks for improved clarity without altering functionality.
  • Tests

    • Reformatted test suites for clarity and consistency while preserving all functional behaviors.
    • Improved formatting in various test cases and methods for better readability without altering functionality.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2025

Walkthrough

This pull request transitions Scala formatting checks and build configurations from SBT to Bazel. CI workflows have been updated to remove SBT commands and integrate Bazel cache credentials along with Bazel query commands for formatting tests. Build files now remove legacy Scala repository configurations and adopt a new scalafmt integration. Throughout the codebase, various Scala files have been reformatted with streamlined case statements and comment adjustments without affecting functionality.

Changes

Files Change Summary
.github/workflows/test_scala_fmt.yaml, test_scala_non_spark.yaml, test_scala_spark.yaml Removed SBT commands, added Bazel cache credentials & Bazel query for format tests; removed triggers for build.sbt.
.scalafmt.conf Added new setting docstrings.wrap = false; retained maxColumn = 120.
WORKSPACE, build.sbt, various BUILD.bazel files (aggregator, api, cloud_gcp, flink, hub, online, orchestration, spark) Removed deprecated Scala repo configs; added scalafmt_default_config() and scalafmt_repositories(); added format = True attribute; deleted build.sbt.
Scala source files (aggregator, api, cloud_gcp, flink, hub, online, spark, etc.) Code and comment formatting improvements (consolidated case statements, removed extra line breaks); logic remains unchanged.
tools/build_rules/*.bzl, prelude_bazel, scala_junit_test_suite.bzl Replaced direct scala_library import with make_scala_library(ext_scalafmt); adjusted load statements.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant G as GitHub Actions
    participant C as CI Workflow
    participant B as Bazel
    U->>G: Push commit
    G->>C: Trigger workflow
    C->>C: Setup Bazel cache credentials
    C->>B: Execute Bazel query for Scala files
    B-->>C: Return format check results
    C-->>G: Report test outcome
Loading

Possibly related PRs

Suggested reviewers

  • piyush-zlai

Poem

In code’s deep night, a shift is found,
From old to new with minimal sound.
Bazel now reigns where SBT once stood,
Cleaner checks in the fire of good.
A patch of change with style unbound 🎉
Lines align—our work is profound.

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.


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

45-50: Add newline at end of file.

Fix YAML formatting.

 --google_credentials=bazel-cache-key.json \
-{}.format-test
+{}.format-test
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: no new line character at the end of file

(new-line-at-end-of-file)

📜 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 e569c61 and 4c8c34c.

📒 Files selected for processing (131)
  • .github/workflows/test_scala_fmt.yaml (1 hunks)
  • .github/workflows/test_scala_non_spark.yaml (0 hunks)
  • .github/workflows/test_scala_spark.yaml (0 hunks)
  • .scalafmt.conf (1 hunks)
  • WORKSPACE (1 hunks)
  • aggregator/BUILD.bazel (2 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/base/SimpleAggregators.scala (1 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/row/RowAggregator.scala (1 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/row/StatsGenerator.scala (4 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/Resolution.scala (1 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/SawtoothMutationAggregator.scala (4 hunks)
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/TwoStackLiteAggregator.scala (2 hunks)
  • aggregator/src/test/scala/ai/chronon/aggregator/test/ApproxHistogramTest.scala (1 hunks)
  • aggregator/src/test/scala/ai/chronon/aggregator/test/RowAggregatorTest.scala (1 hunks)
  • aggregator/src/test/scala/ai/chronon/aggregator/test/TwoStackLiteAggregatorTest.scala (1 hunks)
  • api/BUILD.bazel (3 hunks)
  • api/src/main/scala/ai/chronon/api/Builders.scala (1 hunks)
  • api/src/main/scala/ai/chronon/api/DataPointer.scala (1 hunks)
  • api/src/main/scala/ai/chronon/api/DataType.scala (1 hunks)
  • api/src/main/scala/ai/chronon/api/Extensions.scala (10 hunks)
  • api/src/main/scala/ai/chronon/api/ParametricMacro.scala (1 hunks)
  • api/src/main/scala/ai/chronon/api/QueryUtils.scala (1 hunks)
  • api/src/main/scala/ai/chronon/api/Row.scala (3 hunks)
  • api/src/test/scala/ai/chronon/api/test/TileSeriesSerializationTest.scala (2 hunks)
  • build.sbt (0 hunks)
  • cloud_gcp/BUILD.bazel (2 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreImpl.scala (5 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GCSFormat.scala (2 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala (1 hunks)
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/Spark2BigTableLoader.scala (1 hunks)
  • cloud_gcp/src/test/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreTest.scala (5 hunks)
  • flink/BUILD.bazel (2 hunks)
  • flink/src/main/scala/ai/chronon/flink/AsyncKVStoreWriter.scala (2 hunks)
  • flink/src/main/scala/ai/chronon/flink/AvroCodecFn.scala (3 hunks)
  • flink/src/main/scala/ai/chronon/flink/FlinkJob.scala (4 hunks)
  • flink/src/main/scala/ai/chronon/flink/FlinkKafkaBeaconEventDriver.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/FlinkSource.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/MetricsSink.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/RichMetricsOperators.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/SchemaProvider.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/SchemaRegistrySchemaProvider.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/SparkExpressionEvalFn.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/types/FlinkTypes.scala (4 hunks)
  • flink/src/main/scala/ai/chronon/flink/window/FlinkRowAggregators.scala (2 hunks)
  • flink/src/main/scala/ai/chronon/flink/window/KeySelectorBuilder.scala (1 hunks)
  • flink/src/main/scala/ai/chronon/flink/window/Trigger.scala (6 hunks)
  • flink/src/main/scala/org/apache/spark/sql/avro/AvroDeserializationSupport.scala (2 hunks)
  • flink/src/test/scala/ai/chronon/flink/test/SchemaRegistrySchemaProviderSpec.scala (1 hunks)
  • hub/BUILD.bazel (2 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/ConfHandler.scala (3 hunks)
  • hub/src/main/scala/ai/chronon/hub/store/MonitoringModelStore.scala (1 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/ConfHandlerTest.scala (8 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/DriftHandlerTest.scala (9 hunks)
  • online/BUILD.bazel (2 hunks)
  • online/src/main/scala/ai/chronon/online/Api.scala (2 hunks)
  • online/src/main/scala/ai/chronon/online/AvroCodec.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/AvroConversions.scala (2 hunks)
  • online/src/main/scala/ai/chronon/online/DataStreamBuilder.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/Extensions.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/ExternalSourceRegistry.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/Fetcher.scala (10 hunks)
  • online/src/main/scala/ai/chronon/online/FetcherBase.scala (10 hunks)
  • online/src/main/scala/ai/chronon/online/FetcherCache.scala (6 hunks)
  • online/src/main/scala/ai/chronon/online/JoinCodec.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/LRUCache.scala (2 hunks)
  • online/src/main/scala/ai/chronon/online/MetadataDirWalker.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/MetadataStore.scala (5 hunks)
  • online/src/main/scala/ai/chronon/online/OnlineDerivationUtil.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/SparkConversions.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/TileCodec.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/stats/DriftStore.scala (2 hunks)
  • online/src/main/scala/ai/chronon/online/stats/TileDriftCalculator.scala (1 hunks)
  • online/src/test/scala/ai/chronon/online/test/TaggedFilterSuite.scala (1 hunks)
  • online/src/test/scala/ai/chronon/online/test/stats/AssignIntervalsTest.scala (1 hunks)
  • online/src/test/scala/ai/chronon/online/test/stats/PivotUtilsTest.scala (12 hunks)
  • orchestration/BUILD.bazel (2 hunks)
  • orchestration/src/main/scala/ai/chronon/orchestration/RepoIndex.scala (8 hunks)
  • orchestration/src/main/scala/ai/chronon/orchestration/RepoTypes.scala (4 hunks)
  • orchestration/src/main/scala/ai/chronon/orchestration/utils/RelevantLeftForJoinPart.scala (1 hunks)
  • orchestration/src/main/scala/ai/chronon/orchestration/utils/SequenceMap.scala (1 hunks)
  • orchestration/src/test/scala/ai/chronon/orchestration/test/RepoIndexSpec.scala (1 hunks)
  • spark/BUILD.bazel (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/Analyzer.scala (6 hunks)
  • spark/src/main/scala/ai/chronon/spark/BootstrapInfo.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/Driver.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/FastHashing.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/GroupBy.scala (6 hunks)
  • spark/src/main/scala/ai/chronon/spark/GroupByUpload.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/Join.scala (9 hunks)
  • spark/src/main/scala/ai/chronon/spark/JoinBase.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/JoinUtils.scala (11 hunks)
  • spark/src/main/scala/ai/chronon/spark/KvRdd.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/LabelJoin.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/LogFlattenerJob.scala (3 hunks)
  • spark/src/main/scala/ai/chronon/spark/SparkSessionBuilder.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/StagingQuery.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/format/CreationUtils.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/format/DefaultFormatProvider.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/format/Format.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/format/FormatProvider.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/scripts/ObservabilityDemo.scala (2 hunks)
  • spark/src/main/scala/ai/chronon/spark/stats/CompareJob.scala (4 hunks)
  • spark/src/main/scala/ai/chronon/spark/stats/drift/Expressions.scala (3 hunks)
  • spark/src/main/scala/ai/chronon/spark/streaming/JoinSourceRunner.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/utils/InMemoryKvStore.scala (3 hunks)
  • spark/src/main/scala/ai/chronon/spark/utils/InMemoryStream.scala (1 hunks)
  • spark/src/main/scala/ai/chronon/spark/utils/PartitionRunner.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/ChainingFetcherTest.scala (2 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/DataFrameGen.scala (2 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/FetcherTest.scala (7 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/GroupByTest.scala (2 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/GroupByUploadTest.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/JoinTest.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/JoinUtilsTest.scala (2 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/MutationsTest.scala (4 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/OnlineUtils.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/SchemaEvolutionTest.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/SnapshotAggregator.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/StatsComputeTest.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/TableTestUtils.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/TaggedFilterSuite.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/TestUtils.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala (1 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/stats/drift/DriftTest.scala (3 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/udafs/HistogramTest.scala (3 hunks)
  • spark/src/test/scala/ai/chronon/spark/test/udafs/UDAFSQLUsageTest.scala (3 hunks)
  • tools/build_rules/jvm_binary.bzl (1 hunks)
  • tools/build_rules/prelude_bazel (1 hunks)
  • tools/build_rules/scala_junit_test_suite.bzl (1 hunks)
💤 Files with no reviewable changes (3)
  • .github/workflows/test_scala_non_spark.yaml
  • .github/workflows/test_scala_spark.yaml
  • build.sbt
✅ Files skipped from review due to trivial changes (100)
  • flink/src/main/scala/ai/chronon/flink/SchemaProvider.scala
  • online/src/test/scala/ai/chronon/online/test/stats/AssignIntervalsTest.scala
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/Spark2BigTableLoader.scala
  • flink/src/main/scala/ai/chronon/flink/window/KeySelectorBuilder.scala
  • spark/src/main/scala/ai/chronon/spark/format/DefaultFormatProvider.scala
  • hub/src/test/scala/ai/chronon/hub/handlers/ConfHandlerTest.scala
  • spark/src/main/scala/ai/chronon/spark/format/FormatProvider.scala
  • spark/src/test/scala/ai/chronon/spark/test/TaggedFilterSuite.scala
  • api/src/main/scala/ai/chronon/api/ParametricMacro.scala
  • orchestration/src/main/scala/ai/chronon/orchestration/utils/SequenceMap.scala
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GCSFormat.scala
  • spark/src/main/scala/ai/chronon/spark/SparkSessionBuilder.scala
  • online/src/main/scala/ai/chronon/online/stats/TileDriftCalculator.scala
  • flink/src/main/scala/ai/chronon/flink/RichMetricsOperators.scala
  • flink/src/main/scala/ai/chronon/flink/AvroCodecFn.scala
  • online/src/main/scala/ai/chronon/online/MetadataDirWalker.scala
  • spark/src/main/scala/ai/chronon/spark/StagingQuery.scala
  • online/src/main/scala/ai/chronon/online/DataStreamBuilder.scala
  • spark/src/test/scala/ai/chronon/spark/test/SnapshotAggregator.scala
  • spark/src/main/scala/ai/chronon/spark/Extensions.scala
  • flink/src/main/scala/ai/chronon/flink/MetricsSink.scala
  • flink/src/main/scala/ai/chronon/flink/FlinkSource.scala
  • cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/GcpFormatProvider.scala
  • aggregator/src/test/scala/ai/chronon/aggregator/test/ApproxHistogramTest.scala
  • hub/src/main/scala/ai/chronon/hub/handlers/ConfHandler.scala
  • spark/src/main/scala/ai/chronon/spark/stats/drift/Expressions.scala
  • flink/src/main/scala/ai/chronon/flink/AsyncKVStoreWriter.scala
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/Resolution.scala
  • flink/src/main/scala/ai/chronon/flink/FlinkJob.scala
  • orchestration/BUILD.bazel
  • flink/src/main/scala/ai/chronon/flink/FlinkKafkaBeaconEventDriver.scala
  • online/src/test/scala/ai/chronon/online/test/TaggedFilterSuite.scala
  • flink/src/main/scala/ai/chronon/flink/SparkExpressionEvalFn.scala
  • spark/src/test/scala/ai/chronon/spark/test/DataFrameGen.scala
  • orchestration/src/main/scala/ai/chronon/orchestration/RepoTypes.scala
  • aggregator/src/test/scala/ai/chronon/aggregator/test/TwoStackLiteAggregatorTest.scala
  • spark/src/main/scala/ai/chronon/spark/format/Format.scala
  • spark/src/test/scala/ai/chronon/spark/test/JoinUtilsTest.scala
  • aggregator/src/test/scala/ai/chronon/aggregator/test/RowAggregatorTest.scala
  • api/src/main/scala/ai/chronon/api/QueryUtils.scala
  • api/src/test/scala/ai/chronon/api/test/TileSeriesSerializationTest.scala
  • online/src/main/scala/ai/chronon/online/Extensions.scala
  • spark/src/main/scala/ai/chronon/spark/utils/PartitionRunner.scala
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/TwoStackLiteAggregator.scala
  • api/src/main/scala/ai/chronon/api/Row.scala
  • spark/src/main/scala/ai/chronon/spark/streaming/JoinSourceRunner.scala
  • spark/src/main/scala/ai/chronon/spark/Analyzer.scala
  • spark/src/test/scala/ai/chronon/spark/test/TestUtils.scala
  • aggregator/BUILD.bazel
  • spark/src/test/scala/ai/chronon/spark/test/TableTestUtils.scala
  • online/src/main/scala/ai/chronon/online/ExternalSourceRegistry.scala
  • spark/src/main/scala/ai/chronon/spark/BootstrapInfo.scala
  • online/src/main/scala/ai/chronon/online/MetadataStore.scala
  • spark/src/test/scala/ai/chronon/spark/test/bootstrap/DerivationTest.scala
  • online/BUILD.bazel
  • flink/src/main/scala/org/apache/spark/sql/avro/AvroDeserializationSupport.scala
  • flink/src/main/scala/ai/chronon/flink/window/FlinkRowAggregators.scala
  • spark/src/main/scala/ai/chronon/spark/utils/InMemoryStream.scala
  • flink/BUILD.bazel
  • online/src/test/scala/ai/chronon/online/test/stats/PivotUtilsTest.scala
  • spark/src/test/scala/ai/chronon/spark/test/JoinTest.scala
  • spark/BUILD.bazel
  • orchestration/src/main/scala/ai/chronon/orchestration/utils/RelevantLeftForJoinPart.scala
  • flink/src/test/scala/ai/chronon/flink/test/SchemaRegistrySchemaProviderSpec.scala
  • flink/src/main/scala/ai/chronon/flink/window/Trigger.scala
  • spark/src/main/scala/ai/chronon/spark/LogFlattenerJob.scala
  • aggregator/src/main/scala/ai/chronon/aggregator/windowing/SawtoothMutationAggregator.scala
  • spark/src/test/scala/ai/chronon/spark/test/GroupByUploadTest.scala
  • spark/src/main/scala/ai/chronon/spark/stats/CompareJob.scala
  • spark/src/main/scala/ai/chronon/spark/KvRdd.scala
  • orchestration/src/test/scala/ai/chronon/orchestration/test/RepoIndexSpec.scala
  • hub/BUILD.bazel
  • spark/src/main/scala/ai/chronon/spark/GroupBy.scala
  • online/src/main/scala/ai/chronon/online/AvroConversions.scala
  • orchestration/src/main/scala/ai/chronon/orchestration/RepoIndex.scala
  • spark/src/main/scala/ai/chronon/spark/GroupByUpload.scala
  • spark/src/main/scala/ai/chronon/spark/TableUtils.scala
  • spark/src/main/scala/ai/chronon/spark/JoinUtils.scala
  • spark/src/test/scala/ai/chronon/spark/test/ChainingFetcherTest.scala
  • online/src/main/scala/ai/chronon/online/FetcherCache.scala
  • aggregator/src/main/scala/ai/chronon/aggregator/row/StatsGenerator.scala
  • cloud_gcp/src/test/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreTest.scala
  • online/src/main/scala/ai/chronon/online/stats/DriftStore.scala
  • online/src/main/scala/ai/chronon/online/TileCodec.scala
  • .scalafmt.conf
  • online/src/main/scala/ai/chronon/online/FetcherBase.scala
  • spark/src/test/scala/ai/chronon/spark/test/MutationsTest.scala
  • hub/src/main/scala/ai/chronon/hub/store/MonitoringModelStore.scala
  • api/src/main/scala/ai/chronon/api/DataPointer.scala
  • online/src/main/scala/ai/chronon/online/Fetcher.scala
  • cloud_gcp/BUILD.bazel
  • spark/src/main/scala/ai/chronon/spark/utils/InMemoryKvStore.scala
  • online/src/main/scala/ai/chronon/online/OnlineDerivationUtil.scala
  • online/src/main/scala/ai/chronon/online/SparkConversions.scala
  • spark/src/main/scala/ai/chronon/spark/JoinBase.scala
  • api/src/main/scala/ai/chronon/api/Extensions.scala
  • spark/src/main/scala/ai/chronon/spark/scripts/ObservabilityDemo.scala
  • aggregator/src/main/scala/ai/chronon/aggregator/base/SimpleAggregators.scala
  • spark/src/main/scala/ai/chronon/spark/Join.scala
  • spark/src/test/scala/ai/chronon/spark/test/FetcherTest.scala
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_scala_fmt.yaml

[error] 50-50: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: spark_tests
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: non_spark_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (40)
hub/src/test/scala/ai/chronon/hub/handlers/DriftHandlerTest.scala (4)

39-50: LGTM!

Clean formatting in helper method.


52-62: LGTM!

Clean formatting in helper method.


74-83: LGTM!

Consistent formatting of when method calls.

Also applies to: 101-110, 136-143, 173-182, 198-207


213-214: LGTM!

Added newline at EOF.

tools/build_rules/scala_junit_test_suite.bzl (1)

1-1: LGTM! Removed unused imports.

Keeping only the required scala_test import improves code clarity.

tools/build_rules/jvm_binary.bzl (1)

2-6: LGTM! Updated imports for Bazel scalafmt integration.

The changes correctly integrate Bazel's scalafmt capabilities.

spark/src/main/scala/ai/chronon/spark/format/CreationUtils.scala (1)

53-54: LGTM! Improved code formatting.

The case statement formatting is now more concise.

online/src/main/scala/ai/chronon/online/LRUCache.scala (1)

8-8: LGTM! Improved documentation formatting.

Removed unnecessary leading whitespace from documentation comments.

Also applies to: 16-16, 41-41

api/BUILD.bazel (3)

23-26: LGTM! Clean glob pattern structure.


43-72: Good separation of test library and test suite.

Clean separation improves modularity and reusability.


27-27: Verify scalafmt integration.

Ensure scalafmt configuration is properly set up in the root directory.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check for .scalafmt.conf
find . -maxdepth 1 -name ".scalafmt.conf"

Length of output: 58

Scalafmt configuration verified: The .scalafmt.conf is present at the repository root.

flink/src/main/scala/ai/chronon/flink/SchemaRegistrySchemaProvider.scala (1)

12-12: LGTM! Documentation formatting improvement.

tools/build_rules/prelude_bazel (1)

12-14: Verify scalafmt integration dependencies.

Ensure all required scalafmt dependencies are properly loaded.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check for scalafmt rules in workspace
rg "scalafmt" WORKSPACE

Length of output: 212

Scalafmt dependencies are correctly loaded.

  • WORKSPACE confirms scalafmt repositories are set up.
WORKSPACE (2)

93-101: Consider keeping scalatest configuration.

Removing scalatest configuration might affect test execution.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check for scalatest usage
rg "scalatest" -t scala

Length of output: 15324

Scalatest configuration is in use.
The grep search confirms extensive usage of scalatest in test files, indicating that retaining the configuration in WORKSPACE is essential.


103-106: Verify scalafmt configuration.

Check if default config matches project requirements.

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Check scalafmt version and config
cat .scalafmt.conf 2>/dev/null || echo "No .scalafmt.conf found"

Length of output: 212

Scalafmt configuration verified.

  • .scalafmt.conf exists with version 2.5.0 and expected formatting rules.
online/src/main/scala/ai/chronon/online/JoinCodec.scala (1)

52-54: LGTM!

The simplified mapping syntax improves readability while maintaining the same functionality.

spark/src/main/scala/ai/chronon/spark/FastHashing.scala (1)

55-98: LGTM!

The reformatted case statements enhance code readability without changing behavior.

flink/src/main/scala/ai/chronon/flink/types/FlinkTypes.scala (1)

48-49: LGTM!

The change from List[Any] to Seq[Any] is a good fix for the runtime error with null lists.

spark/src/test/scala/ai/chronon/spark/test/udafs/UDAFSQLUsageTest.scala (1)

78-85: LGTM!

The SQL query formatting changes improve readability.

Also applies to: 97-104, 116-123

spark/src/test/scala/ai/chronon/spark/test/udafs/HistogramTest.scala (1)

78-85: SQL query formatting improvements.

The multi-line formatting enhances readability.

Also applies to: 97-104, 116-123

online/src/main/scala/ai/chronon/online/AvroCodec.scala (1)

117-117: Comment formatting improvement.

Removed unnecessary blank line in comment block.

aggregator/src/main/scala/ai/chronon/aggregator/row/RowAggregator.scala (1)

39-63: Improved columnAggregators initialization formatting.

Better indentation and line breaks enhance readability.

spark/src/test/scala/ai/chronon/spark/test/StatsComputeTest.scala (1)

130-132: Improved comment formatting.

Removed extra space in comment block.

api/src/main/scala/ai/chronon/api/DataType.scala (1)

110-111: LGTM!

The case statement formatting change improves readability.

spark/src/test/scala/ai/chronon/spark/test/OnlineUtils.scala (1)

98-106: LGTM!

Multi-line formatting improves readability of the complex expression.

spark/src/test/scala/ai/chronon/spark/test/stats/drift/DriftTest.scala (1)

112-115: LGTM!

Consistent case statement formatting across multiple methods.

Also applies to: 133-140, 214-216, 222-224, 228-230

api/src/main/scala/ai/chronon/api/Builders.scala (1)

35-36: LGTM!

Simplified case statement mapping improves readability.

online/src/main/scala/ai/chronon/online/Api.scala (2)

106-109: LGTM! Clean error handling.

The simplified error handling maintains the same functionality while improving readability.


136-166: LGTM! Documentation formatting.

The documentation formatting changes improve readability without altering content.

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

136-147: LGTM! Cleaner iteration syntax.

The pattern matching syntax improves readability while maintaining the same functionality.


269-270: LGTM! Simplified foldLeft operation.

The cleaner syntax enhances code readability.

spark/src/test/scala/ai/chronon/spark/test/SchemaEvolutionTest.scala (1)

369-383: LGTM! Improved filter expressions.

The simplified pattern matching enhances readability while maintaining test logic.

cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigTableKVStoreImpl.scala (4)

175-179: LGTM! Streamlined error handling in multiGet.

The simplified error handling improves readability while maintaining error tracking.


260-265: LGTM! Streamlined error handling in list.

The simplified error handling maintains functionality with cleaner syntax.


312-316: LGTM! Streamlined error handling in multiPut.

The simplified error handling enhances code readability.


426-431: LGTM! Documentation formatting.

The documentation formatting changes improve readability.

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

772-780: LGTM! Improved case statement formatting.

.github/workflows/test_scala_fmt.yaml (1)

41-44: LGTM! Proper setup of Bazel cache credentials.

spark/src/test/scala/ai/chronon/spark/test/GroupByTest.scala (2)

170-170: LGTM!

The SQL query string formatting change improves readability.


261-262: LGTM!

The pattern matching syntax change in tuple destructuring enhances clarity.

@kumar-zlai kumar-zlai merged commit 9c9bee2 into main Feb 11, 2025
8 checks passed
@kumar-zlai kumar-zlai deleted the bazel_scala_fmt branch February 11, 2025 19:55
kumar-zlai added a commit that referenced this pull request Apr 25, 2025
## Summary
Modified our github workflow to run scalaFmt checks using bazel instead
of sbt and deleted the build.sbt file as it's no longer needed now.

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



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

- **Chores**
- Streamlined build and continuous integration setups, transitioning
away from legacy tooling.
- Modernized internal infrastructure for improved consistency and
stability.

- **Refactor / Style**
- Enhanced code readability with comprehensive cosmetic and
documentation updates.
- Unified formatting practices across the codebase to support future
maintainability.
- Adjusted formatting of comments and code blocks for improved clarity
without altering functionality.

- **Tests**
- Reformatted test suites for clarity and consistency while preserving
all functional behaviors.
- Improved formatting in various test cases and methods for better
readability without altering functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kumar-zlai added a commit that referenced this pull request Apr 29, 2025
## Summary
Modified our github workflow to run scalaFmt checks using bazel instead
of sbt and deleted the build.sbt file as it's no longer needed now.

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



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

- **Chores**
- Streamlined build and continuous integration setups, transitioning
away from legacy tooling.
- Modernized internal infrastructure for improved consistency and
stability.

- **Refactor / Style**
- Enhanced code readability with comprehensive cosmetic and
documentation updates.
- Unified formatting practices across the codebase to support future
maintainability.
- Adjusted formatting of comments and code blocks for improved clarity
without altering functionality.

- **Tests**
- Reformatted test suites for clarity and consistency while preserving
all functional behaviors.
- Improved formatting in various test cases and methods for better
readability without altering functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary
Modified our github workflow to run scalaFmt checks using bazel instead
of sbt and deleted the build.sbt file as it's no longer needed now.

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



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

- **Chores**
- Streamlined build and continuous integration setups, transitioning
away from legacy tooling.
- Modernized internal infrastructure for improved consistency and
stability.

- **Refactor / Style**
- Enhanced code readability with comprehensive cosmetic and
documentation updates.
- Unified formatting practices across the codebase to support future
maintainability.
- Adjusted formatting of comments and code blocks for improved clarity
without altering functionality.

- **Tests**
- Reformatted test suites for clarity and consistency while preserving
all functional behaviors.
- Improved formatting in various test cases and methods for better
readability without altering functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary
Modified our github workflow to run scalaFmt checks using bazel instead
of sbt and deleted the build.sbt file as it's no longer needed now.

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



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

- **Chores**
- Streamlined build and continuous integration setups, transitioning
away from legacy tooling.
- Modernized internal infrastructure for improved consistency and
stability.

- **Refactor / Style**
- Enhanced code readability with comprehensive cosmetic and
documentation updates.
- Unified formatting practices across the codebase to support future
maintainability.
- Adjusted formatting of comments and code blocks for improved clarity
without altering functionality.

- **Tests**
- Reformatted test suites for clarity and consistency while preserving
all functional behaviors.
- Improved formatting in various test cases and methods for better
readability without altering functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
## Summary
Modified our github workflow to run scalaFmt cheour clientss using bazel instead
of sbt and deleted the build.sbt file as it's no longer needed now.

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



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

- **Chores**
- Streamlined build and continuous integration setups, transitioning
away from legacy tooling.
- Modernized internal infrastructure for improved consistency and
stability.

- **Refactor / Style**
- Enhanced code readability with comprehensive cosmetic and
documentation updates.
- Unified formatting practices across the codebase to support future
maintainability.
- Adjusted formatting of comments and code bloour clientss for improved clarity
without altering functionality.

- **Tests**
- Reformatted test suites for clarity and consistency while preserving
all functional behaviors.
- Improved formatting in various test cases and methods for better
readability without altering functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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