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: Update azure-pipeline.yml #51737

Merged
merged 1 commit into from
Oct 28, 2024
Merged

ci: Update azure-pipeline.yml #51737

merged 1 commit into from
Oct 28, 2024

Conversation

aliciaaevans
Copy link
Contributor

@aliciaaevans aliciaaevans commented Oct 28, 2024

Azure popped back into new PRs. I think trigger: none is not enough and it needs pr: none

Copy link
Contributor

coderabbitai bot commented Oct 28, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request focus on modifying the azure-pipeline.yml configuration file. The primary alterations include disabling pull request (PR) triggers by adding pr: none and setting the overall pipeline trigger to none, which prevents automatic execution on branch events. The pipeline is organized into three main stages: lint, test_linux, and test_osx. Each stage is designed to run on specific virtual machine images, with the lint stage executing environment setup, utility installations, and linting processes using bioconda-utils. The test_linux stage includes additional steps for building packages and managing Docker images, while the test_osx stage mirrors the Linux testing stage but incorporates macOS-specific configurations. These modifications streamline the pipeline by removing automatic triggers and consolidating setup and testing processes across different operating systems, while preserving the core functionalities of linting and testing.

Possibly related PRs

Suggested labels

please review & merge

Suggested reviewers

  • daler
  • bgruening

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.

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 (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:

  1. Pin to specific commit hashes
  2. Add checksum verification
  3. 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 -c

Also 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:

  1. Use multi-stage builds to reduce image size before compression
  2. Implement size limits for artifacts
  3. Add error handling for the compression process
  4. 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:

  1. Use YAML templates to share common steps
  2. Create reusable task groups for setup procedures
  3. 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 }} artifacts

Then 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

📥 Commits

Files that changed from the base of the PR and between 2a57669 and edeb0cb.

📒 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:

  1. GitHub Actions workflows are properly configured to handle all necessary CI tasks
  2. 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)

@bgruening bgruening merged commit c82b1bb into master Oct 28, 2024
6 checks passed
@bgruening bgruening deleted the aliciaaevans-patch-1 branch October 28, 2024 20:47
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