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

Upgrade GitHub Actions to remove dependencies on Node 12/16 #7459

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Feb 8, 2024

Motivation and context

This is a followup to #7442. I didn't realize there were so many outdated actions. 🙂

This should update every remaining action with a Node 12/16 dependency.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • [ ] I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • New Features
    • Upgraded several GitHub Actions to their latest versions, enhancing functionality and performance across CI/CD workflows.
  • Bug Fixes
    • Updates may include bug fixes from the newer versions of actions, leading to improved reliability.
  • Chores
    • General maintenance of workflow configurations to ensure optimal performance and security.

@SpecLad
Copy link
Contributor Author

SpecLad commented Feb 8, 2024

Hmm, the artifact action changes are indeed non-trivial... need to go back to the drawing board with this one.

@SpecLad SpecLad closed this Feb 8, 2024
Copy link
Contributor

coderabbitai bot commented Sep 10, 2024

Walkthrough

The pull request includes updates to multiple GitHub Actions workflows across various files. The primary focus of the changes is upgrading the versions of several actions used in the workflows, including actions/cache, docker/setup-buildx-action, docker/build-push-action, actions/setup-python, and CodeQL actions. These updates aim to enhance functionality and performance within the CI/CD pipeline.

Changes

Files Change Summary
.github/workflows/cache.yml Upgraded actions/cache from v3 to v4, docker/setup-buildx-action from v2 to v3, and docker/build-push-action from v2 to v6.
.github/workflows/codeql-analysis.yml Upgraded CodeQL actions from v2 to v3 for init, autobuild, and analyze steps.
.github/workflows/comment.yml Upgraded actions/github-script from v3 to v7.
.github/workflows/docs.yml Upgraded peaceiris/actions-gh-pages from v3 to v4.
.github/workflows/full.yml Upgraded actions/cache from v3 to v4, docker/setup-buildx-action from v2 to v3, docker/build-push-action from v3 to v6, and actions/setup-python from v4 to v5.
.github/workflows/helm.yml Upgraded azure/setup-helm from v3 to v4.
.github/workflows/main.yml Upgraded actions/cache from v3 to v4, docker/setup-buildx-action from v2 to v3, docker/build-push-action from v3 to v6, actions/setup-python from v4 to v5, and codecov/codecov-action from v3 to v4.
.github/workflows/schedule.yml Upgraded actions/cache from v3 to v4, docker/setup-buildx-action from v2 to v3, docker/build-push-action from v3 to v6, and actions/setup-python from v4 to v5.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CI/CD Pipeline
    participant Actions

    User->>CI/CD Pipeline: Trigger Workflow
    CI/CD Pipeline->>Actions: Run Updated Actions
    Actions->>CI/CD Pipeline: Execute Steps
    CI/CD Pipeline-->>User: Complete Workflow
Loading

🐇 "In the garden where actions play,
New versions hop in bright array.
With upgrades swift, they leap and bound,
Enhancing flows all around.
So let us cheer, both loud and clear,
For CI/CD, we hold so dear!" 🐇✨

Tip

Announcements
  • The review status is no longer posted as a separate comment when there are no actionable or nitpick comments. In such cases, the review status is included in the walkthrough comment.
  • We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.
  • Possibly related PRs: Walkthrough comment now includes a list of potentially related PRs to help you recall past context. Please share any feedback in the discussion post on our Discord.
  • Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs in the walkthrough comment. You can also provide custom labeling instructions in the UI or configuration file.
  • Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 47c1e9c and f7632b3.

