Skip to content

Commit dc8cf55

Browse files
authored
[conda] - Upgrade incompatible pluggy library to prevent conda installation failure. (#1617)
1 parent 9f086c0 commit dc8cf55

5 files changed

Lines changed: 48 additions & 1 deletion

File tree

src/conda/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "conda",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"name": "Conda",
55
"description": "A cross-platform, language-agnostic binary package manager",
66
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",

src/conda/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ if ! conda --version &> /dev/null ; then
179179
install_user_package cryptography
180180
# Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40897
181181
install_user_package setuptools
182+
183+
install_user_package pluggy
184+
182185
fi
183186

184187
# Display a notice on conda when not running in GitHub Codespaces
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
## Test Conda
9+
check "conda-update-conda" bash -c "conda update -c defaults -y conda"
10+
check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-forge --yes tensorflow"
11+
check "conda-install-pytorch" bash -c "conda create --name test-env -c conda-forge --yes pytorch"
12+
13+
# Report result
14+
reportResults
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Test that conda can install packages without pluggy incompatibility errors
9+
# This validates the fix for the pluggy/conda version mismatch issue where
10+
# conda self-upgrades but the older pluggy lacks the 'wrapper' attribute
11+
check "conda version" conda --version
12+
check "install pyopenssl" conda install -y -c defaults pyopenssl
13+
check "install cryptography" conda install -y -c defaults cryptography
14+
check "conda-forge" conda config --show channels | grep conda-forge
15+
check "if conda-notice.txt exists" cat /usr/local/etc/vscode-dev-containers/conda-notice.txt
16+
17+
# Report result
18+
reportResults

test/conda/scenarios.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,17 @@
77
"addCondaForge": "true"
88
}
99
}
10+
},
11+
"install_conda_package_after_upgrade": {
12+
"image": "ubuntu:noble",
13+
"features": {
14+
"conda": {}
15+
}
16+
},
17+
"conda_channel_creation": {
18+
"image": "ubuntu:noble",
19+
"features": {
20+
"conda": {}
21+
}
1022
}
1123
}

0 commit comments

Comments
 (0)