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

Fresh clone won't successfully build dev container #83

Closed
davet2001 opened this issue Mar 7, 2023 · 4 comments · Fixed by #85 or #90
Closed

Fresh clone won't successfully build dev container #83

davet2001 opened this issue Mar 7, 2023 · 4 comments · Fixed by #85 or #90

Comments

@davet2001
Copy link
Contributor

This could be a problem with my setup, but I'm not sure what ths issue is.

Steps to reproduce:

  1. git clone https://github.com/microsoft/python-package-template.git
  2. Open new folder in vscode
  3. Click reopen in container

What I expected to happen:
Container builds

What actually happens:

[19 ms] Dev Containers 0.282.0 in VS Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb).
[19 ms] Start: Resolving Remote
[27 ms] Setting up container for folder or workspace: /home/dave/dev/python-package-template
[45 ms] Start: Check Docker is running
[45 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[103 ms] Server API version: 1.42
[103 ms] Start: Run: docker volume ls -q
[157 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/dave/dev/python-package-template --filter label=vsch.quality=stable
[219 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/dave/dev/python-package-template --filter label=devcontainer.config_file=/home/dave/dev/python-package-template/.devcontainer/devcontainer.json
[266 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/dave/dev/python-package-template
[313 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/dave/dev/python-package-template
[359 ms] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/dave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-8ec073a0-9e7f-483c-895e-23f8769211a01678227224650 --workspace-folder /home/dave/dev/python-package-template --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/dave/dev/python-package-template --id-label devcontainer.config_file=/home/dave/dev/python-package-template/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/dave/dev/python-package-template/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[554 ms] (node:24120) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[555 ms] (Use `code --trace-deprecation ...` to show where the warning was created)
[555 ms] @devcontainers/cli 0.31.0. Node.js v16.14.2. linux 5.15.0-58-generic x64.
[555 ms] Start: Run: docker buildx version
[633 ms] github.com/docker/buildx v0.10.2 00ed17d
[633 ms] 
[633 ms] Start: Resolving Remote
[636 ms] Start: Run: git rev-parse --show-cdup
[639 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/dave/dev/python-package-template --filter label=devcontainer.config_file=/home/dave/dev/python-package-template/.devcontainer/devcontainer.json
[687 ms] Start: Run: docker inspect --type image mcr.microsoft.com/vscode/devcontainers/miniconda:0-3
[1587 ms] local container features stored at: /home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/node_modules/vscode-dev-containers/container-features
[1591 ms] Start: Run: tar --no-same-owner -x -f -
[1637 ms] * Processing feature: azure-cli
[1637 ms] (!) WARNING: Using the deprecated 'azure-cli' Feature. See https://github.com/devcontainers/features/tree/main/src/azure-cli#example-usage for the updated Feature.
[2504 ms] * Fetching feature: azure-cli_1_oci
[2919 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-dave/container-features/0.31.0-1678227226595/Dockerfile-with-features -t vsc-python-package-template-dea278e8e0a73c483ed75e5dfd0e7447 --target dev_containers_target_stage --build-arg NODE_VERSION=none --build-context dev_containers_feature_content_source=/tmp/devcontainercli-dave/container-features/0.31.0-1678227226595 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/dave/dev/python-package-template
[+] Building 14.2s (15/20)                                                      
 => [internal] load build definition from Dockerfile-with-features         0.0s
 => => transferring dockerfile: 6.18kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => resolve image config for docker.io/docker/dockerfile:1.4               0.8s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531b  0.0s
 => [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/m  0.2s
 => [context dev_containers_feature_content_source] load .dockerignore     0.0s
 => => transferring dev_containers_feature_content_source: 2B              0.0s
 => [context dev_containers_feature_content_source] load from client       0.0s
 => => transferring dev_containers_feature_content_source: 306.52kB        0.0s
 => [dev_container_auto_added_stage_label 1/7] FROM mcr.microsoft.com/vsc  0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 1.87kB                                        0.0s
 => CACHED [dev_container_auto_added_stage_label 2/7] RUN if [ "none" !=   0.0s
 => CACHED [dev_container_auto_added_stage_label 3/7] COPY environment.ym  0.0s
 => CACHED [dev_container_auto_added_stage_label 4/7] RUN if [ -f "/tmp/c  0.0s
 => CACHED [dev_container_auto_added_stage_label 5/7] RUN conda install -  0.0s
 => CACHED [dev_container_auto_added_stage_label 6/7] COPY .pre-commit-co  0.0s
 => ERROR [dev_container_auto_added_stage_label 7/7] RUN git init . && p  12.9s
------                                                                          
 > [dev_container_auto_added_stage_label 7/7] RUN git init . && pre-commit install-hooks:
#0 0.315 hint: Using 'master' as the name for the initial branch. This default branch name
#0 0.315 hint: is subject to change. To configure the initial branch name to use in all
#0 0.315 hint: of your new repositories, which will suppress this warning, call:
#0 0.315 hint: 
#0 0.315 hint:  git config --global init.defaultBranch <name>
#0 0.315 hint: 
#0 0.315 hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
#0 0.315 hint: 'development'. The just-created branch can be renamed via this command:
#0 0.315 hint: 
#0 0.315 hint:  git branch -m <name>
#0 0.316 Initialized empty Git repository in /.git/
#0 0.453 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
#0 1.298 [INFO] Initializing environment for https://github.com/PyCQA/isort.
#0 3.267 [INFO] Initializing environment for https://github.com/asottile/pyupgrade.
#0 4.104 [INFO] Initializing environment for https://github.com/hadialqattan/pycln.
#0 5.183 [INFO] Initializing environment for https://github.com/codespell-project/codespell.
#0 6.183 [INFO] Initializing environment for https://github.com/pre-commit/pygrep-hooks.
#0 6.942 [INFO] Initializing environment for https://github.com/mgedmin/check-manifest.
#0 7.721 [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
#0 7.721 [INFO] Once installed this environment will be reused.
#0 7.721 [INFO] This may take a few minutes...
#0 10.64 [INFO] Installing environment for https://github.com/PyCQA/isort.
#0 10.64 [INFO] Once installed this environment will be reused.
#0 10.64 [INFO] This may take a few minutes...
#0 12.83 An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repo73dmi5u3/py_env-python3/bin/python', '-mpip', 'install', '.')
#0 12.83 return code: 1
#0 12.83 stdout:
#0 12.83     Processing /root/.cache/pre-commit/repo73dmi5u3
#0 12.83       Installing build dependencies: started
#0 12.83       Installing build dependencies: finished with status 'done'
#0 12.83       Getting requirements to build wheel: started
#0 12.83       Getting requirements to build wheel: finished with status 'done'
#0 12.83       Preparing metadata (pyproject.toml): started
#0 12.83       Preparing metadata (pyproject.toml): finished with status 'error'
#0 12.83 stderr:
#0 12.83       error: subprocess-exited-with-error
#0 12.83       
#0 12.83       × Preparing metadata (pyproject.toml) did not run successfully.
#0 12.83       │ exit code: 1
#0 12.83       ╰─> [14 lines of output]
#0 12.83           Traceback (most recent call last):
#0 12.83             File "/root/.cache/pre-commit/repo73dmi5u3/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#0 12.83               main()
#0 12.83             File "/root/.cache/pre-commit/repo73dmi5u3/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#0 12.83               json_out['return_val'] = hook(**hook_input['kwargs'])
#0 12.83             File "/root/.cache/pre-commit/repo73dmi5u3/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
#0 12.83               return hook(metadata_directory, config_settings)
#0 12.83             File "/tmp/pip-build-env-cj2uaj8h/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 40, in prepare_metadata_for_build_wheel
#0 12.83               poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
#0 12.83             File "/tmp/pip-build-env-cj2uaj8h/overlay/lib/python3.8/site-packages/poetry/core/factory.py", line 57, in create_poetry
#0 12.83               raise RuntimeError("The Poetry configuration is invalid:\n" + message)
#0 12.83           RuntimeError: The Poetry configuration is invalid:
#0 12.83             - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'
#0 12.83           
#0 12.83           [end of output]
#0 12.83       
#0 12.83       note: This error originates from a subprocess, and is likely not a problem with pip.
#0 12.83     error: metadata-generation-failed
#0 12.83     
#0 12.83     × Encountered error while generating package metadata.
#0 12.83     ╰─> See above for output.
#0 12.83     
#0 12.83     note: This is an issue with the package mentioned above, not pip.
#0 12.83     hint: See above for details.
#0 12.83 Check the log at /root/.cache/pre-commit/pre-commit.log
------
Dockerfile-with-features:26
--------------------
  24 |     
  25 |     COPY .pre-commit-config.yaml .
  26 | >>> RUN git init . && pre-commit install-hooks
  27 |     
  28 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git init . && pre-commit install-hooks" did not complete successfully: exit code: 3
[17577 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-dave/container-features/0.31.0-1678227226595/Dockerfile-with-features -t vsc-python-package-template-dea278e8e0a73c483ed75e5dfd0e7447 --target dev_containers_target_stage --build-arg NODE_VERSION=none --build-context dev_containers_feature_content_source=/tmp/devcontainercli-dave/container-features/0.31.0-1678227226595 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/dave/dev/python-package-template
[17577 ms]     at hie (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:1931:1698)
[17578 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[17578 ms]     at async FF (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:1930:3910)
[17578 ms]     at async S7 (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:1930:2839)
[17579 ms]     at async xie (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:1945:2625)
[17579 ms]     at async Wf (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:1945:3750)
[17579 ms]     at async noe (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:2069:17325)
[17580 ms]     at async roe (/home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js:2069:17066)
[17587 ms] Exit code 1
[17591 ms] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/dave/.vscode/extensions/ms-vscode-remote.remote-containers-0.282.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/dave/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-8ec073a0-9e7f-483c-895e-23f8769211a01678227224650 --workspace-folder /home/dave/dev/python-package-template --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/dave/dev/python-package-template --id-label devcontainer.config_file=/home/dave/dev/python-package-template/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/dave/dev/python-package-template/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[17591 ms] Exit code 1
dciborow added a commit that referenced this issue Mar 12, 2023
As per issue #83 build of a fresh checkout fails.

This PR increases the isort version to resolve the issue.

Co-authored-by: Daniel Ciborowski <[email protected]>
@dciborow dciborow linked a pull request Mar 12, 2023 that will close this issue
@dciborow
Copy link
Contributor

thanks for catching this. I will add back in the .pre-commit-config.

@dciborow dciborow linked a pull request Mar 12, 2023 that will close this issue
@Stef16Robbe
Copy link

I have the exact same problem, also after applying the fix in #90.

Any ideas?

Logs:

[7 ms] Dev Containers 0.321.0 in VS Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e).
[7 ms] Start: Resolving Remote
[15 ms] Setting up container for folder or workspace: /home/stef/proj/test-template-2
[69 ms] Start: Check Docker is running
[70 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[86 ms] Server API version: 1.43
[87 ms] Start: Run: docker volume ls -q
[97 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/home/stef/proj/test-template-2 --filter label=vsch.quality=stable
[108 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/stef/proj/test-template-2 --filter label=devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json
[119 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/stef/proj/test-template-2
[130 ms] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/stef/proj/test-template-2 --id-label devcontainer.local_folder=/home/stef/proj/test-template-2 --id-label devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/stef/proj/test-template-2/.devcontainer/devcontainer.json --mount-workspace-git-root
[262 ms] @devcontainers/cli 0.52.1. Node.js v18.15.0. linux 6.6.2-201.fc39.x86_64 x64.
[262 ms] Start: Run: git rev-parse --show-cdup
[268 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/stef/proj/test-template-2 --filter label=devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json
[282 ms] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/stef/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-cc111ff0-570b-404c-a6cf-dafd853ce0581701374112969 --workspace-folder /home/stef/proj/test-template-2 --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/stef/proj/test-template-2 --id-label devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/stef/proj/test-template-2/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[413 ms] @devcontainers/cli 0.52.1. Node.js v18.15.0. linux 6.6.2-201.fc39.x86_64 x64.
[413 ms] Start: Run: docker buildx version
[455 ms] github.com/docker/buildx v0.11.2 9872040
[455 ms] 
[455 ms] Start: Resolving Remote
[457 ms] Start: Run: git rev-parse --show-cdup
[506 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/stef/proj/test-template-2 --filter label=devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json
[519 ms] Start: Run: docker inspect --type image mcr.microsoft.com/devcontainers/python:3
[847 ms] local container features stored at: /home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/node_modules/vscode-dev-containers/container-features
[847 ms] Start: Run: tar --no-same-owner -x -f -
[856 ms] Start: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-stef/container-features/0.52.1-1701374114102/Dockerfile-with-features -t vsc-test-template-2-60f06196c0293bb6c958939cdcefef70d20bc269d1767afdad11ea7e5399ffe5 --target dev_containers_target_stage --no-cache --pull --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/stef/proj/test-template-2
[+] Building 35.9s (10/10) FINISHED                              docker:default
 => [internal] load build definition from Dockerfile-with-features         0.1s
 => => transferring dockerfile: 2.04kB                                     0.0s
 => [internal] load .dockerignore                                          0.1s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for mcr.microsoft.com/devcontainers/python:3  0.1s
 => CACHED [dev_container_auto_added_stage_label 1/6] FROM mcr.microsoft.  0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 197B                                          0.0s
 => [dev_container_auto_added_stage_label 2/6] RUN python -m pip install   3.0s
 => [dev_container_auto_added_stage_label 3/6] COPY pyproject.toml .       0.1s
 => [dev_container_auto_added_stage_label 4/6] RUN touch README.md     &  10.7s 
 => [dev_container_auto_added_stage_label 5/6] COPY .pre-commit-config.ya  0.1s 
 => ERROR [dev_container_auto_added_stage_label 6/6] RUN git init . && p  21.5s 
------                                                                          
 > [dev_container_auto_added_stage_label 6/6] RUN git init . && pre-commit install-hooks:
0.298 hint: Using 'master' as the name for the initial branch. This default branch name
0.298 hint: is subject to change. To configure the initial branch name to use in all
0.298 hint: of your new repositories, which will suppress this warning, call:   
0.298 hint:                                                                     
0.298 hint:     git config --global init.defaultBranch <name>
0.298 hint: 
0.298 hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
0.298 hint: 'development'. The just-created branch can be renamed via this command:
0.298 hint: 
0.298 hint:     git branch -m <name>
0.298 Initialized empty Git repository in /.git/
0.438 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
1.119 [INFO] Initializing environment for https://github.com/PyCQA/isort.
2.031 [INFO] Initializing environment for https://github.com/asottile/pyupgrade.
2.716 [INFO] Initializing environment for https://github.com/hadialqattan/pycln.
3.346 [INFO] Initializing environment for https://github.com/codespell-project/codespell.
4.053 [INFO] Initializing environment for https://github.com/pre-commit/pygrep-hooks.
4.682 [INFO] Initializing environment for https://github.com/mgedmin/check-manifest.
5.268 [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
5.268 [INFO] Once installed this environment will be reused.
5.268 [INFO] This may take a few minutes...
7.729 [INFO] Installing environment for https://github.com/PyCQA/isort.
7.729 [INFO] Once installed this environment will be reused.
7.729 [INFO] This may take a few minutes...
9.392 [INFO] Installing environment for https://github.com/asottile/pyupgrade.
9.392 [INFO] Once installed this environment will be reused.
9.392 [INFO] This may take a few minutes...
11.55 [INFO] Installing environment for https://github.com/hadialqattan/pycln.
11.55 [INFO] Once installed this environment will be reused.
11.55 [INFO] This may take a few minutes...
21.46 An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repo4w1q9rkv/py_env-python3/bin/python', '-mpip', 'install', '.')
21.46 return code: 1
21.46 stdout:
21.46     Processing /root/.cache/pre-commit/repo4w1q9rkv
21.46       Installing build dependencies: started
21.46       Installing build dependencies: finished with status 'done'
21.46       Getting requirements to build wheel: started
21.46       Getting requirements to build wheel: finished with status 'done'
21.46       Preparing metadata (pyproject.toml): started
21.46       Preparing metadata (pyproject.toml): finished with status 'done'
21.46     Collecting libcst<0.4.0,>=0.3.10 (from pycln==1.2.5)
21.46       Downloading libcst-0.3.23-py3-none-any.whl (517 kB)
21.46          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 517.4/517.4 kB 18.1 MB/s eta 0:00:00
21.46     Collecting pathspec<0.10.0,>=0.9.0 (from pycln==1.2.5)
21.46       Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
21.46     Collecting pyyaml<6.0.0,>=5.3.1 (from pycln==1.2.5)
21.46       Downloading PyYAML-5.4.1.tar.gz (175 kB)
21.46          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 18.1 MB/s eta 0:00:00
21.46       Installing build dependencies: started
21.46       Installing build dependencies: finished with status 'done'
21.46       Getting requirements to build wheel: started
21.46       Getting requirements to build wheel: finished with status 'error'
21.46 stderr:
21.46       error: subprocess-exited-with-error
21.46       
21.46       × Getting requirements to build wheel did not run successfully.
21.46       │ exit code: 1
21.46       ╰─> [54 lines of output]
21.46           running egg_info
21.46           writing lib3/PyYAML.egg-info/PKG-INFO
21.46           writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
21.46           writing top-level names to lib3/PyYAML.egg-info/top_level.txt
21.46           Traceback (most recent call last):
21.46             File "/root/.cache/pre-commit/repo4w1q9rkv/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
21.46               main()
21.46             File "/root/.cache/pre-commit/repo4w1q9rkv/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
21.46               json_out['return_val'] = hook(**hook_input['kwargs'])
21.46                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21.46             File "/root/.cache/pre-commit/repo4w1q9rkv/py_env-python3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
21.46               return hook(config_settings)
21.46                      ^^^^^^^^^^^^^^^^^^^^^
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
21.46               return self._get_build_requires(config_settings, requirements=['wheel'])
21.46                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
21.46               self.run_setup()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
21.46               exec(code, locals())
21.46             File "<string>", line 271, in <module>
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
21.46               return distutils.core.setup(**attrs)
21.46                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
21.46               return run_commands(dist)
21.46                      ^^^^^^^^^^^^^^^^^^
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
21.46               dist.run_commands()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
21.46               self.run_command(cmd)
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
21.46               super().run_command(command)
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
21.46               cmd_obj.run()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run
21.46               self.find_sources()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
21.46               mm.run()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 551, in run
21.46               self.add_defaults()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
21.46               sdist.add_defaults(self)
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/command/sdist.py", line 112, in add_defaults
21.46               super().add_defaults()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
21.46               self._add_defaults_ext()
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
21.46               self.filelist.extend(build_ext.get_source_files())
21.46                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21.46             File "<string>", line 201, in get_source_files
21.46             File "/tmp/pip-build-env-qozjjc_0/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
21.46               raise AttributeError(attr)
21.46           AttributeError: cython_sources
21.46           [end of output]
21.46       
21.46       note: This error originates from a subprocess, and is likely not a problem with pip.
21.46     error: subprocess-exited-with-error
21.46     
21.46     × Getting requirements to build wheel did not run successfully.
21.46     │ exit code: 1
21.46     ╰─> See above for output.
21.46     
21.46     note: This error originates from a subprocess, and is likely not a problem with pip.
21.46 Check the log at /root/.cache/pre-commit/pre-commit.log
------
Dockerfile-with-features:14
--------------------
  12 |     
  13 |     COPY .pre-commit-config.yaml .
  14 | >>> RUN git init . && pre-commit install-hooks
  15 |     
  16 |     FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage
--------------------
ERROR: failed to solve: process "/bin/sh -c git init . && pre-commit install-hooks" did not complete successfully: exit code: 3
[36820 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-stef/container-features/0.52.1-1701374114102/Dockerfile-with-features -t vsc-test-template-2-60f06196c0293bb6c958939cdcefef70d20bc269d1767afdad11ea7e5399ffe5 --target dev_containers_target_stage --no-cache --pull --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /home/stef/proj/test-template-2
[36821 ms]     at cAA (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:463:1860)
[36821 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[36821 ms]     at async zw (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:462:1841)
[36822 ms]     at async kK (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:462:610)
[36823 ms]     at async NAA (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:479:3660)
[36823 ms]     at async vC (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[36823 ms]     at async etA (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:613:10941)
[36824 ms]     at async AtA (/home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:613:10682)
[36834 ms] Exit code 1
[36836 ms] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/stef/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/stef/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-cc111ff0-570b-404c-a6cf-dafd853ce0581701374112969 --workspace-folder /home/stef/proj/test-template-2 --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/stef/proj/test-template-2 --id-label devcontainer.config_file=/home/stef/proj/test-template-2/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/stef/proj/test-template-2/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root
[36836 ms] Exit code 1

@TaoK
Copy link

TaoK commented Jan 29, 2024

@Stef16Robbe, FWIW, I believe the error you got is the same as I (much more recently) reported in #151, and finally looked into today, yielding pull request #154. I imagine it's far too late to be useful to you, but commenting just in case!

@Stef16Robbe
Copy link

@TaoK Appreciate the follow-up. I have indeed since moved on, I might test it out for you later on to verify 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants