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

chore(release): replace colima with native docker in macOS builds #2188

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

vivekgsharma
Copy link
Collaborator

@vivekgsharma vivekgsharma commented Sep 30, 2024

Issue being fixed or feature implemented

Colima was causing startup failures in GitHub Actions for macOS builds, preventing successful execution of the workflow. This change aims to resolve these issues and ensure a more stable build process.

What was done?

  • Removed Colima setup from the macOS build steps in the GitHub Actions workflow
  • Configured the workflow to use the native Docker installation provided by GitHub Actions runners for macOS
  • Updated relevant build scripts and configuration files to work with the native Docker setup

How Has This Been Tested?

-not yet tested

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Chores
    • Removed outdated workflows for publishing documentation, managing runs, and linting pull requests.
    • Improved the workflow for releasing packages and images, enhancing efficiency for macOS builds.
    • Streamlined installation of Docker-related dependencies and focused macOS build dependencies.
    • Retained the notarization process for macOS releases to ensure compliance.

fix: Replace Colima with native Docker in macOS builds
Copy link
Contributor

coderabbitai bot commented Sep 30, 2024

Warning

Rate limit exceeded

@vivekgsharma has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 30 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

Files that changed from the base of the PR and between 827a7d3 and 829740b.

Walkthrough

The changes involve the deletion of multiple GitHub Actions workflow files, including those for documentation publishing, managing workflow runs, pull request linting, building development containers, and testing various packages. These workflows were designed to automate tasks such as deploying documentation, managing pull request workflows, and running tests for JavaScript and Rust packages. The removal of these workflows indicates a shift in the repository's automation strategy.

Changes

Files Change Summary
.github/workflows/docs.yml - Workflow removed: Publish docs via GitHub Pages.
.github/workflows/manage-runs.yml - Workflow removed: Manage runs.
.github/workflows/pr.yml - Workflow removed: Pull Request Linter.
.github/workflows/prebuild-devcontainers.yml - Workflow removed: Prebuild Dev Containers.
.github/workflows/release-docker-image.yml - Workflow removed: release-docker-image.
.github/workflows/release.yml - Workflow modified: Focus shifted from releasing packages to testing macOS builds.
.github/workflows/tests-build-image.yml - Workflow removed: tests-build-image.
.github/workflows/tests-build-js.yml - Workflow removed: tests-build-js.
.github/workflows/tests-codeql.yml - Workflow removed: tests-codeql.
.github/workflows/tests-dashmate.yml - Workflow removed: tests-dashmate.
.github/workflows/tests-js-package.yml - Workflow removed: tests-js-package.
.github/workflows/tests-packges-functional.yml - Workflow removed: tests-packges-functional.
.github/workflows/tests-rs-package.yml - Workflow removed: tests-rs-package.
.github/workflows/tests-test-suite.yml - Workflow removed: tests-test-suite.
.github/workflows/tests.yml - Workflow removed: tests.

Possibly related PRs

  • ci: prebuild dev containers #2184: The main PR involves the deletion of a GitHub Actions workflow for publishing documentation, while the retrieved PR introduces a new workflow for prebuilding development containers. Both PRs relate to GitHub Actions workflows, indicating a focus on automating processes within the repository, although they target different functionalities.

Poem

🐇 In the meadow of code where the rabbits roam,
Workflows have vanished, they've found a new home.
From docs to tests, they've hopped away,
Leaving behind a quieter day.
Yet in the stillness, we’ll find our way,
With new paths to code, come what may! 🌼


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

@vivekgsharma vivekgsharma changed the title Update release.yml chore(ci): Replace Colima with native Docker in macOS builds Sep 30, 2024
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

🧹 Outside diff range and nitpick comments (1)
.github/workflows/release.yml (1)

247-249: Approve Docker setup for macOS with a suggestion

The addition of the Docker setup step for macOS is crucial after removing Colima. This ensures that Docker is properly configured on macOS runners.

Consider using a specific version of the docker-practice/actions-setup-docker action instead of master for better stability and reproducibility. For example:

- name: Set up Docker for macOS
  if: runner.os == 'macOS'
  uses: docker-practice/actions-setup-docker@v1

Replace v1 with the latest stable version available.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9065a0a and 45600b3.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (2 hunks)
🔇 Additional comments (2)
.github/workflows/release.yml (2)

283-283: LGTM: Improved OSX_KEYCHAIN path setting

The change from $RUNNER_TEMP to ${{ runner.temp }} for setting the OSX_KEYCHAIN environment variable is a good improvement. This uses the GitHub Actions context correctly, which enhances the reliability and portability of the workflow across different environments.


Line range hint 1-305: Summary: Successful implementation of PR objectives with testing recommendation

The changes in this PR successfully address the stated objectives:

  1. Removal of Colima setup from macOS build steps.
  2. Reconfiguration to use native Docker installation on GitHub Actions runners for macOS.
  3. Updates to relevant build scripts and configuration files for compatibility with the native Docker setup.

These modifications should enhance the stability of the build process, particularly for macOS builds. The workflow has been simplified, which is likely to reduce potential points of failure.

Given that the author mentioned these changes have not been tested yet, it is crucial to perform thorough testing before merging. Please ensure to:

  1. Run the entire workflow on a test branch to verify that all jobs complete successfully, especially the macOS-specific jobs.
  2. Test the release-dashmate-packages job with the macos-14 runner to confirm that the native Docker setup works as expected.
  3. Verify that the generated artifacts for all platforms (including macOS) are correct and functional.

After successful testing, this PR should be ready for merge.

.github/workflows/release.yml Show resolved Hide resolved
@vivekgsharma vivekgsharma changed the title chore(ci): Replace Colima with native Docker in macOS builds chore(release): Replace Colima with native Docker in macOS builds Sep 30, 2024
@shumkov shumkov changed the title chore(release): Replace Colima with native Docker in macOS builds ci: replace colima with native Docker in macOS builds Sep 30, 2024
@vivekgsharma vivekgsharma changed the title ci: replace colima with native Docker in macOS builds chore(release): replace colima with native docker in macOS builds Sep 30, 2024
@vivekgsharma vivekgsharma changed the title chore(release): replace colima with native docker in macOS builds chore(ci): replace colima with native docker in macOS builds Sep 30, 2024
@vivekgsharma vivekgsharma changed the title chore(ci): replace colima with native docker in macOS builds chore(release): replace colima with native docker in macOS builds Oct 2, 2024
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

🧹 Outside diff range and nitpick comments (4)
.github/workflows/release.yml (4)

1-9: LGTM: Workflow refocused for macOS build testing

The changes to the workflow name and trigger events align well with the PR objective of addressing macOS build issues. Focusing on the macos_build_failure_testing branch is a good approach for isolated testing.

Consider the following for future improvements:

  1. Once testing is complete, update the workflow to include all relevant branches.
  2. If this is a long-term change, update the workflow name to reflect its new purpose more accurately (e.g., "macOS Build and Release").

53-54: LGTM: Updated environment variable reference

The change from $RUNNER_TEMP to ${{ runner.temp }} is a good practice, as it uses the more consistent GitHub Actions syntax for referencing runner-specific paths.

To address the static analysis hint and improve script safety, consider wrapping the variable in double quotes:

OSX_KEYCHAIN: "${{ runner.temp }}/app-signing.keychain-db"

This prevents potential issues with globbing and word splitting, although it's unlikely to cause problems in this specific case.

🧰 Tools
🪛 actionlint

54-54: shellcheck reported issue in this script: SC2086:info:1:1: Double quote to prevent globbing and word splitting

(shellcheck)


60-64: LGTM: Updated artifact handling

The changes to the artifact upload step, including the new artifact name "dashmate-macos" and the simplified path, align well with the focus on macOS builds. This should improve artifact management and clarity.

To address the static analysis hint and follow YAML best practices, add a newline at the end of the file:

 name: dashmate-macos
 path: packages/dashmate/dist/**
+

This small change ensures the file adheres to common formatting standards and may prevent issues with some YAML parsers.

🧰 Tools
🪛 yamllint

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

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


Line range hint 1-64: Overall LGTM: Workflow successfully refocused for macOS build testing

The changes in this file align well with the PR objectives of replacing Colima with native Docker and enhancing the stability of macOS builds. Key improvements include:

  1. Refocusing the workflow on macOS build testing
  2. Removing Colima setup and introducing native Docker
  3. Simplifying macOS build dependencies
  4. Updating artifact handling for better clarity

The suggested minor improvements (double-quoting variables, adding a newline at the end of the file, and using a safer method for file processing) will further enhance the workflow's robustness and adherence to best practices.

For future consideration:

  1. Once testing is complete on the macos_build_failure_testing branch, update the workflow to include all relevant branches or create a separate workflow for production builds.
  2. Consider adding more comprehensive testing steps to ensure the build process works as expected with the new native Docker setup.
  3. If this becomes a long-term solution, update documentation to reflect the new build process for macOS.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 45600b3 and 827a7d3.

📒 Files selected for processing (15)
  • .github/workflows/docs.yml (0 hunks)
  • .github/workflows/manage-runs.yml (0 hunks)
  • .github/workflows/pr.yml (0 hunks)
  • .github/workflows/prebuild-devcontainers.yml (0 hunks)
  • .github/workflows/release-docker-image.yml (0 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/tests-build-image.yml (0 hunks)
  • .github/workflows/tests-build-js.yml (0 hunks)
  • .github/workflows/tests-codeql.yml (0 hunks)
  • .github/workflows/tests-dashmate.yml (0 hunks)
  • .github/workflows/tests-js-package.yml (0 hunks)
  • .github/workflows/tests-packges-functional.yml (0 hunks)
  • .github/workflows/tests-rs-package.yml (0 hunks)
  • .github/workflows/tests-test-suite.yml (0 hunks)
  • .github/workflows/tests.yml (0 hunks)
💤 Files with no reviewable changes (14)
  • .github/workflows/docs.yml
  • .github/workflows/manage-runs.yml
  • .github/workflows/pr.yml
  • .github/workflows/prebuild-devcontainers.yml
  • .github/workflows/release-docker-image.yml
  • .github/workflows/tests-build-image.yml
  • .github/workflows/tests-build-js.yml
  • .github/workflows/tests-codeql.yml
  • .github/workflows/tests-dashmate.yml
  • .github/workflows/tests-js-package.yml
  • .github/workflows/tests-packges-functional.yml
  • .github/workflows/tests-rs-package.yml
  • .github/workflows/tests-test-suite.yml
  • .github/workflows/tests.yml
🧰 Additional context used
🪛 actionlint
.github/workflows/release.yml

54-54: shellcheck reported issue in this script: SC2086:info:1:1: Double quote to prevent globbing and word splitting

(shellcheck)


57-57: shellcheck reported issue in this script: SC2156:warning:1:56: Injecting filenames is fragile and insecure. Use parameters

(shellcheck)

🪛 yamllint
.github/workflows/release.yml

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

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

🔇 Additional comments (2)
.github/workflows/release.yml (2)

13-14: LGTM: New macOS-specific job added

The introduction of the test-macos-build job running on macos-14 is in line with the PR objectives. Using the latest macOS runner ensures compatibility with the most recent macOS version.


24-27: LGTM: Simplified macOS build dependencies and Docker setup

The removal of Colima setup and the addition of native Docker setup align perfectly with the PR objectives. The simplification of macOS build dependencies to only llvm and coreutils should improve build stability.

To address the concern raised in the past review comment about Docker availability, please run the following verification script:

If the script fails, consider adding a step to install Docker manually or investigate why the docker-practice/actions-setup-docker@master action isn't working as expected.

.github/workflows/release.yml Outdated Show resolved Hide resolved
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

Thanks. I hope it's gonna work ).

@shumkov shumkov merged commit 75296d5 into v1.4-dev Oct 3, 2024
20 checks passed
@shumkov shumkov deleted the macos_build_failure_testing branch October 3, 2024 10:37
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