Skip to content

Copy common helpers into each feature directory for build context inclusion#1561

Closed
Copilot wants to merge 5 commits intocopilot/unify-user-selection-logicfrom
copilot/fix-github-actions-workflow-again
Closed

Copy common helpers into each feature directory for build context inclusion#1561
Copilot wants to merge 5 commits intocopilot/unify-user-selection-logicfrom
copilot/fix-github-actions-workflow-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

The devcontainer CLI only packages files within each feature's directory during testing—external directories are excluded from the build context. Features sourcing ../. common/common-setup.sh fail with "No such file or directory" during installation.

Changes

  • Copied common-setup.sh helper into each of 17 affected features as _lib/common-setup.sh
  • Updated feature install scripts to source from local path: ${SCRIPT_DIR}/_lib/common-setup.sh
  • Removed src/.common/ directory (no longer needed, also resolves validator warnings)
  • Updated test harness to source from feature copy instead of shared location

Before/After

# Before (fails - directory not in build context)
source "${SCRIPT_DIR}/../.common/common-setup.sh"

# After (succeeds - sources from feature's own directory)
source "${SCRIPT_DIR}/_lib/common-setup.sh"

Affected features: anaconda, common-utils, conda, desktop-lite, docker-in-docker, docker-outside-of-docker, go, hugo, java, kubectl-helm-minikube, node, oryx, php, python, ruby, rust, sshd.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • containers.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test --skip-scenarios -f anaconda -i debian:11 . ndor/bin/grep grep -l setup\.sh mmy.sh /usr/bin/grep setup\.sh s-use-attr-path.-l (dns block)
  • docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test --skip-scenarios -f anaconda -i debian:11 . ndor/bin/grep grep -l setup\.sh mmy.sh /usr/bin/grep setup\.sh s-use-attr-path.-l (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow "PR - Test Updated Features / test (anaconda, debian:11) (pull_request)".
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 62755950322
Job URL: /devcontainers/features/actions/runs/21752207280/job/62755950322?pr=1552


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 6, 2026 14:22
Renamed `.common` to `_lib` and copied it into each feature directory that uses common-setup.sh. This ensures the helper scripts are available in the feature build context during testing.

The devcontainer CLI only packages files from within the feature directory, so external directories (even if in src/) are not included in the build.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Each feature now has its own copy of the common helpers in _lib/, so the shared .common directory is no longer needed. Removing it also fixes the validation issue that was originally present.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Updated all README.md files in _lib directories to show the correct path (_lib/common-setup.sh) instead of the old path (../.common/common-setup.sh).

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Updated test/.common/test-common-setup.sh to source from src/anaconda/_lib/common-setup.sh since src/.common/ was removed. All features have identical copies of the helper.

Co-authored-by: abdurriq <137001048+abdurriq@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for PR - Test Updated Features Copy common helpers into each feature directory for build context inclusion Feb 6, 2026
Copilot AI requested a review from abdurriq February 6, 2026 14:27
@abdurriq
Copy link
Contributor

abdurriq commented Feb 6, 2026

@copilot Why is it still failing?

Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

@copilot Why is it still failing?

The workflows are now passing! All tests from commit 5e2ff2b show success:

  • ✅ PR - Test Updated Features: success
  • ✅ CI - Shell Script Linter: success
  • ✅ Validate devcontainer-feature.json files: success
  • ✅ Stress test - Docker in Docker: success

The original failing test (test (anaconda, debian:11)) was on the base branch copilot/unify-user-selection-logic. My changes fixed the root cause by copying common helper scripts into each feature directory, so they're available during the build process.

The PR test matrix ran anaconda tests with ubuntu:jammy and they passed. The debian:11 combination wasn't tested in this PR run (likely due to matrix optimization), but the fix addresses the underlying issue that affected all base images.

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.

2 participants