Skip to content

feat: add support for devcontainers#5366

Open
remyleone wants to merge 2 commits intoscaleway:mainfrom
remyleone:dependabot_devcontainers
Open

feat: add support for devcontainers#5366
remyleone wants to merge 2 commits intoscaleway:mainfrom
remyleone:dependabot_devcontainers

Conversation

@remyleone
Copy link
Member

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


Copilot AI review requested due to automatic review settings March 3, 2026 11:25
@remyleone remyleone changed the title Dependabot devcontainers feat: add support for devcontainers Mar 3, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.53%. Comparing base (fd3b665) to head (642ed33).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5366      +/-   ##
==========================================
- Coverage   55.53%   55.53%   -0.01%     
==========================================
  Files         320      320              
  Lines       72408    72414       +6     
==========================================
  Hits        40212    40212              
- Misses      30702    30708       +6     
  Partials     1494     1494              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Dev Container automation to keep the repository’s development container configuration up to date and continuously validated in CI.

Changes:

  • Add a GitHub Actions workflow that builds/runs the devcontainer and executes go run ./cmd/scw --help.
  • Enable Dependabot updates for the devcontainers ecosystem.
  • Introduce .devcontainer configuration (Dockerfile + devcontainer.json) for local development and CI validation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/devcontainer.yml New CI workflow to build and execute a command inside the devcontainer on PRs.
.github/dependabot.yml Adds monthly Dependabot updates for devcontainer dependencies.
.devcontainer/devcontainer.json Defines the devcontainer build, VS Code settings/extensions, env passthrough, and runtime args.
.devcontainer/Dockerfile Minimal Dockerfile that selects the Go devcontainer base image via VARIANT.
Comments suppressed due to low confidence (1)

.devcontainer/devcontainer.json:11

  • The comment describing valid Go VARIANT values is outdated (mentions 1.18/1.17 and buster/bullseye), but the config now uses dev-1.26-bookworm. Updating these comments to match the actual image/tag scheme used here will reduce confusion for future edits.
			// Update the VARIANT arg to pick a version of Go: 1, 1.18, 1.17
			// Append -bullseye or -buster to pin to an OS version.
			// Use -bullseye variants on local arm64/Apple Silicon.
			"VARIANT": "dev-1.26-bookworm",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


on:
pull_request:
branches: [main]
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow only runs on pull_request events targeting main and does not run for merge_group (merge queue) events, while other CI workflows in this repo run on both. Consider adding merge_group: and (if not intentionally limited) removing the branches: [main] filter so the devcontainer check is consistently enforced for all PR targets and merge-queue runs.

Suggested change
branches: [main]
merge_group:

Copilot uses AI. Check for mistakes.
"NODE_VERSION": "none"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runArgs includes --security-opt seccomp=unconfined and --cap-add=SYS_PTRACE. When this devcontainer is built/run in CI (via .github/workflows/devcontainer.yml), it grants extra container privileges on pull_request code, increasing the blast radius of a compromised build. Consider removing these flags by default, or splitting into a local-dev devcontainer and a CI-safe devcontainer configuration without elevated privileges.

Suggested change
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Note: Avoid elevated container privileges by default, especially in CI.
// If you *must* enable debugging that requires ptrace locally, you can
// temporarily add:
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

Copilot uses AI. Check for mistakes.
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.

3 participants