Skip to content

Conversation

@kumar-zlai
Copy link
Contributor

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

Summary

Added new github workflow to our CI which checks if the currently pinned json files are up to date. This check will fail if there are any changes to the artifacts and they are re-pinned in which case we would need to re-pin and push the changes.

Checklist

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

Summary by CodeRabbit

  • New Features

    • Introduced a new GitHub Actions workflow for testing Bazel artifact pinning.
    • Enhanced script functionality for building and uploading artifacts to GCP and AWS with improved command-line options.
  • Bug Fixes

    • Removed dependency on "org.mockito:mockito-core:5.12.0" from the Maven repository configuration, allowing for future reactivation if needed.
  • Tests

    • Introduced a new automated testing process that validates dependency integrity. This update streamlines our testing pipeline by intelligently canceling redundant runs, which enhances overall reliability and efficiency for a more robust experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2025

Walkthrough

A new GitHub Actions workflow file has been added to test Bazel artifact pinning. The workflow triggers on pushes and pull requests to the main branch when modifications occur in the tools directory, the workflow file itself, or specific Bazel configuration files. It establishes concurrency to cancel outdated runs, sets up the environment using a container on Ubuntu, and executes Bazel commands to check artifact pinning for Maven and Spark repositories.

Changes

File(s) Change Summary
.github/workflows/test_bazel_artifact_pinning.yaml Added a new GitHub Actions workflow triggered on pushes/PRs to main for testing Bazel artifact pinning. Configured concurrency, container setup, repo checkout, secret setup, and Bazel test execution.
distribution/build_and_upload_artifacts.sh Modified to enhance functionality with new print_usage() and upload_to_aws() functions. Improved command-line argument handling and conditional execution for GCP and AWS builds.
tools/build_rules/dependencies/maven_repository.bzl Commented out the dependency on "org.mockito:mockito-core:5.12.0" in the maven_repository function, allowing for potential reactivation in the future.

Possibly related PRs

Suggested reviewers

  • piyush-zlai
  • nikhil-zlai

Poem

In code we trust, with workflows so grand,
Bazel pinnings checked, all neatly planned.
Triggers fired and secrets set,
Our tests run smooth — a safe reset!
Here's to progress with every command!

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.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 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.

chewy-zlai and others added 2 commits February 21, 2025 12:31
## Summary
Adds AWS build and push commands to the distribution script.

## 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**
  - Introduced an automated quickstart process for GCP deployments.
- Enhanced the build and upload tool with flexible command-line options,
supporting artifact creation for both AWS and GCP environments.
  - Added a new script for running the Zipline quickstart on GCP.

- **Refactor**
  - Updated the AWS quickstart process to ensure consistent execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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)
distribution/build_and_upload_artifacts.sh (1)

18-43: Arg parsing works.
Simple case structure; consider quoting $1 in the unknown option message (e.g., "Unknown option: '$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 8704d14 and 67b9dd4.

📒 Files selected for processing (2)
  • distribution/build_and_upload_artifacts.sh (3 hunks)
  • tools/build_rules/dependencies/maven_repository.bzl (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tools/build_rules/dependencies/maven_repository.bzl
🔇 Additional comments (8)
distribution/build_and_upload_artifacts.sh (8)

3-10: Usage function added.
print_usage cleanly outlines available options.


12-16: No-argument check is clear.
Prints usage and exits when no args are given.


121-137: AWS build block is solid.
Conditionally builds AWS artifacts and verifies file existence.


138-156: GCP build block looks good.
Conditionally builds GCP artifacts with proper error checks.


161-161: GCP customer IDs defined.
Array initialization is concise and clear.


190-190: AWS customer IDs defined.
Array initialized correctly.


192-214: upload_to_aws function is clear.
Mirrors the GCP uploader; flows logically and concisely.


217-231: Conditional uploader invocation OK.
Chooses between batch and single-customer modes as intended.

@kumar-zlai
Copy link
Contributor Author

This is redundant as our bazel config tests should also validate pinned artifacts other wise sync would fail

@kumar-zlai kumar-zlai closed this Feb 21, 2025
@coderabbitai coderabbitai bot mentioned this pull request Mar 11, 2025
4 tasks
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