Skip to content
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

ci: add build push worker docker workflow & dep upgrade #759

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

pyshx
Copy link
Contributor

@pyshx pyshx commented Jan 13, 2025

Overview

What I've done

What I haven't done

How I tested

Screenshot

Which point I want you to review particularly

Memo

Summary by CodeRabbit

  • Chores

    • Updated GitHub Actions workflow files for API, UI, WebSocket, and CI workflows
    • Upgraded action versions across multiple workflow configurations
    • Introduced a new Docker push worker workflow
  • Infrastructure

    • Updated GitHub Actions to use latest versions of checkout, setup, build, and deployment actions
    • Improved CI/CD pipeline with more recent GitHub Actions versions

Copy link
Contributor

coderabbitai bot commented Jan 13, 2025

Warning

Rate limit exceeded

@pyshx has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 16 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b0eaf72 and 4550856.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)

Walkthrough

This pull request focuses on updating GitHub Actions workflow files across multiple components (API, UI, WebSocket, and Worker) by upgrading various action versions. The changes primarily involve incrementing versions of actions like actions/checkout, actions/upload-artifact, Docker-related actions, and Google Cloud authentication actions. These updates aim to leverage the latest features and improvements in GitHub Actions, ensuring the CI/CD pipeline uses the most recent tooling without fundamentally altering the workflow logic.

Changes

File Change Summary
.github/workflows/build_deploy_api.yml Updated multiple action versions: checkout to v4, setup-go to v5, Docker actions to v3/v6, Google Cloud actions to v2
.github/workflows/build_deploy_ui.yml Updated action versions similar to API workflow, with minor node version configuration change
.github/workflows/build_deploy_websocket.yml Upgraded action versions across checkout, artifact, Docker, and Google Cloud actions
.github/workflows/ci_api.yml Updated checkout to v4 and setup-go to v5
.github/workflows/docker_push_worker.yml New workflow added for building and pushing Docker images for worker

Possibly related PRs

Suggested labels

cicd, engine

Suggested reviewers

  • KaWaite

Poem

🐰 Workflow rabbits hop with glee,
Actions upgraded, version three to six!
Docker builds and clouds now free,
Our CI/CD pipeline does the tricks!
Hopping forward, never slow! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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.

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.

Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for reearth-flow canceled.

Name Link
🔨 Latest commit 4550856
🔍 Latest deploy log https://app.netlify.com/sites/reearth-flow/deploys/678594d062bf430008023c61

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 (3)
.github/workflows/docker_push_worker.yml (1)

47-71: Improve shell script robustness and security.

The shell script for determining build options could be improved for better robustness:

 run: |
-  TAG="${{ inputs.new_tag_short != 'blank' && inputs.new_tag_short || '' }}"
-  NAME="${{ inputs.name }}"
-  SHA="${{ inputs.sha_short }}"
+  TAG="${{ inputs.new_tag_short != 'blank' && inputs.new_tag_short || '' }}"
+  NAME="${{ inputs.name }}"
+  SHA="${{ inputs.sha_short }}"
+  {
+    echo "platforms=${PLATFORMS}"
+    echo "version=${VERSION}"
+    echo "tags=${TAGS}"
+  } >> "$GITHUB_OUTPUT"
🧰 Tools
🪛 actionlint (1.7.4)

47-47: shellcheck reported issue in this script: SC2129:style:21:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:21:32: Double quote to prevent globbing and word splitting

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:22:28: Double quote to prevent globbing and word splitting

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:23:22: Double quote to prevent globbing and word splitting

(shellcheck)

.github/workflows/build_deploy_api.yml (1)

35-35: Consider using a more specific Go version.

For reproducible builds, consider specifying the exact Go version (e.g., "1.21.5") instead of just "1.21".

.github/workflows/build_deploy_websocket.yml (1)

Line range hint 33-37: Consider updating the Rust toolchain action.

The actions-rs/toolchain@v1 action is relatively old. Consider using rust-lang/setup-rust-action which is more actively maintained.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8229a48 and b0eaf72.

📒 Files selected for processing (5)
  • .github/workflows/build_deploy_api.yml (6 hunks)
  • .github/workflows/build_deploy_ui.yml (5 hunks)
  • .github/workflows/build_deploy_websocket.yml (5 hunks)
  • .github/workflows/ci_api.yml (2 hunks)
  • .github/workflows/docker_push_worker.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/docker_push_worker.yml

47-47: shellcheck reported issue in this script: SC2129:style:21:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:21:32: Double quote to prevent globbing and word splitting

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:22:28: Double quote to prevent globbing and word splitting

(shellcheck)


47-47: shellcheck reported issue in this script: SC2086:info:23:22: Double quote to prevent globbing and word splitting

(shellcheck)

.github/workflows/build_deploy_ui.yml

31-31: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ci-api / ci-api-lint
  • GitHub Check: ci-api / ci-api-test
🔇 Additional comments (3)
.github/workflows/docker_push_worker.yml (1)

73-84: LGTM! Good security practices in Docker build configuration.

The Docker build configuration includes important security features:

  • Provenance and SBOM generation enabled
  • Build caching properly configured
  • Multi-platform build support
.github/workflows/build_deploy_api.yml (1)

Line range hint 119-129: LGTM! Enhanced security with SBOM and provenance.

Good addition of security features:

  • Software Bill of Materials (SBOM) generation
  • Build provenance for supply chain security
.github/workflows/ci_api.yml (1)

13-13: LGTM! Action version upgrades are appropriate.

The upgrades to actions/checkout@v4 and actions/setup-go@v5 are good improvements that bring in the latest features and security fixes.

Also applies to: 37-37

Comment on lines 31 to +33
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
node-version: "lts/*"
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update actions/setup-node to latest version.

The current setup-node@v3 action may have compatibility issues with the runner. Consider upgrading to setup-node@v4.

-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
         with:
           node-version: "lts/*"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
node-version: "lts/*"
uses: actions/setup-node@v4
with:
node-version: "lts/*"
🧰 Tools
🪛 actionlint (1.7.4)

31-31: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

@pyshx pyshx changed the title ci(engine): add build push worker docker workflow ci: add build push worker docker workflow & dev upgrade Jan 13, 2025
@pyshx pyshx changed the title ci: add build push worker docker workflow & dev upgrade ci: add build push worker docker workflow & dep upgrade Jan 13, 2025
@pyshx pyshx merged commit a5d6719 into main Jan 13, 2025
18 checks passed
@pyshx pyshx deleted the ci/add-deploy-worker-workflowd branch January 13, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant