-
Notifications
You must be signed in to change notification settings - Fork 1
Add devpod dependency and dev tasks #117
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
Conversation
- Add blooop channel for custom packages - Add devpod as dependency for launching dev containers - Add `pixi r dev` task to start devpod - Add `pixi r dev-restart` task to recreate container Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The dev and dev-restart tasks now depend on dev-add-docker which adds the docker provider if it's not already configured. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigures devpod-based development workflows via Pixi by adding the blooop conda channel, declaring devpod as a dependency, and defining Pixi tasks to bring up and recreate a dev container with automatic Docker provider setup. Sequence diagram for pixi dev task with automatic Docker provider setupsequenceDiagram
actor Developer
participant Pixi as Pixi_CLI
participant Devpod as Devpod_CLI
participant Docker as Docker_Provider
Developer->>Pixi: pixi r dev
Pixi->>Pixi: resolve_task_dependencies
Pixi->>Devpod: devpod provider list
Devpod-->>Pixi: provider_list
alt docker_not_configured
Pixi->>Devpod: devpod provider add docker
Devpod-->>Pixi: docker_provider_added
else docker_already_configured
Pixi-->>Pixi: skip_provider_add
end
Pixi->>Devpod: devpod up .
Devpod->>Docker: create_or_start_dev_container
Docker-->>Devpod: container_running
Devpod-->>Pixi: dev_environment_ready
Pixi-->>Developer: dev_shell_or_editor_ready
Sequence diagram for pixi dev-restart task with container recreationsequenceDiagram
actor Developer
participant Pixi as Pixi_CLI
participant Devpod as Devpod_CLI
participant Docker as Docker_Provider
Developer->>Pixi: pixi r dev-restart
Pixi->>Pixi: resolve_task_dependencies
Pixi->>Devpod: devpod provider list
Devpod-->>Pixi: provider_list
alt docker_not_configured
Pixi->>Devpod: devpod provider add docker
Devpod-->>Pixi: docker_provider_added
else docker_already_configured
Pixi-->>Pixi: skip_provider_add
end
Pixi->>Devpod: devpod up . --recreate
Devpod->>Docker: stop_and_recreate_dev_container
Docker-->>Devpod: fresh_container_running
Devpod-->>Pixi: dev_environment_ready
Pixi-->>Developer: fresh_dev_shell_or_editor_ready
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 2 issues, and left some high level feedback:
- In the
dev-add-dockertask, consider using a more specific grep pattern (e.g.grep -q '^docker\b') to avoid accidentally matching providers whose names merely contain the substringdocker. - Instead of
devpod = '*', consider constraining the devpod version (e.g. to a compatible range) to reduce the risk of unexpected breakages from future releases in the custom channel.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the `dev-add-docker` task, consider using a more specific grep pattern (e.g. `grep -q '^docker\b'`) to avoid accidentally matching providers whose names merely contain the substring `docker`.
- Instead of `devpod = '*'`, consider constraining the devpod version (e.g. to a compatible range) to reduce the risk of unexpected breakages from future releases in the custom channel.
## Individual Comments
### Comment 1
<location> `pyproject.toml:22` </location>
<code_context>
[tool.pixi.dependencies]
python = ">=3.10"
shellcheck = ">=0.10.0,<0.11"
+devpod = "*"
[tool.pixi.feature.py310.dependencies]
</code_context>
<issue_to_address>
**suggestion:** Using an unpinned `devpod` version may hurt reproducibility of the dev environment.
Using `*` means the latest `devpod` will be fetched each time, which can introduce breaking changes and make the dev tasks non-reproducible. Please pin a version range instead (e.g. `>=x.y,<x.(y+1)`) to keep the environment stable while still allowing controlled upgrades.
Suggested implementation:
```
devpod = ">=0.5,<0.6"
```
You should adjust the `devpod` version range (`>=0.5,<0.6` in this example) to match the version you are currently using or have validated for this project. The key point is to avoid `"*"` and instead use a bounded range like `>=x.y,<x.(y+1)` to keep the environment reproducible while allowing controlled minor upgrades.
</issue_to_address>
### Comment 2
<location> `pyproject.toml:64` </location>
<code_context>
-
[tool.pixi.tasks]
+dev-add-docker = "devpod provider list | grep -q docker || devpod provider add docker"
+dev = { cmd = "devpod up .", depends-on = ["dev-add-docker"] }
+dev-restart = { cmd = "devpod up . --recreate", depends-on = ["dev-add-docker"] }
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Tighten the grep to avoid accidental substring matches when checking for the docker provider.
`grep -q docker` will match any substring (e.g. `my-docker-provider`), which could cause this check to think the `docker` provider exists when it does not. Please tighten the match (e.g. `grep -qw docker` or an anchored pattern appropriate to `devpod provider list`’s output) so it only matches the actual `docker` provider entry.
```suggestion
dev-add-docker = "devpod provider list | grep -qw docker || devpod provider add docker"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| [tool.pixi.dependencies] | ||
| python = ">=3.10" | ||
| shellcheck = ">=0.10.0,<0.11" | ||
| devpod = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Using an unpinned devpod version may hurt reproducibility of the dev environment.
Using * means the latest devpod will be fetched each time, which can introduce breaking changes and make the dev tasks non-reproducible. Please pin a version range instead (e.g. >=x.y,<x.(y+1)) to keep the environment stable while still allowing controlled upgrades.
Suggested implementation:
devpod = ">=0.5,<0.6"
You should adjust the devpod version range (>=0.5,<0.6 in this example) to match the version you are currently using or have validated for this project. The key point is to avoid "*" and instead use a bounded range like >=x.y,<x.(y+1) to keep the environment reproducible while allowing controlled minor upgrades.
|
|
||
|
|
||
| [tool.pixi.tasks] | ||
| dev-add-docker = "devpod provider list | grep -q docker || devpod provider add docker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): Tighten the grep to avoid accidental substring matches when checking for the docker provider.
grep -q docker will match any substring (e.g. my-docker-provider), which could cause this check to think the docker provider exists when it does not. Please tighten the match (e.g. grep -qw docker or an anchored pattern appropriate to devpod provider list’s output) so it only matches the actual docker provider entry.
| dev-add-docker = "devpod provider list | grep -q docker || devpod provider add docker" | |
| dev-add-docker = "devpod provider list | grep -qw docker || devpod provider add docker" |
- dev: attach via SSH in terminal (--ide none && devpod ssh) - dev-vs: launch with VSCode (original behavior) - dev-restart: recreate and attach via SSH - dev-restart-vs: recreate and launch VSCode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
devpod ssh doesn't use the SSH config with ForwardAgent, so switch to using ssh directly with the devpod-generated host config. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mount host SSH_AUTH_SOCK directly into container at /ssh-agent instead of relying on devpod's tunneling which has known issues. Revert to using devpod ssh command now that agent is available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Pin devpod version to >=0.8.0,<0.9 for reproducibility - Use grep -qw for word-boundary matching to avoid substring false positives 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
devpodas a dependency from the blooop channelpixi r devtask to launch project in devpod containerpixi r dev-restarttask to recreate the containerdev-add-dockertask to ensure docker provider is configuredTest plan
pixi r devto verify devpod launches correctlypixi r dev-restartto verify container recreation works🤖 Generated with Claude Code
Summary by Sourcery
Configure the project to support running a dev container via devpod.
New Features: