Skip to content

Commit 5e9552b

Browse files
authored
Merge branch 'main' into feature/pre-commit-hook_support_1138
2 parents 2180b36 + 4ed1c6d commit 5e9552b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+872
-158
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "PR - Test Updated Features (arm64)"
2+
on:
3+
pull_request:
4+
# NOTE: To extend this workflow to other features, add path entries below
5+
# following the same pattern, e.g.:
6+
# - "src/<feature-name>/**"
7+
# - "test/<feature-name>/**"
8+
paths:
9+
- "src/powershell/**"
10+
- "test/powershell/**"
11+
12+
jobs:
13+
detect-changes:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
features: ${{ steps.filter.outputs.changes }}
17+
steps:
18+
- uses: dorny/paths-filter@v3
19+
id: filter
20+
with:
21+
# NOTE: To extend this workflow to other features, add filter entries below
22+
# following the same pattern, e.g.:
23+
# <feature-name>: ./**/<feature-name>/**
24+
filters: |
25+
powershell: ./**/powershell/**
26+
27+
test:
28+
needs: [detect-changes]
29+
runs-on: ubuntu-24.04-arm
30+
continue-on-error: true
31+
strategy:
32+
matrix:
33+
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
34+
baseImage:
35+
[
36+
"ubuntu:focal",
37+
"ubuntu:jammy",
38+
"debian:11",
39+
"debian:12",
40+
"mcr.microsoft.com/devcontainers/base:ubuntu",
41+
"mcr.microsoft.com/devcontainers/base:debian",
42+
"mcr.microsoft.com/devcontainers/base:noble"
43+
]
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: "Install latest devcontainer CLI"
48+
run: npm install -g @devcontainers/cli
49+
50+
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
51+
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
52+
53+
test-scenarios:
54+
needs: [detect-changes]
55+
runs-on: ubuntu-24.04-arm
56+
continue-on-error: true
57+
strategy:
58+
matrix:
59+
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: "Install latest devcontainer CLI"
64+
run: npm install -g @devcontainers/cli
65+
66+
- name: "Testing '${{ matrix.features }}' scenarios"
67+
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated .

src/common-utils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "common-utils",
3-
"version": "2.5.5",
3+
"version": "2.5.6",
44
"name": "Common Utilities",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
66
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"id": "conda",
3-
"version": "1.0.10",
4-
"name": "Conda",
5-
"description": "A cross-platform, language-agnostic binary package manager",
6-
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",
7-
"options": {
8-
"version": {
9-
"type": "string",
10-
"proposals": [
11-
"latest",
12-
"4.11.0",
13-
"4.12.0"
14-
],
15-
"default": "latest",
16-
"description": "Select or enter a conda version."
17-
},
18-
"addCondaForge": {
19-
"type": "boolean",
20-
"default": false,
21-
"description": "Add conda-forge channel to the config?"
22-
}
2+
"id": "conda",
3+
"version": "1.2.5",
4+
"name": "Conda",
5+
"description": "A cross-platform, language-agnostic binary package manager",
6+
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",
7+
"options": {
8+
"version": {
9+
"type": "string",
10+
"proposals": [
11+
"latest",
12+
"4.11.0",
13+
"4.12.0"
14+
],
15+
"default": "latest",
16+
"description": "Select or enter a conda version."
2317
},
24-
"containerEnv": {
25-
"CONDA_DIR": "/opt/conda",
26-
"CONDA_SCRIPT":"/opt/conda/etc/profile.d/conda.sh",
27-
"PATH": "/opt/conda/bin:${PATH}"
28-
},
29-
"customizations": {
30-
"vscode": {
31-
"settings": {
32-
"github.copilot.chat.codeGeneration.instructions": [
33-
{
34-
"text": "This dev container includes the conda package manager pre-installed and available on the `PATH` for data science and Python development. Additional packages installed using Conda will be downloaded from Anaconda or another repository configured by the user. A user can install different versions of Python than the one in this dev container by running a command like: conda install python=3.7"
35-
}
36-
]
37-
}
38-
}
39-
},
40-
"installsAfter": [
41-
"ghcr.io/devcontainers/features/common-utils"
42-
]
18+
"addCondaForge": {
19+
"type": "boolean",
20+
"default": false,
21+
"description": "Add conda-forge channel to the config?"
22+
}
23+
},
24+
"containerEnv": {
25+
"CONDA_DIR": "/opt/conda",
26+
"CONDA_SCRIPT": "/opt/conda/etc/profile.d/conda.sh",
27+
"PATH": "/opt/conda/bin:${PATH}"
28+
},
29+
"customizations": {
30+
"vscode": {
31+
"settings": {
32+
"github.copilot.chat.codeGeneration.instructions": [
33+
{
34+
"text": "This dev container includes the conda package manager pre-installed and available on the `PATH` for data science and Python development. Additional packages installed using Conda will be downloaded from Anaconda or another repository configured by the user. A user can install different versions of Python than the one in this dev container by running a command like: conda install python=3.7"
35+
}
36+
]
37+
}
38+
}
39+
},
40+
"installsAfter": [
41+
"ghcr.io/devcontainers/features/common-utils"
42+
]
4343
}

src/conda/install.sh

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,78 @@ if ! conda --version &> /dev/null ; then
8383
usermod -a -G conda "${USERNAME}"
8484

8585
# Install dependencies
86-
check_packages curl ca-certificates gnupg2
86+
check_packages curl ca-certificates
8787

8888
echo "Installing Conda..."
8989

90-
curl -sS https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > /usr/share/keyrings/conda-archive-keyring.gpg
91-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list
92-
apt-get update -y
93-
94-
CONDA_PKG="conda=${VERSION}-0"
90+
# Download .deb package directly from repository (bypassing SHA1 signature issue)
91+
TEMP_DEB="$(mktemp -t conda_XXXXXX.deb)"
92+
CONDA_REPO_BASE="https://repo.anaconda.com/pkgs/misc/debrepo/conda"
93+
94+
# Determine package filename based on requested version
95+
ARCH="$(dpkg --print-architecture 2>/dev/null || echo "amd64")"
96+
PACKAGES_URL="https://repo.anaconda.com/pkgs/misc/debrepo/conda/dists/stable/main/binary-${ARCH}/Packages"
97+
9598
if [ "${VERSION}" = "latest" ]; then
96-
CONDA_PKG="conda"
99+
# For latest, we need to query the repository to find the current version
100+
echo "Fetching package list to determine latest version..."
101+
CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 30 "^Package: conda$" | head -n 31)
102+
CONDA_VERSION=$(echo "${CONDA_PKG_INFO}" | grep "^Version:" | head -n 1 | awk '{print $2}')
103+
CONDA_FILENAME=$(echo "${CONDA_PKG_INFO}" | grep "^Filename:" | head -n 1 | awk '{print $2}')
104+
105+
if [ -z "${CONDA_VERSION}" ] || [ -z "${CONDA_FILENAME}" ]; then
106+
echo "ERROR: Could not determine latest conda version or filename from ${PACKAGES_URL}"
107+
echo "This may indicate an unsupported architecture or repository unavailability."
108+
rm -f "${TEMP_DEB}"
109+
exit 1
110+
fi
111+
112+
CONDA_PKG_NAME="${CONDA_FILENAME}"
113+
else
114+
# For specific versions, query the Packages file to find the exact filename
115+
echo "Fetching package list to find version ${VERSION}..."
116+
# Search for version pattern - user may specify 4.12.0 but package has 4.12.0-0
117+
CONDA_PKG_INFO=$(curl -fsSL "${PACKAGES_URL}" | grep -A 30 "^Package: conda$" | grep -B 5 -A 25 "^Version: ${VERSION}")
118+
CONDA_FILENAME=$(echo "${CONDA_PKG_INFO}" | grep "^Filename:" | head -n 1 | awk '{print $2}')
119+
120+
if [ -z "${CONDA_FILENAME}" ]; then
121+
echo "ERROR: Could not find conda version ${VERSION} in ${PACKAGES_URL}"
122+
echo "Please verify the version specified is valid."
123+
rm -f "${TEMP_DEB}"
124+
exit 1
125+
fi
126+
127+
CONDA_PKG_NAME="${CONDA_FILENAME}"
97128
fi
98-
99-
check_packages $CONDA_PKG
129+
130+
# Download the .deb package
131+
CONDA_DEB_URL="${CONDA_REPO_BASE}/${CONDA_PKG_NAME}"
132+
echo "Downloading conda package from ${CONDA_DEB_URL}..."
133+
134+
if ! curl -fsSL "${CONDA_DEB_URL}" -o "${TEMP_DEB}"; then
135+
echo "ERROR: Failed to download conda .deb package from ${CONDA_DEB_URL}"
136+
echo "Please verify the version specified is valid."
137+
rm -f "${TEMP_DEB}"
138+
exit 1
139+
fi
140+
141+
# Verify the package was downloaded successfully
142+
if [ ! -f "${TEMP_DEB}" ] || [ ! -s "${TEMP_DEB}" ]; then
143+
echo "ERROR: Conda .deb package file is missing or empty"
144+
rm -f "${TEMP_DEB}"
145+
exit 1
146+
fi
147+
148+
# Install the package using apt (which handles dependencies automatically)
149+
echo "Installing conda package..."
150+
if ! apt-get install -y "${TEMP_DEB}"; then
151+
echo "ERROR: Failed to install conda package"
152+
rm -f "${TEMP_DEB}"
153+
exit 1
154+
fi
155+
156+
# Clean up downloaded package
157+
rm -f "${TEMP_DEB}"
100158

101159
CONDA_SCRIPT="/opt/conda/etc/profile.d/conda.sh"
102160
. $CONDA_SCRIPT

src/docker-in-docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Create child containers *inside* a container, independent from the host's docker
2222
| azureDnsAutoDetection | Allow automatically setting the dockerd DNS server when the installation script detects it is running in Azure | boolean | true |
2323
| dockerDefaultAddressPool | Define default address pools for Docker networks. e.g. base=192.168.0.0/16,size=24 | string | - |
2424
| installDockerBuildx | Install Docker Buildx | boolean | true |
25-
| installDockerComposeSwitch | Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter. | boolean | true |
25+
| installDockerComposeSwitch | Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter. | boolean | false |
2626
| disableIp6tables | Disable ip6tables (this option is only applicable for Docker versions 27 and greater) | boolean | false |
2727

2828
## Customizations

src/docker-in-docker/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "docker-in-docker",
3-
"version": "2.13.0",
3+
"version": "2.14.0",
44
"name": "Docker (Docker-in-Docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
66
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
@@ -53,7 +53,7 @@
5353
},
5454
"installDockerComposeSwitch": {
5555
"type": "boolean",
56-
"default": true,
56+
"default": false,
5757
"description": "Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter."
5858
},
5959
"disableIp6tables": {

src/docker-in-docker/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AZURE_DNS_AUTO_DETECTION="${AZUREDNSAUTODETECTION:-"true"}"
1616
DOCKER_DEFAULT_ADDRESS_POOL="${DOCKERDEFAULTADDRESSPOOL:-""}"
1717
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
1818
INSTALL_DOCKER_BUILDX="${INSTALLDOCKERBUILDX:-"true"}"
19-
INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"true"}"
19+
INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"false"}"
2020
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2121
MICROSOFT_GPG_KEYS_ROLLING_URI="https://packages.microsoft.com/keys/microsoft-rolling.asc"
2222
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal jammy noble"

src/dotnet/devcontainer-feature.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"name": "Dotnet CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
66
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
@@ -12,8 +12,6 @@
1212
"lts",
1313
"none",
1414
"10.0",
15-
"10.0-preview",
16-
"10.0-daily",
1715
"9.0",
1816
"8.0",
1917
"7.0",

src/git/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "git",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"name": "Git (from source)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
66
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",

src/git/install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,16 @@ fi
288288
# Partial version matching
289289
if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then
290290
requested_version="${GIT_VERSION}"
291-
version_list="$(curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/git/git/tags" | grep -oP '"name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"' | sort -rV )"
291+
response_output_file=$(mktemp)
292+
trap 'rm "$response_output_file"' EXIT
293+
294+
http_code=$(curl --silent --output $response_output_file --write-out "%{http_code}" -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/git/git/tags")
295+
version_content=$(cat "$response_output_file")
296+
if [[ ${http_code} -lt 200 || ${http_code} -gt 299 ]] ; then
297+
echo "$version_content" >&2
298+
exit 1
299+
fi
300+
version_list="$(echo "$version_content" | grep -oP '"name":\s*"v\K[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"' | sort -rV )"
292301
if [ "${requested_version}" = "latest" ] || [ "${requested_version}" = "lts" ] || [ "${requested_version}" = "current" ]; then
293302
GIT_VERSION="$(echo "${version_list}" | head -n 1)"
294303
else

0 commit comments

Comments
 (0)