Skip to content

Conversation

@jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jul 28, 2025

Summary by CodeRabbit

  • Chores
    • Streamlined conda environment setup in deployment and pipeline workflows by updating Miniconda configuration and simplifying channel management. No changes affecting user-facing features.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

The GitHub Actions workflow files were updated to use version v3.2.0 of the conda-incubator/setup-miniconda action instead of v3. The manual creation of a .condarc file was removed, and conda channel configuration is now passed directly as action parameters. No source code or exported entities were changed.

Changes

Cohort / File(s) Change Summary
Deploy Workflow Update
.github/workflows/deploy.yml
Updated to use setup-miniconda@v3.2.0, removed manual .condarc creation, passed conda channel parameters directly including channels: conda-forge and conda-remove-defaults: "true".
Pipeline Workflow Update
.github/workflows/pipeline.yml
Updated all jobs to use setup-miniconda@v3.2.0, removed .condarc creation, set channels and defaults via parameters consistently across jobs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

  • Remove conda default channel #396: Both PRs address conda channel configuration in GitHub Actions workflows, but this PR removes manual .condarc creation while the related PR introduces it; both modify the same workflow steps.

Poem

🐇
In workflows where conda once did dwell,
The .condarc is gone—farewell!
Now channels are set with a line or two,
And actions upgraded, shiny and new.
With v3.2.0, the pipelines hop,
A rabbit’s delight—no need to stop!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d582eea and 93ba29c.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml (1 hunks)
  • .github/workflows/pipeline.yml (13 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/deploy.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/pipeline.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: notebooks_integration
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-mpich.yml)
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-openmpi.yml)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove_conda_channel

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (4adfb3d) to head (93ba29c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #765   +/-   ##
=======================================
  Coverage   97.47%   97.47%           
=======================================
  Files          32       32           
  Lines        1423     1423           
=======================================
  Hits         1387     1387           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

♻️ Duplicate comments (12)
.github/workflows/pipeline.yml (12)

85-91: Duplicate of the comment above – same action tag and boolean quoting issues.


117-123: Duplicate of the comment above – same action tag and boolean quoting issues.


150-156: Duplicate of the comment above – same action tag and boolean quoting issues.


175-181: Duplicate of the comment above – same action tag and boolean quoting issues.


203-209: Duplicate of the comment above – same action tag and boolean quoting issues.


234-240: Duplicate of the comment above – same action tag and boolean quoting issues.


280-286: Duplicate of the comment above – same action tag and boolean quoting issues.


318-324: Duplicate of the comment above – same action tag and boolean quoting issues.


353-359: Duplicate of the comment above – same action tag and boolean quoting issues.


374-379: Duplicate of the comment above – same action tag and boolean quoting issues.


393-399: Duplicate of the comment above – same action tag and boolean quoting issues.


431-437: Duplicate of the comment above – same action tag and boolean quoting issues.

🧹 Nitpick comments (2)
.github/workflows/deploy.yml (1)

22-27: Pin the action to a commit SHA and pass the boolean natively

  1. Security ‒ conda-incubator/setup-miniconda@v3.2.0 is still a mutable tag. Follow GitHub recommendations and pin to the full commit SHA to guard against supply-chain attacks.
  2. Typing ‒ conda-remove-defaults is a boolean input; quoting it ("true") turns it into a YAML string. Although the action coerces strings, passing the native boolean avoids surprises:
-    - uses: conda-incubator/setup-miniconda@v3.2.0
+    - uses: conda-incubator/setup-miniconda@<commit-sha>

-        conda-remove-defaults: "true"
+        conda-remove-defaults: true

Validate that .ci_support/environment-openmpi.yml resolves without the defaults channel; otherwise add explicit conda-forge labels or pin versions.

.github/workflows/pipeline.yml (1)

65-71: Same security & boolean-typing concerns apply here

Repeat the hard-pin + boolean advice for every setup-miniconda@v3.2.0 invocation in this workflow to keep the pipeline homogeneous and secure.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4adfb3d and d582eea.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml (1 hunks)
  • .github/workflows/pipeline.yml (13 hunks)

@jan-janssen
Copy link
Member Author

@liamhuber Even with the new option to remove the default environment, I get the following results:

  /home/runner/miniconda3/condabin/conda config --show-sources --json
  {
    "/home/runner/.condarc": {
      "channels": [
        "conda-forge",
        "defaults"
      ],
      "notify_outdated_conda": false
    },
    "/home/runner/miniconda3/.condarc": {
      "channels": [
        "conda-forge"
      ]
    },
    "cmd_line": {
      "json": true
    }
  }

While with my previous version I explicitly overwrite the configuration in the home folder:

 /home/runner/miniconda3/condabin/conda config --show-sources
  ==> /home/runner/miniconda3/.condarc <==
  channels:
    - conda-forge
  
  ==> /home/runner/.condarc <==
  auto_update_conda: False
  auto_activate_base: True
  changeps1: False
  pkgs_dirs:
    - /home/runner/conda_pkgs_dir
  channels:
    - conda-forge
  always_yes: True
  solver: libmamba

While I agree that using the built-in option requires slightly fewer lines, the appearance of the defaults channel in the configuration file still makes me feel a bit uneasy. So I prefer to stay with the previous version.

@jan-janssen jan-janssen linked an issue Jul 28, 2025 that may be closed by this pull request
@jan-janssen jan-janssen marked this pull request as draft July 28, 2025 07:47
@liamhuber
Copy link
Member

It must just be that here we fail to pass some flag to setup-miniconda. I'm copy-pasting the report from two runs so we can easily look at both

setup-miniconda input log from the centralized actions

Run conda-incubator/setup-miniconda@v3
  with:
    python-version: 3.12
    miniforge-variant: Miniforge3
    miniforge-version: latest
    channels: conda-forge
    conda-remove-defaults: true
    channel-priority: strict
    activate-environment: ./cached-miniforge/my-env
    environment-file: ./environment.yml
    auto-activate-base: true
    auto-update-conda: false
    remove-profiles: true
    conda-solver: libmamba
    clean-patched-environment-file: true
    run-post: true

Here:

Run conda-incubator/setup-miniconda@v3.2.0
  with:
    python-version: 3.13
    miniforge-version: latest
    miniforge-variant: Miniforge3
    channels: conda-forge
    conda-remove-defaults: true
    environment-file: .ci_support/environment-mini.yml
    activate-environment: test
    auto-activate-base: true
    auto-update-conda: false
    remove-profiles: true
    conda-solver: libmamba
    clean-patched-environment-file: true
    run-post: true

@liamhuber
Copy link
Member

@jan-janssen, yeah, the only difference I see is the channel-priority: strict, which you already speculated on in the meeting. Let's hope adding that resolves things!

@jan-janssen jan-janssen force-pushed the remove_conda_channel branch from 7f5ccd8 to 2ff2346 Compare July 28, 2025 14:50
@jan-janssen
Copy link
Member Author

Now I see why I was confused:

 /home/runner/miniconda3/condabin/conda config --show-sources --json
  {
    "/home/runner/.condarc": {
      "channels": [
        "conda-forge",
        "defaults"
      ],
      "notify_outdated_conda": false
    },
    "/home/runner/miniconda3/.condarc": {
      "channels": [
        "conda-forge"
      ]
    },
    "cmd_line": {
      "json": true
    }
  }
  /home/runner/miniconda3/condabin/conda config --remove channels defaults --file /home/runner/.condarc
  Adding pkgs_dir '/home/runner/conda_pkgs_dir'
  /home/runner/miniconda3/condabin/conda config --add pkgs_dirs /home/runner/conda_pkgs_dir
  auto_activate: true
  /home/runner/miniconda3/condabin/conda config --set auto_activate true
  Warning: 
  CondaKeyError: 'auto_activate': unknown parameter
  
  
  
  CondaKeyError: 'auto_activate': unknown parameter
  
  /home/runner/miniconda3/condabin/conda config --set auto_activate_base true
  auto_update_conda: false
  /home/runner/miniconda3/condabin/conda config --set auto_update_conda false
  channel_priority: strict
  /home/runner/miniconda3/condabin/conda config --set channel_priority strict
  solver: libmamba
  /home/runner/miniconda3/condabin/conda config --set solver libmamba
  always_yes: true
  /home/runner/miniconda3/condabin/conda config --set always_yes true
  changeps1: false
  /home/runner/miniconda3/condabin/conda config --set changeps1 false
  /home/runner/miniconda3/condabin/conda config --show-sources
  ==> /home/runner/miniconda3/.condarc <==
  channels:
    - conda-forge
  
  ==> /home/runner/.condarc <==
  auto_update_conda: False
  auto_activate_base: True
  notify_outdated_conda: False
  changeps1: False
  pkgs_dirs:
    - /home/runner/conda_pkgs_dir
  channel_priority: strict
  channels:
    - conda-forge
  always_yes: True
  solver: libmamba

The command /home/runner/miniconda3/condabin/conda config --show-sources is called twice once before the channel is removed and once afterwards. So I basically just looked at the wrong place.

@jan-janssen jan-janssen force-pushed the remove_conda_channel branch from 2ff2346 to d582eea Compare July 28, 2025 16:36
@jan-janssen jan-janssen marked this pull request as ready for review July 28, 2025 17:39
@jan-janssen jan-janssen merged commit d0639b2 into main Jul 28, 2025
31 checks passed
@jan-janssen jan-janssen deleted the remove_conda_channel branch July 28, 2025 17:54
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.

[Feature] Remove manual .condarc creation in continuous integration

3 participants