-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: Update azure-pipeline.yml #51737
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request focus on modifying the Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (3)
azure-pipeline.yml (3)
Line range hint
27-29
: Consider security improvements for script downloads.The pipeline downloads setup scripts directly from raw.githubusercontent.com without version pinning or integrity verification. This could pose security risks and reliability issues.
Consider these improvements:
- Pin to specific commit hashes
- Add checksum verification
- Consider vendoring these scripts in the repository
- wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh + # Example with commit hash pinning and checksum verification + wget https://raw.githubusercontent.com/bioconda/bioconda-common/<commit-hash>/{common,install-and-set-up-conda,configure-conda}.sh + echo "<expected-sha256sum> common.sh" | sha256sum -c + echo "<expected-sha256sum> install-and-set-up-conda.sh" | sha256sum -c + echo "<expected-sha256sum> configure-conda.sh" | sha256sum -cAlso applies to: 71-73, 119-121
🧰 Tools
🪛 yamllint
[error] 6-6: trailing spaces
(trailing-spaces)
Line range hint
82-102
: Optimize Docker image artifact handling.The current Docker image compression process might be resource-intensive and could contribute to the mentioned memory issues.
Consider these optimizations:
- Use multi-stage builds to reduce image size before compression
- Implement size limits for artifacts
- Add error handling for the compression process
- Consider using Azure's built-in container registry tasks
docker image ls --format='{{.Repository}}:{{.Tag}}' | \ { grep biocontainers || true ; } | \ xargs -n1 -P4 bash -c ' test -n "${1+x}" || exit 0 + # Add size check + size=$(docker image inspect "${1}" --format='{{.Size}}') + if [ "$size" -gt 2000000000 ]; then # 2GB limit + echo "Image ${1} exceeds size limit, skipping..." + exit 0 + fi echo "Start compressing docker image ${1} ..." - docker save "${1}" | gzip -c > "${1##*/}.tar.gz" + docker save "${1}" | gzip -c > "${1##*/}.tar.gz" || { + echo "Failed to compress ${1}" + exit 1 + } echo "Finished compressing docker image ${1} ." ' --🧰 Tools
🪛 yamllint
[error] 6-6: trailing spaces
(trailing-spaces)
Line range hint
13-157
: Reduce code duplication across stages.The pipeline has significant code duplication across the three stages, particularly in setup steps and artifact handling.
Consider these improvements:
- Use YAML templates to share common steps
- Create reusable task groups for setup procedures
- Centralize artifact handling logic
Example template structure:
# templates/setup-steps.yml steps: - bash: echo "##vso[task.prependpath]/opt/mambaforge/bin" displayName: Add conda to PATH - template: download-scripts.yml - template: configure-conda.yml # templates/artifact-handling.yml parameters: platform: '' steps: - bash: | mkdir -p /tmp/artifacts/packages # ... shared artifact logic ... displayName: Prepare ${{ parameters.platform }} artifactsThen reference these in the main pipeline:
stages: - stage: lint jobs: - job: lint steps: - template: templates/setup-steps.yml - template: templates/lint-steps.yml - stage: test_linux jobs: - job: test_linux steps: - template: templates/setup-steps.yml - template: templates/test-steps.yml parameters: platform: linux - template: templates/artifact-handling.yml parameters: platform: linux🧰 Tools
🪛 yamllint
[error] 6-6: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- azure-pipeline.yml (1 hunks)
🔇 Additional comments (1)
azure-pipeline.yml (1)
Line range hint
1-11
: Verify GitHub Actions setup and update documentation.While disabling Azure pipeline triggers in favor of GitHub Actions is reasonable due to memory issues, we should ensure:
- GitHub Actions workflows are properly configured to handle all necessary CI tasks
- Documentation is updated to reflect this change in CI process
Let's verify the GitHub Actions setup:
🧰 Tools
🪛 yamllint
[error] 6-6: trailing spaces
(trailing-spaces)
Azure popped back into new PRs. I think
trigger: none
is not enough and it needspr: none