Skip to content

chore: Workflow to Sync Platform Subtree on Pushes to Main #734

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 11 commits into from
May 6, 2025

Conversation

chewy-zlai
Copy link
Collaborator

@chewy-zlai chewy-zlai commented May 5, 2025

Summary

Create workflow to trigger platform subtree pull reusable workflow.

Also deletes Push To Canary workflow as it will be triggered in the platform repo.

Checklist

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

Summary by CodeRabbit

  • Chores
    • Added a new workflow to automate triggering subtree updates in an external platform repository when changes are pushed to the main branch.
    • Removed the "Push To Canary" workflow, discontinuing automated artifact builds, canary deployments, integration tests, and related notifications for the main branch.

Copy link

coderabbitai bot commented May 5, 2025

Walkthrough

A new workflow .github/workflows/trigger_platform_subtree_pull.yaml was added to trigger a reusable workflow in an external repository on pushes to main. Simultaneously, the comprehensive .github/workflows/push_to_canary.yaml workflow, which handled multi-stage CI/CD for canary releases, was deleted.

Changes

File(s) Change Summary
.github/workflows/trigger_platform_subtree_pull.yaml Added workflow to trigger a reusable workflow in zipline-ai/platform on main branch pushes.
.github/workflows/push_to_canary.yaml Deleted workflow managing artifact build, multi-cloud deployment, integration tests, promotions, and Slack notifications.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub
    participant ThisRepo
    participant PlatformRepo

    GitHub->>ThisRepo: Push to main
    ThisRepo->>PlatformRepo: Trigger reusable workflow (subtree_pull_reusable.yaml)
Loading

Suggested reviewers

  • nikhil-zlai

Poem

On main branch push, a trigger set free,
While canary’s journey fades quietly—
Artifacts and clouds, now in the past,
A single workflow’s torch is cast.
CI/CD’s dance, simplified at last!
🚀✨


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

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 sequence diagram to generate a sequence diagram of the changes in this 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.

@chewy-zlai chewy-zlai requested a review from kumar-zlai May 5, 2025 18:28
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 (2)
.github/workflows/trigger_platform_subtree_pull.yaml (2)

3-6: Nit: comment clarity. The note "chronon's main" may confuse; use "this repo's main branch" instead.


10-10: Add newline at EOF. Required by YAML lint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: 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 c16b583 and 7108056.

📒 Files selected for processing (1)
  • .github/workflows/trigger_platform_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/trigger_platform_subtree_pull.yaml

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

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

🔇 Additional comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

1-2: Looks good. Descriptive workflow name.

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

8-9: 🛠️ Refactor suggestion

Pin reusable workflow to a commit SHA
Avoid breakage by replacing @main with a specific commit SHA.

-    uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@main
+    uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@<commit-SHA>
🧹 Nitpick comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

10-10: Add newline at end of file
Ensure POSIX compliance by ending the file with a newline.

 secrets: inherit  # Passes all secrets (needed for the deploy key)
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: 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 7108056 and bbe248a.

📒 Files selected for processing (1)
  • .github/workflows/trigger_platform_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/trigger_platform_subtree_pull.yaml

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

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

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

♻️ Duplicate comments (2)
.github/workflows/trigger_platform_subtree_pull.yaml (2)

3-5: Restrict to main branch Uncomment the branches: [ main ] filter so this only runs on main pushes.


10-10: Pin reusable workflow Use a specific commit SHA instead of @main to avoid future breakage.

🧹 Nitpick comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

11-11: Add EOF newline Insert a trailing newline to satisfy YAML lint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 11-11: 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 bbe248a and 22e1b7b.

📒 Files selected for processing (1)
  • .github/workflows/trigger_platform_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/trigger_platform_subtree_pull.yaml

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

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

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

♻️ Duplicate comments (2)
.github/workflows/trigger_platform_subtree_pull.yaml (2)

4-5: Restrict workflow to only main branch.
Uncomment the branch filter so it doesn’t trigger on every push:

 on:
-  push:
-#    branches: [ main ]  # Run when changes land in chronon's main
+  push:
+    branches: [ main ]  # Run when changes land in chronon's main

8-9: Pin reusable workflow to a commit SHA.
Avoid breakage if main changes by referencing a fixed SHA:

- uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@main
+ uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@<commit-SHA>
🧹 Nitpick comments (2)
.github/workflows/trigger_platform_subtree_pull.yaml (2)

10-10: Add newline at end of file.
Ensures YAML linter passes.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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


10-10: Scope secrets instead of inheriting all.
If possible, list only the required secrets to reduce risk.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: 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 3a5f3ed and d8dd6b6.

📒 Files selected for processing (1)
  • .github/workflows/trigger_platform_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/trigger_platform_subtree_pull.yaml

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

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

🔇 Additional comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

1-2: Workflow name is clear.
This succinctly describes the action’s purpose.

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 (3)
.github/workflows/subtree_pull_test.yaml (3)

29-47: Simplify SSH setup using webfactory/ssh-agent
You can replace the manual SSH key, known_hosts, and agent setup with a single action step:

- uses: webfactory/[email protected]
  with:
    ssh-private-key: ${{ secrets.CHRONON_REPO_DEPLOY_KEY }}

This reduces boilerplate and improves maintainability.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 32-32: trailing spaces

(trailing-spaces)


[error] 35-35: trailing spaces

(trailing-spaces)


[error] 39-39: trailing spaces

(trailing-spaces)


[error] 47-47: trailing spaces

(trailing-spaces)


49-53: Handle no-op subtree pulls gracefully
git subtree pull exits non-zero when there’s no update. Prevent pipeline failures by swallowing that specific case:

