Skip to content

fix: Sync Workflow Lives in Chronon #743

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 19 commits into from
May 7, 2025
Merged

Conversation

chewy-zlai
Copy link
Collaborator

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

Summary

My strategy to use a reuseble workflow doesn't work anymore because a private workflow isn't accessible from a public repo. Instead of triggering the sync, this simply runs it from here.

Checklist

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

Summary by CodeRabbit

  • Chores
    • Removed the previous canary release workflow, including automated build, test, and artifact deployment steps for AWS and GCP.
    • Introduced a new workflow to automate synchronization of code from the chronon repository into the platform repository via subtree pull and push operations.

Copy link

coderabbitai bot commented May 6, 2025

Walkthrough

This change removes the existing "Push To Canary" GitHub Actions workflow, which managed comprehensive multi-stage CI/CD for canary releases, and introduces a new "Push to Platform" workflow. The new workflow automates subtree synchronization from the chronon repository into the platform repository on pushes to the main branch.

Changes

File(s) Change Summary
.github/workflows/push_to_canary.yaml Deleted the entire workflow for canary CI/CD, artifact building, testing, and notifications.
.github/workflows/push_to_platform.yaml Added a new workflow to automate subtree pull from chronon into platform on main branch.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant platform repo
    participant chronon repo

    GitHub Actions->>platform repo: On push to main, checkout repo
    GitHub Actions->>GitHub Actions: Configure SSH for access
    GitHub Actions->>chronon repo: Add as remote and fetch main
    GitHub Actions->>platform repo: Pull chronon as subtree into /chronon
    GitHub Actions->>platform repo: Commit and push changes to main
Loading

Possibly related PRs

Suggested reviewers

  • kumar-zlai
  • tchow-zlai

Poem

Out with the canary, in with the tree,
Subtrees now sync with workflow glee.
Artifacts and tests take a rest,
While platform and chronon merge their best.
Repos unite with a single command—
Automation’s magic, perfectly planned! 🎉🌲


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

SSH_PRIVATE_KEY: ${{ secrets.CHRONON_REPO_DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this going to show the private key in the CI logs? Or is it possible a simple followup change could expose that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here is it running: https://github.com/zipline-ai/platform/actions/runs/14843383331/job/41671413678 It doesn't expose the secret data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I confirmed here that a simple change won't expose the secret SSH key: https://github.com/zipline-ai/chronon/actions/runs/14872732013/job/41764246277?pr=743. Github is good about keeping secrets from getting exposed.

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/push_to_platform.yaml (1)

29-31: Ensure SSH key isn’t exposed. Verify that SSH_PRIVATE_KEY isn’t printed in logs.

🧹 Nitpick comments (3)
.github/workflows/push_to_platform.yaml (3)

1-7: Triggers on main ✅; add concurrency. Workflow fires on pushes to main. Add a concurrency block to serialize runs and avoid overlapping subtree pushes.


54-55: Push always runs; consider no-op skip. Skip git push when there are no subtree changes to reduce noise.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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


32-32: Trim trailing spaces & add EOF newline. Lines 32,35,39,47,50 have trailing spaces; line 55 needs a newline to satisfy YAML lint.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a151d84 and 460c552.

📒 Files selected for processing (2)
  • .github/workflows/push_to_canary.yaml (0 hunks)
  • .github/workflows/push_to_platform.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/push_to_canary.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/push_to_platform.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 (4)
.github/workflows/push_to_platform.yaml (4)

13-20: Checkout of platform repo is correct. Using actions/checkout@v4 with fetch-depth: 0 ensures full history for subtree.


21-25: Git user/email config is fine. Commits will be attributed to GitHub Actions.


32-38: SSH key perms & agent setup follow best practices. File permission and agent steps look good.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 32-32: trailing spaces

(trailing-spaces)


[error] 35-35: trailing spaces

(trailing-spaces)


49-53: Subtree pull logic is solid. git remote add … || true prevents errors on reruns.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 50-50: 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

🧹 Nitpick comments (5)
.github/workflows/push_to_platform.yaml (5)

14-20: Disable token persistence Add persist-credentials: false to the checkout step when using SSH to avoid injecting the GITHUB_TOKEN.


33-33: Remove trailing spaces Eliminate unnecessary spaces on blank lines to satisfy YAML lint.

Also applies to: 36-36, 40-40, 48-48, 51-51

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 33-33: trailing spaces

(trailing-spaces)


56-56: Add newline at EOF POSIX requires a trailing newline at end of file.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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


50-50: Improve remote idempotency Use a conditional check and git remote set-url instead of || true to avoid silent failures.


1-56: Add tests/docs No tests or documentation were updated for this workflow. Consider adding an integration test or updating the README.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 33-33: trailing spaces

(trailing-spaces)


[error] 36-36: trailing spaces

(trailing-spaces)


[error] 40-40: trailing spaces

(trailing-spaces)


[error] 48-48: trailing spaces

(trailing-spaces)


[error] 51-51: trailing spaces

(trailing-spaces)


[error] 56-56: 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 460c552 and 651ebe1.

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

[error] 33-33: trailing spaces

(trailing-spaces)


[error] 36-36: trailing spaces

(trailing-spaces)


[error] 40-40: trailing spaces

(trailing-spaces)


[error] 48-48: trailing spaces

(trailing-spaces)


[error] 51-51: trailing spaces

(trailing-spaces)


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

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

@chewy-zlai chewy-zlai merged commit 3779e99 into main May 7, 2025
4 checks passed
@chewy-zlai chewy-zlai deleted the chewy/copy_to_platform branch May 7, 2025 20:34
chewy-zlai added a commit that referenced this pull request May 15, 2025
## Summary

My strategy to use a reuseble workflow doesn't work anymore because a
private workflow isn't accessible from a public repo. Instead of
triggering the sync, this simply runs it from here.

## 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**
- Removed the previous canary release workflow, including automated
build, test, and artifact deployment steps for AWS and GCP.
- Introduced a new workflow to automate synchronization of code from the
chronon repository into the platform repository via subtree pull and
push operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai added a commit that referenced this pull request May 15, 2025
## Summary

My strategy to use a reuseble workflow doesn't work anymore because a
private workflow isn't accessible from a public repo. Instead of
triggering the sync, this simply runs it from here.

## 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**
- Removed the previous canary release workflow, including automated
build, test, and artifact deployment steps for AWS and GCP.
- Introduced a new workflow to automate synchronization of code from the
chronon repository into the platform repository via subtree pull and
push operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai added a commit that referenced this pull request May 16, 2025
## Summary

My strategy to use a reuseble workflow doesn't work anymore because a
private workflow isn't accessible from a public repo. Instead of
triggering the sync, this simply runs it from here.

## 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**
- Removed the previous canary release workflow, including automated
build, test, and artifact deployment steps for AWS and GCP.
- Introduced a new workflow to automate synchronization of code from the
chronon repository into the platform repository via subtree pull and
push operations.
<!-- 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