Files selected for processing (8)
  • .github/workflows/cache.yml (3 hunks)
  • .github/workflows/codeql-analysis.yml (3 hunks)
  • .github/workflows/comment.yml (1 hunks)
  • .github/workflows/docs.yml (1 hunks)
  • .github/workflows/full.yml (4 hunks)
  • .github/workflows/helm.yml (1 hunks)
  • .github/workflows/main.yml (5 hunks)
  • .github/workflows/schedule.yml (4 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/codeql-analysis.yml
Additional context used
actionlint
.github/workflows/schedule.yml

122-122: property "search_cache" is not defined in object type {build: {outputs: {}; result: string}}

(expression)

Additional comments not posted (24)
.github/workflows/cache.yml (5)

20-20: LGTM!

The version upgrade of the actions/cache action for the server cache is approved.


29-29: LGTM!

The version upgrade of the actions/cache action for the UI cache is approved.


39-39: LGTM!

The version upgrade of the docker/setup-buildx-action is approved.


42-42: Verify the caching functionality.

The significant version upgrade of the docker/build-push-action for the CVAT Server caching step is approved.

However, due to the magnitude of the version change, please ensure that the caching functionality works as expected by thoroughly testing it.


50-50: Verify the caching functionality.

The significant version upgrade of the docker/build-push-action for the CVAT UI caching step is approved.

However, due to the magnitude of the version change, please ensure that the caching functionality works as expected by thoroughly testing it.

.github/workflows/docs.yml (1)

62-62: LGTM!

The version upgrade of the peaceiris/actions-gh-pages action is approved.

.github/workflows/comment.yml (1)

32-32: Verify the script functionality.

The significant version upgrade of the actions/github-script action is approved.

However, due to the magnitude of the version change, please ensure that the script functionality works as expected by thoroughly testing it.

.github/workflows/helm.yml (1)

45-45: LGTM, but verify the action version upgrade.

The code changes are approved.

However, ensure that the version upgrade of azure/setup-helm action from v3 to v4 is thoroughly tested to confirm that it behaves as expected and does not introduce any breaking changes or compatibility issues with the specified Helm version v3.9.4.

Run the following script to verify the action version upgrade:

.github/workflows/full.yml (5)

32-32: LGTM!

The code changes are approved.


38-38: LGTM!

The code changes are approved.


103-103: LGTM!

The code changes are approved.


44-44: LGTM, but verify the action version upgrade.

The code changes are approved.

However, ensure that the version upgrade of docker/setup-buildx-action action from v2 to v3 is thoroughly tested to confirm that it behaves as expected and does not introduce any breaking changes or compatibility issues with the Docker Buildx setup.

Run the following script to verify the action version upgrade:

Verification successful

Version upgrade verified successfully.

The docker/setup-buildx-action has been correctly updated to version v3 in the .github/workflows/full.yml file.

  • Line 44: uses: docker/setup-buildx-action@v3
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the version upgrade of `docker/setup-buildx-action` action.

# Test: Search for the action usage. Expect: Only occurrences of the new version.
rg --type yaml -A 5 $'docker/setup-buildx-action'

Length of output: 48


Script:

#!/bin/bash
# Description: Verify the specific usage of `docker/setup-buildx-action@v3` in the workflow file.

# Search for the specific line indicating the use of version v3 in the workflow file.
rg --type yaml 'uses: docker/setup-buildx-action@v3' .github/workflows/full.yml

Length of output: 125


Line range hint 53-62: LGTM, but thoroughly test the action version upgrade.

The code changes are approved.

However, the version upgrade of docker/build-push-action action from v3 to v6 is a significant jump, which may introduce major changes, new features, or breaking changes in the build and push functionalities.

Ensure that the version upgrade is thoroughly tested to confirm that it behaves as expected, does not introduce any compatibility issues, and integrates well with the existing configurations such as the cache, context, file, tags, and outputs.

Run the following script to verify the action version upgrade:

Verification successful

Version Upgrade Confirmed: Thorough Testing Recommended

The docker/build-push-action has been upgraded to version v6 in the .github/workflows/full.yml file for both server and UI builds. Ensure thorough testing of this upgrade to verify compatibility and functionality with existing configurations.

  • File: .github/workflows/full.yml
  • Lines: Confirmed usage of docker/build-push-action@v6
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the version upgrade of `docker/build-push-action` action.

# Test: Search for the action usage. Expect: Only occurrences of the new version.
rg --type yaml -A 10 $'docker/build-push-action'

Length of output: 47


Script:

#!/bin/bash
# Re-run the search for `docker/build-push-action` in YAML files with more context.
rg --type yaml -A 15 'docker/build-push-action'

Length of output: 47


Script:

#!/bin/bash
# Use ast-grep to search for `docker/build-push-action` in the specific file mentioned in the review comment.
ast-grep --lang yaml --pattern 'docker/build-push-action@v$_' .github/workflows/full.yml

Length of output: 199


Script:

#!/bin/bash
# Use rg to search for `docker/build-push-action` in the specific file mentioned in the review comment.
rg 'docker/build-push-action' .github/workflows/full.yml -A 5

Length of output: 443

.github/workflows/schedule.yml (6)

58-58: LGTM!

The code changes are approved.


64-64: LGTM!

The code changes are approved.


114-114: LGTM!

The code changes are approved.


119-119: LGTM!

The code changes are approved.


Line range hint 89-99: LGTM, but thoroughly test the action version upgrade.

The code changes are approved.

However, the version upgrade of docker/build-push-action action from v3 to v6 is a significant jump, which may introduce major changes, new features, or breaking changes in the build and push functionalities.

Ensure that the version upgrade is thoroughly tested to confirm that it behaves as expected, does not introduce any compatibility issues, and integrates well with the existing configurations such as the cache, context, file, tags, and labels.

Run the following script to verify the action version upgrade:


86-86: LGTM, but verify the action version upgrade.

The code changes are approved.

However, ensure that the version upgrade of docker/setup-buildx-action action from v2 to v3 is thoroughly tested to confirm that it behaves as expected and does not introduce any breaking changes or compatibility issues with the Docker Buildx setup.

Run the following script to verify the action version upgrade:

Verification successful

No additional occurrences of docker/setup-buildx-action@v3 found.

The version upgrade of docker/setup-buildx-action to v3 appears to be isolated to the specified line in the .github/workflows/schedule.yml file. There are no other usages of this action version in the repository. Please ensure that this change is tested to confirm expected behavior.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the version upgrade of `docker/setup-buildx-action` action.

# Test: Search for the action usage. Expect: Only occurrences of the new version.
rg --type yaml -A 5 $'docker/setup-buildx-action'

Length of output: 48


Script:

#!/bin/bash
# Re-run the search with a more specific pattern to ensure that the action usage is correctly identified.
ast-grep --lang yaml --pattern $'uses: docker/setup-buildx-action@v3'

Length of output: 179


Script:

#!/bin/bash
# Use rg to search for the specific usage of docker/setup-buildx-action@v3 in YAML files.
rg --type yaml 'uses: docker/setup-buildx-action@v3'

Length of output: 54

.github/workflows/main.yml (5)

42-42: LGTM!

The update to actions/cache@v4 is a good practice to ensure the latest features and bug fixes are being used.


54-54: LGTM!

The update to docker/setup-buildx-action@v3 is a good practice to ensure the latest features and bug fixes are being used.


63-63: Verify compatibility of docker/build-push-action@v6.

The update skips multiple major versions from v3 to v6, which could potentially introduce breaking changes.

Please review the docker/build-push-action changelog to ensure compatibility with the current workflow and confirm that the version update does not introduce any breaking changes.


139-139: LGTM!

The update to actions/setup-python@v5 is a good practice to ensure the latest features and bug fixes are being used.


453-453: LGTM!

The update to codecov/codecov-action@v4 is a good practice to ensure the latest features and bug fixes are being used.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

@SpecLad SpecLad changed the title Upgrade GitHub Actions to remove dependencies on Node 16 Upgrade GitHub Actions to remove dependencies on Node 12/16 Sep 10, 2024
Copy link

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.58%. Comparing base (0fafb79) to head (f7632b3).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7459      +/-   ##
===========================================
- Coverage    83.60%   83.58%   -0.02%     
===========================================
  Files          397      397              
  Lines        41906    41906              
  Branches      3883     3883              
===========================================
- Hits         35034    35027       -7     
- Misses        6872     6879       +7     
Components Coverage Δ
cvat-ui 79.53% <ø> (-0.04%) ⬇️
cvat-server 87.18% <ø> (ø)

@SpecLad SpecLad merged commit becbbca into cvat-ai:develop Sep 10, 2024
34 checks passed
@SpecLad SpecLad deleted the bump-actions branch September 10, 2024 15:53
bschultz96 pushed a commit to bschultz96/cvat that referenced this pull request Sep 12, 2024
…7459)

This is a followup to cvat-ai#7442. I didn't realize there were so many
outdated actions. 🙂

This should update every remaining action with a Node 12/16 dependency.
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