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: fix concurrency group for publish new docs version #498

Merged
merged 1 commit into from
May 22, 2024

Conversation

bdeneux
Copy link
Contributor

@bdeneux bdeneux commented May 22, 2024

Try to fix the issue with concurrency job when publish a new axoned release that trigger multiple update-versioned-docs jobs at the same time. By default cancel-in-progress param is true, try to set to false and avoid cancelling in progress jobs.

Summary by CodeRabbit

  • Chores
    • Improved concurrency control in documentation update workflow to prevent cancellations of in-progress updates.
    • Modified concurrency settings in workflow for better control.

Copy link
Contributor

coderabbitai bot commented May 22, 2024

Walkthrough

The primary change involves adjusting the concurrency settings in the GitHub Actions workflow for updating versioned documentation. The new configuration establishes a concurrency group and ensures that ongoing jobs are not terminated when new jobs commence. This enhancement is aimed at enhancing the management of parallel workflow executions.

Changes

File Change Summary
.github/workflows/update-versioned-docs.yml Modified concurrency settings to include a group and set cancel-in-progress to false.

🌸 In the realm of code, where actions flow,
A rabbit hops, with changes to bestow.
Concurrency tamed, no tasks to dismiss,
Our docs now update, in harmonious bliss.
🐇✨


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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

@bdeneux bdeneux force-pushed the ci/fix-concurrency-update-docs branch from cdec588 to 1e7ee3e Compare May 22, 2024 07:24
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: 0

Outside diff range and nitpick comments (2)
.github/workflows/update-versioned-docs.yml (2)

Line range hint 57-63: Mitigate potential security risk by using environment variables.

Using direct interpolation of github context data in a run: step can lead to security vulnerabilities. Consider using environment variables to safely pass values:

-          rsync -rmv --include='*/' --include='*.md' --include='*.mdx' --include='*.json' --exclude='*' tmp/${{ github.event.inputs.docs_directory }} ${{ github.event.inputs.section }}
+          rsync -rmv --include='*/' --include='*.md' --include='*.mdx' --include='*.json' --exclude='*' tmp/"$DOCS_DIRECTORY" "$SECTION"

Line range hint 72-75: Mitigate potential security risk by using environment variables.

Similar to a previous comment, consider using environment variables for safer value passing in scripts:

-          yarn run docusaurus docs:version:${{ github.event.inputs.section }} ${{ github.event.inputs.version }}
+          yarn run docusaurus docs:version:"$SECTION" "$VERSION"
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 8816d5b and cdec588.
Files selected for processing (1)
  • .github/workflows/update-versioned-docs.yml (1 hunks)
Additional comments not posted (1)
.github/workflows/update-versioned-docs.yml (1)

3-5: Concurrency settings updated to prevent job cancellations.

This change aligns with the PR objectives to avoid cancelling in-progress jobs when new ones are triggered. It should help in handling multiple jobs more effectively.

@bdeneux bdeneux requested review from ccamel and amimart May 22, 2024 07:27
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: 0

Outside diff range and nitpick comments (2)
.github/workflows/update-versioned-docs.yml (2)

Line range hint 57-63: Security risk: Avoid direct interpolation of github context data in scripts.

To mitigate potential security risks from code injection, use environment variables instead:

- run: |
-   rm -rf ${{ github.event.inputs.section }}/*
-   rsync -rmv --include='*/' --include='*.md' --include='*.mdx' --include='*.json' --exclude='*' tmp/${{ github.event.inputs.docs_directory }} ${{ github.event.inputs.section }}
-   git rm --ignore-unmatch --cached tmp
-   rm -rf .git/modules/tmp
-   rm -rf tmp
+ env:
+   SECTION: ${{ github.event.inputs.section }}
+   DOCS_DIRECTORY: ${{ github.event.inputs.docs_directory }}
+ run: |
+   rm -rf "$SECTION"/*
+   rsync -rmv --include='*/' --include='*.md' --include='*.mdx' --include='*.json' --exclude='*' tmp/"$DOCS_DIRECTORY" "$SECTION"
+   git rm --ignore-unmatch --cached tmp
+   rm -rf .git/modules/tmp
+   rm -rf tmp

Line range hint 72-75: Security risk: Avoid direct interpolation of github context data in scripts.

To mitigate potential security risks from code injection, use environment variables instead:

- run: |
-   yarn
-   yarn run docusaurus docs:version:${{ github.event.inputs.section }} ${{ github.event.inputs.version }}
+ env:
+   SECTION: ${{ github.event.inputs.section }}
+   VERSION: ${{ github.event.inputs.version }}
+ run: |
+   yarn
+   yarn run docusaurus docs:version:"$SECTION" "$VERSION"
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between cdec588 and 1e7ee3e.
Files selected for processing (1)
  • .github/workflows/update-versioned-docs.yml (1 hunks)
Additional comments not posted (1)
.github/workflows/update-versioned-docs.yml (1)

3-5: Concurrency settings updated to prevent job cancellations.

This change aligns with the PR objectives to avoid cancelling in-progress jobs, which should help in handling multiple jobs more efficiently.

Copy link
Member

@bot-anik bot-anik left a comment

Choose a reason for hiding this comment

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

Device URL
desktop http://localhost:3000/

Device URL
mobile http://localhost:3000/

Not what you expected? Are your scores flaky? GitHub runners could be the cause.
Try running on Foo instead

Copy link
Member

@ccamel ccamel left a comment

Choose a reason for hiding this comment

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

Sounds right. 👍 Let's give it a try. It should solve the problem of job cancellations after a release, which are very problematic at the moment.

@bdeneux bdeneux merged commit 8dde834 into main May 22, 2024
12 checks passed
@bdeneux bdeneux deleted the ci/fix-concurrency-update-docs branch May 22, 2024 09:05
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.

4 participants