Skip to content

feat(dev): add devcontainer and task bootstrap for local, Codespaces, and Droid Computers - #717

Draft
ajalon1 wants to merge 6 commits into
datarobot-oss:mainfrom
ajalon1:aj/get-droid-computers-working
Draft

feat(dev): add devcontainer and task bootstrap for local, Codespaces, and Droid Computers#717
ajalon1 wants to merge 6 commits into
datarobot-oss:mainfrom
ajalon1:aj/get-droid-computers-working

Conversation

@ajalon1

@ajalon1 ajalon1 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

RATIONALE

Standardize the development environment across local machines, GitHub Codespaces, Droid Computers, and CI. A single devcontainer plus task bootstrap gives every environment the same Go toolchain, lint/test tooling, and git hooks with zero manual setup.

Droid Computers supersede Factory Cloud Templates, so the old .factory/ Cloud Template guide and setup scripts are removed in favor of the devcontainer workflow. Prior art: @tsdaemon set up a devcontainer for the app starter template.

CHANGES

  • .devcontainer/devcontainer.json — Go 1.26 (bookworm) image with 4 features: go-task (Taskfile), uv (Python/uv for docs preview), docker-outside-of-docker (task copyright), and github-cli (gh). VS Code Go extension with format-on-save and organize-imports. Lifecycle hooks: updateContentCommand runs sync-go.sh, postCreateCommand runs task bootstrap.
  • .devcontainer/sync-go.sh — upgrades the image's Go toolchain to the exact version required by go.mod when they differ.
  • Taskfile.yaml — new task bootstrap: verifies Go version, installs tools, wires up lefthook git hooks, and builds ./dist/dr.
  • Docs — new docs/development/devcontainer.md; docs/development/setup.md and README updated; mkdocs nav entry added.
  • .factory/ cleanup — removed Cloud Template guide and setup scripts superseded by Droid Computers; README rewritten accordingly.

TESTING

  • Normal clone via @devcontainers/cli (not a bare-repo worktree — see known limitations)
  • GitHub Codespaces: create a codespace on this branch, confirm task bootstrap runs and ./dist/dr self version works
  • Droid Computer

Known limitations (observed while testing from a bare-repo worktree in Zed):

  • fatal: not a git repository inside the container: the worktree's .git file points to a host path that is not mounted into the container. Use a normal clone.
  • ./dist/dr: cannot execute binary file: Exec format error: dist/ is bind-mounted and shared with the host, so a macOS-built binary won't run in the Linux container (and vice versa). Rebuild with task build in whichever environment you're using.

TODO

  • Investigate whether CI (GitHub Actions / Harness) can reuse the devcontainer for builds.

PR Automation

Comment-Commands: Trigger CI by commenting on the PR:

  • /trigger-smoke-test or /trigger-test-smoke - Run smoke tests
  • /trigger-install-test or /trigger-test-install - Run installation tests

Labels: Apply labels to trigger workflows:

  • run-smoke-tests or go - Run smoke tests on demand (only works for non-forked PRs)

Important

For Forked PRs: The run-smoke-tests label won't work. A required Smoke Tests check will block merge until a maintainer acts:

  • A maintainer uses /approve-smoke-tests to run smoke tests (results will set the check)
  • A maintainer uses /skip-smoke-tests to bypass the check without running tests

Please comment requesting a maintainer review if you need smoke tests to run.

@datarobot-pr-review-router

Copy link
Copy Markdown

👋 Thanks so much for contributing to the DataRobot community!

As a quick heads-up on how our team handles reviews: if you're still iterating on
this code or running tests, please feel free to convert this to a Draft PR.
We rely heavily on GitHub Drafts to give contributors a stress-free sandbox to experiment!

Once everything is finalized and you're ready for feedback, just click "Ready for review"
and the maintainers will be notified to jump in. (And if this PR is already 100% ready
to go, no action needed, we'll take a look soon!)

ahjota and others added 6 commits August 1, 2026 14:11
Add .devcontainer/devcontainer.json pinning Go 1.26 with Task
installed via devcontainer feature, and a task bootstrap Taskfile
task that verifies the Go version, installs tools, sets up hooks,
and builds the CLI in one command.

Remove superseded Cloud Template setup scripts and docs, replacing
.factory/README.md with Droid Computers guidance. Update
docs/development/setup.md and AGENTS.md to reference the new task
and devcontainer option for local and cloud development.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Replace single post-create.sh with split lifecycle commands:
updateContentCommand runs sync-go.sh (with sudo for non-root user)
to upgrade Go to match go.mod, and postCreateCommand runs task
bootstrap directly. Set waitFor to postCreateCommand so tools wait
for setup to complete before connecting. Add devcontainer-lock.json
for feature version pinning.

Add docs/development/devcontainer.md covering local development
(VS Code, Zed, CLI), GitHub Codespaces, Factory Droid Computers,
lifecycle hooks, and troubleshooting. Update mkdocs.yml and
development README navigation.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Add ghcr.io/va-h/devcontainers-features/uv:1 to install uv (Astral's
fast Python package manager) in the devcontainer. This enables
'task docs-serve' which runs 'uv sync' and 'uv run mkdocs serve'
for local documentation preview without a separate Python setup.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Add ghcr.io/devcontainers/features/docker-outside-of-docker:1 to
provide Docker access inside the container via the host's Docker
daemon. This enables 'task copyright' which runs 'docker run' to
apply license headers via Apache Skywalking Eyes.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Add ghcr.io/devcontainers/features/github-cli:1 to install the
GitHub CLI (gh) in the devcontainer. This enables fork management,
PR creation, and review workflows from inside the container without
needing a separate local install.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@ajalon1
ajalon1 force-pushed the aj/get-droid-computers-working branch from 3db3738 to f58fc34 Compare August 1, 2026 21:19
@ajalon1 ajalon1 changed the title [-] get devcontainers working feat(dev): add devcontainer and task bootstrap for local, Codespaces, and Droid Computers Aug 1, 2026
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