- git subtree pull --prefix=chronon chronon main --message="chore: update chronon subtree"
+ git subtree pull --prefix=chronon chronon main --message="chore: update chronon subtree" || echo "no subtree changes"
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: trailing spaces

(trailing-spaces)


32-32: Remove trailing spaces & ensure newline at EOF
YAMLlint flagged trailing whitespace on lines 32, 35, 39, 47, and 50, plus missing final newline. Cleaning these up will satisfy the linter.

Also applies to: 35-35, 39-39, 47-47, 50-50, 55-55

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 32-32: trailing spaces

(trailing-spaces)

📜 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 d8dd6b6 and 9886a58.

📒 Files selected for processing (1)
  • .github/workflows/subtree_pull_test.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/subtree_pull_test.yaml

[error] 32-32: trailing spaces

(trailing-spaces)


[error] 35-35: trailing spaces

(trailing-spaces)


[error] 39-39: trailing spaces

(trailing-spaces)


[error] 47-47: trailing spaces

(trailing-spaces)


[error] 50-50: trailing spaces

(trailing-spaces)


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

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

🔇 Additional comments (3)
.github/workflows/subtree_pull_test.yaml (3)

11-20: Checkout platform repo step looks solid
Using actions/checkout@v4 with SSH key, full fetch depth, explicit ref: main, and persist-credentials: false aligns with subtree requirements.


21-25: Git user config is correct
Setting both name and email ensures commits from Actions are attributed properly.


54-55: Push changes step is correct
Pushing via SSH matches the checkout config and will publish the subtree update commit.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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

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 (2)
.github/workflows/test_subtree_pull.yaml (2)

31-31: Remove trailing whitespace.
Trim trailing spaces on these lines to satisfy YAML lint.

Also applies to: 34-34, 38-38, 46-46, 49-49

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 31-31: trailing spaces

(trailing-spaces)


54-54: Add newline at end of file.
Ensure a final newline to pass YAML lint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 54-54: 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 9886a58 and 9544ad4.

📒 Files selected for processing (1)
  • .github/workflows/test_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_subtree_pull.yaml

[error] 31-31: trailing spaces

(trailing-spaces)


[error] 34-34: trailing spaces

(trailing-spaces)


[error] 38-38: trailing spaces

(trailing-spaces)


[error] 46-46: trailing spaces

(trailing-spaces)


[error] 49-49: trailing spaces

(trailing-spaces)


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

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

🔇 Additional comments (3)
.github/workflows/test_subtree_pull.yaml (3)

11-19: Checkout step configuration is correct.
fetch-depth: 0, SSH key usage, and ref: main are properly set.


20-23: Git user config step is fine.
User name/email are set for proper commit attribution.


24-52: Subtree pull commands look solid.
SSH setup, remote addition, fetch, and git subtree pull are correctly implemented.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 31-31: trailing spaces

(trailing-spaces)


[error] 34-34: trailing spaces

(trailing-spaces)


[error] 38-38: trailing spaces

(trailing-spaces)


[error] 46-46: trailing spaces

(trailing-spaces)


[error] 49-49: trailing spaces

(trailing-spaces)

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

♻️ Duplicate comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

8-9: 🛠️ Refactor suggestion

Pin reusable workflow to a commit SHA

- uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@main
+ uses: zipline-ai/platform/.github/workflows/subtree_pull_reusable.yaml@<commit-SHA>
🧹 Nitpick comments (1)
.github/workflows/trigger_platform_subtree_pull.yaml (1)

10-10: Add trailing newline
[yamllint]

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: 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 9544ad4 and 857c769.

📒 Files selected for processing (1)
  • .github/workflows/trigger_platform_subtree_pull.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/trigger_platform_subtree_pull.yaml

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

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

🔇 Additional comments (2)
.github/workflows/trigger_platform_subtree_pull.yaml (2)

1-2: LGTM
[name is descriptive]


3-6: Branch filter is correct

@chewy-zlai chewy-zlai merged commit a151d84 into main May 6, 2025
4 checks passed
@chewy-zlai chewy-zlai deleted the chewy/copy_to_platform branch May 6, 2025 23:05
chewy-zlai added a commit that referenced this pull request May 15, 2025
## Summary

Create workflow to trigger platform subtree pull reusable workflow.

Also deletes Push To Canary workflow as it will be triggered in the
platform repo.

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

- **Chores**
- Added a new workflow to automate triggering subtree updates in an
external platform repository when changes are pushed to the main branch.
- Removed the "Push To Canary" workflow, discontinuing automated
artifact builds, canary deployments, integration tests, and related
notifications for the main branch.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai added a commit that referenced this pull request May 15, 2025
## Summary

Create workflow to trigger platform subtree pull reusable workflow.

Also deletes Push To Canary workflow as it will be triggered in the
platform repo.

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

- **Chores**
- Added a new workflow to automate triggering subtree updates in an
external platform repository when changes are pushed to the main branch.
- Removed the "Push To Canary" workflow, discontinuing automated
artifact builds, canary deployments, integration tests, and related
notifications for the main branch.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai added a commit that referenced this pull request May 16, 2025
## Summary

Create workflow to trigger platform subtree pull reusable workflow.

Also deletes Push To Canary workflow as it will be triggered in the
platform repo.

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

- **Chores**
- Added a new workflow to automate triggering subtree updates in an
external platform repository when changes are pushed to the main branch.
- Removed the "Push To Canary" workflow, discontinuing automated
artifact builds, canary deployments, integration tests, and related
notifications for the main branch.
<!-- 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.

2 participants