Skip to content

Fix double channel config apply and add initial testing#465

Merged
goanpeca merged 1 commit intoconda-incubator:mainfrom
goanpeca:fix-double-config-apply
Mar 18, 2026
Merged

Fix double channel config apply and add initial testing#465
goanpeca merged 1 commit intoconda-incubator:mainfrom
goanpeca:fix-double-config-apply

Conversation

@goanpeca
Copy link
Copy Markdown
Member

@goanpeca goanpeca commented Mar 16, 2026

Fixes #57

This PR also adds (finally) initial testing with vitest and ci workflow to run them :)

@goanpeca goanpeca self-assigned this Mar 16, 2026
@goanpeca goanpeca requested a review from a team as a code owner March 16, 2026 20:56
Copilot AI review requested due to automatic review settings March 16, 2026 20:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes issue #57 where conda channels were being added twice (once during initial config and again after tool installation), producing spurious warnings. Also introduces vitest for unit testing with a CI workflow.

Changes:

  • Added a reapply parameter to applyCondaConfiguration to skip channels/pkgs_dirs on the second call, preventing duplicate config warnings
  • Added vitest unit tests covering the new reapply behavior
  • Added CI workflow for running tests, bumped several dependency versions

Reviewed changes

Copilot reviewed 8 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/conda.ts Added reapply flag to skip channels/pkgs_dirs on re-application
src/base-tools/index.ts Passes reapply=true to the second config call
src/tests/conda.test.ts New unit tests for the reapply behavior
vitest.config.ts Vitest configuration with coverage thresholds
package.json Added vitest, bumped dependencies
.github/workflows/tests.yml New CI workflow for unit tests
CLAUDE.md New project documentation
tsconfig.json Added node types, excluded vitest config
tsconfig.eslint.json Included vitest config for linting
.gitignore Added coverage directory
package-lock.json Updated lockfile

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated
@goanpeca goanpeca changed the title Fix double config apply Fix double channel config apply Mar 16, 2026
@goanpeca goanpeca changed the title Fix double channel config apply Fix double channel config apply and add initial testing Mar 16, 2026
@goanpeca goanpeca marked this pull request as draft March 17, 2026 13:32
@goanpeca goanpeca force-pushed the fix-double-config-apply branch 2 times, most recently from 11fec2c to 9212116 Compare March 17, 2026 15:06
@goanpeca goanpeca marked this pull request as ready for review March 17, 2026 16:23
@goanpeca goanpeca force-pushed the fix-double-config-apply branch from 9212116 to 7fc0a85 Compare March 17, 2026 16:24
@goanpeca goanpeca merged commit ac90fad into conda-incubator:main Mar 18, 2026
102 checks passed
@goanpeca goanpeca deleted the fix-double-config-apply branch March 18, 2026 16:00
jezdez added a commit to conda/conda that referenced this pull request Apr 16, 2026
Follow-up to #15741. The original experimental branch in
conda-incubator/setup-miniconda#453 has been closed and split into
several non-breaking PRs that have now been merged to
conda-incubator/setup-miniconda@main. This pins the action to the
current main tip (a89f5d4) to measure the combined CI impact, including:

- conda-incubator/setup-miniconda#465 fix double channel config apply
- conda-incubator/setup-miniconda#467 bulk-move extracted pkgs on cleanup
- conda-incubator/setup-miniconda#475 split shell init and activation
- conda-incubator/setup-miniconda#482 channel parsing / URL validation
- conda-incubator/setup-miniconda#486 remove HTML index scraping
- conda-incubator/setup-miniconda#487 parallelize Windows takeown calls
kenodegard pushed a commit to conda/conda that referenced this pull request Apr 23, 2026
conda-incubator/setup-miniconda@v4.0.0 ships a number of performance
improvements:

- conda-incubator/setup-miniconda#465 fix double channel config apply
- conda-incubator/setup-miniconda#467 bulk-move extracted pkgs on cleanup
- conda-incubator/setup-miniconda#475 split shell init and activation
- conda-incubator/setup-miniconda#482 channel parsing / URL validation
- conda-incubator/setup-miniconda#486 remove HTML index scraping
- conda-incubator/setup-miniconda#487 parallelize Windows takeown calls
- conda-incubator/setup-miniconda#488 replace isDefaultEnvironment subprocess with local YAML reads
- conda-incubator/setup-miniconda#489 replace conda config subprocesses with direct .condarc YAML
  writes

v4.0.0 also upgrades the action runtime to Node.js 24.x and switches
the build to ESM, which is the breaking change motivating the major
bump.
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.

Channels added twice

3 participants