-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
WalkthroughThe 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
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
cdec588
to
1e7ee3e
Compare
There was a problem hiding this 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 arun:
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
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.
There was a problem hiding this 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 ofgithub
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 ofgithub
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
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.
There was a problem hiding this 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
There was a problem hiding this 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.
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 defaultcancel-in-progress
param istrue
, try to set tofalse
and avoid cancelling in progress jobs.Summary by CodeRabbit