-
Notifications
You must be signed in to change notification settings - Fork 655
refactor: Dev Container (devcontainer) to standardize paths to /workspace (for pytest compatibility) #3870
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
base: main
Are you sure you want to change the base?
Conversation
…onfig - Change devcontainer paths from /home/ubuntu/dynamo to /workspace - Remove duplicate environment variable definitions - Simplify post-create.sh to use WORKSPACE_DIR from Dockerfile - Use standard Docker conventions throughout Signed-off-by: Keiven Chang <[email protected]>
WalkthroughDev container and build configurations migrated from hardcoded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Changes primarily consist of repetitive path migrations across multiple configuration files and straightforward script refactoring. Although affecting multiple files, the pattern is consistent and the logic density is low. Dockerfile change is minimal, and documentation additions are informational. Poem
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| "rust-lang.rust-analyzer" | ||
| ], | ||
| "settings": { | ||
| // Disable automatic copying of .gitconfig to avoid errors |
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.
This is an auto-generated file, no need to look at it.
| "rust-lang.rust-analyzer" | ||
| ], | ||
| "settings": { | ||
| // Disable automatic copying of .gitconfig to avoid errors |
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.
This is an auto-generated file, no need to look at it.
| "rust-lang.rust-analyzer" | ||
| ], | ||
| "settings": { | ||
| // Disable automatic copying of .gitconfig to avoid errors |
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.
This is an auto-generated file, no need to look at it.
| "rust-lang.rust-analyzer" | ||
| ], | ||
| "settings": { | ||
| // Disable automatic copying of .gitconfig to avoid errors |
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.
This is the source template file. Do review it.
| "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", | ||
| "userEnvProbe": "interactiveShell", | ||
| "postCreateCommand": "/bin/bash /home/ubuntu/dynamo/.devcontainer/post-create.sh", // Runs cargo build and pip installs packages | ||
| "containerEnv": { |
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.
These are all set in Dockerfile.*, so no need to override it.
Signed-off-by: Keiven Chang <[email protected]>
Overview:
Standardize Dev Container (devcontainer) configuration to use
/workspaceas the working directory instead of/home/ubuntu/dynamo, for consistency. This simplifies environment variable management and allows pytests (which currently HARD CODES /workspace) to run inside Dev Containers.Details:
workspaceFolderandworkspaceMountfrom/home/ubuntu/dynamoto/workspaceacross all devcontainer.json filesDYNAMO_HOME,CARGO_HOME,RUSTUP_HOME,CARGO_TARGET_DIR) from devcontainer.json, now set by Dockerfile.local_devpost-create.shto useWORKSPACE_DIRfrom Dockerfile instead of hardcoded pathstargetDirto/workspace/targetfor consistencyWhere should the reviewer start?
Review
.devcontainer/devcontainer.json.j2to see the simplified configuration, thencontainer/README.mdfor the documentation of environment variables across build stages.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
/coderabbit profile chill
Summary by CodeRabbit
Chores
Documentation