Skip to content

Conversation

@david-zlai
Copy link
Contributor

@david-zlai david-zlai commented Feb 28, 2025

Summary

Checklist

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

Tested with:

davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/fix_artifact_submission) $ bash scripts/distribution/build_and_upload_artifacts.sh --gcp --gcp_customer_ids canary
...

and succeeded

Summary by CodeRabbit

  • Chores
    • Enhanced error handling and configuration management for the build and upload process.
    • Simplified artifact versioning with a preset version for consistent naming.
    • Added a check to ensure a valid upload option is selected, providing clearer user feedback.
    • Updated the wheel filename to reflect a stable version by removing the dev0 suffix.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2025

Walkthrough

The build_and_upload_artifacts.sh script has been updated to improve error handling by using set -euxo pipefail. The method for determining the CHRONON_ROOT_DIR has been modified, and the wheel versioning is now simplified with a hardcoded value of "0.1.0". A new check ensures that at least one upload option (BUILD_AWS or BUILD_GCP) is selected, enhancing the execution flow. The run_zipline_quickstart.sh script has also been updated to reflect the removal of the .dev0 suffix in the wheel filename.

Changes

File(s) Change Summary
scripts/distribution/build_and_upload_artifacts.sh - Replaced set -e with set -euxo pipefail for stricter error handling.
- Updated directory resolution method.
- Simplified wheel versioning with hardcoded WHEEL_VERSION="0.1.0".
- Added conditional check for upload options (BUILD_AWS or BUILD_GCP).
scripts/distribution/run_zipline_quickstart.sh - Updated WHEEL_FILE from "zipline_ai-0.1.0.dev0-py3-none-any.whl" to "zipline_ai-0.1.0-py3-none-any.whl " by removing the .dev0 suffix and adding a space at the end.

Possibly related PRs

Suggested reviewers

  • chewy-zlai
  • tchow-zlai

Poem

In the shell's realm, our script takes flight,
With strict mode on, it shines so bright.
Versions are set with a simple decree,
Upload flags guide where the artifacts will be.
A new check ensures no misstep in the night,
Code sings in rhythm, a joyful delight!
Cheers to progress in every byte!

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 258af08 and a23f858.

📒 Files selected for processing (1)
  • scripts/distribution/build_and_upload_artifacts.sh (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/distribution/build_and_upload_artifacts.sh

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

VERSION=$(cat version.sbt | cut -d " " -f3 | tr -d '"') pip wheel api/py
EXPECTED_ZIPLINE_WHEEL="zipline_ai-0.1.0.dev0-py3-none-any.whl"

WHEEL_VERSION="0.1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hardcoded for now until we do semantic releases

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)
scripts/distribution/build_and_upload_artifacts.sh (1)

89-90: Directory resolution tweak.
CHRONON_ROOT_DIR now uses pwd | awk; note that SCRIPT_DIRECTORY is unused.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 89-89: SCRIPT_DIRECTORY appears unused. Verify use (or export if used externally).

(SC2034)

📜 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 c7cb682 and e0098db.

📒 Files selected for processing (1)
  • scripts/distribution/build_and_upload_artifacts.sh (3 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
scripts/distribution/build_and_upload_artifacts.sh

[warning] 89-89: SCRIPT_DIRECTORY appears unused. Verify use (or export if used externally).

(SC2034)

🔇 Additional comments (3)
scripts/distribution/build_and_upload_artifacts.sh (3)

87-87: Enhanced error handling.
Using set -euxo pipefail guarantees robust failure behavior.


118-121: Version hardcoding.
Hardcoding WHEEL_VERSION="0.1.0" aligns artifact naming with expectations.


235-238: Upload target check.
Ensures at least one upload option is set, preventing misexecution.

@david-zlai david-zlai force-pushed the davidhan/fix_artifact_submission branch from e0098db to 3368fd4 Compare February 28, 2025 18:32
Copy link
Contributor

@piyush-zlai piyush-zlai left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up!


SCRIPT_DIRECTORY=$(dirname -- "$(realpath -- "$0")")
CHRONON_ROOT_DIR=$(dirname "$SCRIPT_DIRECTORY")
CHRONON_ROOT_DIR=$(echo "$SCRIPT_DIRECTORY" | awk -F 'chronon' '{print $1 "chronon"}')
Copy link
Contributor

Choose a reason for hiding this comment

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

an alt here would be - CHRONON_ROOT_DIR=$(dirname "$(dirname "$SCRIPT_DIRECTORY")")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did it with awk though because wanted to make the script safe against another PR that moves this script haha

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)
scripts/distribution/run_zipline_quickstart.sh (1)

14-14: WHEEL_FILE: Version Update & Trailing Space.
The version update is correct, but remove the extra trailing space to avoid filename issues.

📜 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 3368fd4 and 61e1ea6.

📒 Files selected for processing (1)
  • scripts/distribution/run_zipline_quickstart.sh (1 hunks)

@david-zlai david-zlai merged commit 9901878 into main Feb 28, 2025
4 checks passed
@david-zlai david-zlai deleted the davidhan/fix_artifact_submission branch February 28, 2025 19:10
@coderabbitai coderabbitai bot mentioned this pull request Mar 30, 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
- [ ] Integration tested
- [ ] Documentation update

Tested with:

```
davidhan@Davids-MacBook-Pro: ~/zipline/chronon (davidhan/fix_artifact_submission) $ bash scripts/distribution/build_and_upload_artifacts.sh --gcp --gcp_customer_ids canary
...

```
and succeeded


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

- **Chores**
- Enhanced error handling and configuration management for the build and
upload process.
- Simplified artifact versioning with a preset version for consistent
naming.
- Added a check to ensure a valid upload option is selected, providing
clearer user feedback.
- Updated the wheel filename to reflect a stable version by removing the
`dev0` suffix.
<!-- 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.

3 participants