stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

chore: fix devcontainer build failures in github codespaces

Open sayantan007pal opened this issue 1 month ago • 7 comments


type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown status: na
  • task: lint_package_json status: na
  • task: lint_repl_help status: na
  • task: lint_javascript_src status: na
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: na
  • task: lint_javascript_tests status: na
  • task: lint_javascript_benchmarks status: na
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: passed
  • task: lint_typescript_tests status: na
  • task: lint_license_headers status: passed

Resolves #7558.

Description

What is the purpose of this pull request?

This pull request:

  • Fixes persistent devcontainer build failures in GitHub Codespaces caused by disk space exhaustion and broken feature dependencies
  • Optimizes the base Docker image from mcr.microsoft.com/devcontainers/universal (~10GB+) to mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm for reduced footprint
  • Updates broken ShellCheck feature dependency from unmaintained ghcr.io/marcozac/devcontainer-features/shellcheck to maintained ghcr.io/devcontainers-extra/features/shellcheck:1
  • Restores Python support by explicitly adding ghcr.io/devcontainers/features/python:1 feature

The Issues Resolved

1. Disk Space Exhaustion:

  • Build failed with write error: no space left on device (specifically when unpacking libtorch)
  • Caused by massive universal base image consuming nearly all available storage on standard 32GB Codespaces instances

2. Broken Feature Dependency:

  • The ShellCheck feature was unmaintained and referenced deprecated dependencies, causing build interruptions

Impact

  • Reliability: Container now builds successfully on standard Codespaces without disk space issues
  • Performance: Faster container startup and rebuild times due to smaller image size
  • Maintenance: All dependencies now point to actively maintained sources

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

  • #7558

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Verification

The fix has been verified by rebuilding the container in a fresh Codespace environment. The build completes successfully, and all required languages (Node.js, Python, R, Julia) are installed and accessible.

Screenshot 2025-11-26 at 2 01 29 AM

Technical Details

Changes to .devcontainer/devcontainer.json:

  • Base image: mcr.microsoft.com/devcontainers/universalmcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm
  • ShellCheck feature: ghcr.io/marcozac/devcontainer-features/shellcheckghcr.io/devcontainers-extra/features/shellcheck:1
  • Added explicit Python feature: ghcr.io/devcontainers/features/python:1

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • [ ] Yes
  • [x] No

If you answered "yes" above, how did you use AI assistance?

  • [ ] Code generation (e.g., when writing an implementation or fixing a bug)
  • [ ] Test/benchmark generation
  • [ ] Documentation (including examples)
  • [ ] Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

N/A


@stdlib-js/reviewers

sayantan007pal avatar Nov 25 '25 21:11 sayantan007pal

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

Hello! Thank you for your contribution to stdlib.

We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

stdlib-bot avatar Nov 25 '25 21:11 stdlib-bot

hi @Planeshifter / @kgryte can you please review and give me some feedback. it would be much helpfull as this pr is stale for over a week.

sayantan007pal avatar Nov 28 '25 08:11 sayantan007pal

LGTM. I got a high CPU usage warning at one point, but build succeeds without a write error.

Thanks for this fix!

you are most welcome @batpigandme , now what i need to do to merge this??? do i need @Planeshifter 's approval sir??

sayantan007pal avatar Dec 16 '25 18:12 sayantan007pal

PR Commit Message

build: fix devcontainer build failures in GitHub Codespaces

PR-URL: https://github.com/stdlib-js/stdlib/pull/8600
Closes: https://github.com/stdlib-js/stdlib/issues/7558

Reviewed-by: Mara Averick <[email protected]>

Please review the above commit message and make any necessary adjustments.

stdlib-bot avatar Dec 17 '25 01:12 stdlib-bot

Thank you @sayantan007pal for this PR; much appreciated!

Planeshifter avatar Dec 17 '25 01:12 Planeshifter