Skip to content

Conversation

@david-zlai
Copy link
Contributor

@david-zlai david-zlai commented Mar 5, 2025

Summary

Checklist

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

Summary by CodeRabbit

  • Refactor
    • Cloud settings are now auto-detected via environment variables rather than requiring a manual flag.
    • The quickstart deployment has been updated to align with the development environment, ensuring consistent operational behavior.
  • Chores
    • Improved cloud storage path formatting to enhance the reliability of file uploads.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request updates the handling of Google Cloud settings in run.py by removing the --gcp flag and instead checking the CLOUD_PROVIDER environment variable. It also adds the ONLINE_OFFLINE_WRITE_ARGS constant. Additionally, minor changes in distribution scripts include appending a trailing slash to a GCS jar path and updating environment references in a quickstart script from test to development configurations.

Changes

File(s) Summary
api/py/ai/.../run.py Removed the --gcp flag from CLI; updated main signature; replaced parameter checks with an environment variable lookup; added ONLINE_OFFLINE_WRITE_ARGS.
scripts/distribution/...build_and_upload_artifacts.sh Appended a trailing slash to the ELEMENT_JAR_PATH variable for accurate GCS path handling.
scripts/distribution/...run_zipline_quickstart.sh Shifted environment references from test to development; updated table deletion names, git branch checkout, and artifact storage paths.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant R as run.py
    participant E as Environment (CLOUD_PROVIDER)
    U->>R: Execute script
    R->>E: Check CLOUD_PROVIDER
    E-->>R: Return provider info
    alt GCP enabled
      R->>R: Run GCP-specific logic
    else
      R->>R: Run standard logic
    end
Loading

Possibly related PRs

Suggested reviewers

  • tchow-zlai
  • piyush-zlai

Poem

In a line of code, a flag took flight,
Now env variables guide our night.
Dev and cloud in new embrace,
Scripts align with updated grace.
Code sings a joyful, subtle tune—
A change well-cast beneath the moon!

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

@david-zlai david-zlai marked this pull request as ready for review March 6, 2025 00:52
@david-zlai david-zlai requested a review from chewy-zlai March 6, 2025 00:52
Copy link
Collaborator

@chewy-zlai chewy-zlai left a comment

Choose a reason for hiding this comment

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

LGTM

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

🧹 Nitpick comments (1)
scripts/distribution/run_zipline_quickstart.sh (1)

23-23: Add error handling for directory change.

Add failure handling to cd command.

- cd cananry-confs
+ cd cananry-confs || exit 1
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 23-23: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

📜 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 3b94e78 and ab09dc5.

📒 Files selected for processing (3)
  • api/py/ai/chronon/repo/run.py (3 hunks)
  • scripts/distribution/build_and_upload_artifacts.sh (1 hunks)
  • scripts/distribution/run_zipline_quickstart.sh (2 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
scripts/distribution/run_zipline_quickstart.sh

[warning] 23-23: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: non_spark_tests
  • GitHub Check: non_spark_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (11)
scripts/distribution/build_and_upload_artifacts.sh (1)

187-187: Added trailing slash for path consistency.

Added trailing slash ensures consistent path handling when joining paths.

scripts/distribution/run_zipline_quickstart.sh (8)

17-18: Environment migration to dev - BQ table references updated.

Tables renamed to use dev suffix instead of test.


26-27: Updated git branch references for dev environment.

Branch changed from selects to dev.


34-34: Updated storage bucket for dev environment.

Changed from canary to dev bucket.


66-66: Updated config path to use dev environment.

Changed from purchases.v1_test to purchases.v1_dev.


72-72: Updated config path for upload mode.

Consistent with other changes to use dev environment.


79-79: Updated config path for upload-to-kv mode.

Using consistent dev environment reference.


85-85: Updated config path for metadata-upload mode.

Dev environment consistency maintained.


92-92: Updated config name for fetch mode.

Changed to use v1_dev suffix.

api/py/ai/chronon/repo/run.py (2)

40-40: Added constant for combined args.

New constant combines offline and online arguments.


820-824: Removed gcp parameter from signature.

Parameter removed as part of migration to environment variable configuration.

os.makedirs(ZIPLINE_DIRECTORY, exist_ok=True)

if dataproc or gcp:
if dataproc or os.environ.get('CLOUD_PROVIDER', '') == 'GCP':
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Environment-based cloud provider detection.

Replaced flag parameter with environment variable check.


🏁 Script executed:

#!/bin/bash
# Check if there are any remaining references to the removed --gcp flag
grep -r "\-\-gcp" . --include="*.py" --include="*.sh"

Length of output: 591


Review Update: Verify update consistency in environment checks.

  • In api/py/ai/chronon/repo/run.py (line 833), using the environment variable for GCP detection is correct.
  • However, references to --gcp still exist in scripts/distribution/build_and_upload_artifacts.sh. Please confirm if these should be updated as well for consistency.

Copy link
Collaborator

@tchow-zlai tchow-zlai left a comment

Choose a reason for hiding this comment

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

are we no longer keeping canary around?

@david-zlai
Copy link
Contributor Author

david-zlai commented Mar 6, 2025

we are keeping canary. it'll be used only for CI. dev will be for us. don't want CI and one of us to collide in testing

@david-zlai david-zlai merged commit b14affe into main Mar 6, 2025
7 checks passed
@david-zlai david-zlai deleted the davidhan/migrate_dev branch March 6, 2025 01:04
@coderabbitai coderabbitai bot mentioned this pull request Apr 18, 2025
4 tasks
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary

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



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

## Summary by CodeRabbit

- **Refactor**
- Cloud settings are now auto-detected via environment variables rather
than requiring a manual flag.
- The quickstart deployment has been updated to align with the
development environment, ensuring consistent operational behavior.
- **Chores**
- Improved cloud storage path formatting to enhance the reliability of
file uploads.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kumar-zlai pushed a commit that referenced this pull request Apr 29, 2025
## Summary

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



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

## Summary by CodeRabbit

- **Refactor**
- Cloud settings are now auto-detected via environment variables rather
than requiring a manual flag.
- The quickstart deployment has been updated to align with the
development environment, ensuring consistent operational behavior.
- **Chores**
- Improved cloud storage path formatting to enhance the reliability of
file uploads.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

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



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

## Summary by CodeRabbit

- **Refactor**
- Cloud settings are now auto-detected via environment variables rather
than requiring a manual flag.
- The quickstart deployment has been updated to align with the
development environment, ensuring consistent operational behavior.
- **Chores**
- Improved cloud storage path formatting to enhance the reliability of
file uploads.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

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



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

## Summary by CodeRabbit

- **Refactor**
- Cloud settings are now auto-detected via environment variables rather
than requiring a manual flag.
- The quickstart deployment has been updated to align with the
development environment, ensuring consistent operational behavior.
- **Chores**
- Improved cloud storage path formatting to enhance the reliability of
file uploads.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
…#473)

## Summary

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



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

## Summary by CodeRabbit

- **Refactor**
- Cloud settings are now auto-detected via environment variables rather
than requiring a manual flag.
- The quiour clientsstart deployment has been updated to align with the
development environment, ensuring consistent operational behavior.
- **Chores**
- Improved cloud storage path formatting to enhance the reliability of
file uploads.

<!-- 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