-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: new image layout and organization #13
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
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
except DockerException: | ||
# print( | ||
# f"Error connecting to MCP dedicated network '{dedicated_network_name}': {e}" | ||
# ) | ||
# commented out, may be accessible through another attached network, it's | ||
# not mandatory here. | ||
pass |
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: The exception handler catches a DockerException but doesn't define the exception variable 'e' that was previously used in the commented code. This could cause issues if the commented code is uncommented in the future. [general, importance: 8]
except DockerException: | |
# print( | |
# f"Error connecting to MCP dedicated network '{dedicated_network_name}': {e}" | |
# ) | |
# commented out, may be accessible through another attached network, it's | |
# not mandatory here. | |
pass | |
except DockerException as e: | |
# print( | |
# f"Error connecting to MCP dedicated network '{dedicated_network_name}': {e}" | |
# ) | |
# commented out, may be accessible through another attached network, it's | |
# not mandatory here. | |
pass |
# Pre-install the cubbi_init | ||
RUN /cubbi/cubbi_init.py --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.
Suggestion: The pre-installation of cubbi_init using --help
is inefficient and could mask potential initialization errors. Instead, install required Python dependencies explicitly. [general, importance: 6]
# Pre-install the cubbi_init | |
RUN /cubbi/cubbi_init.py --help | |
# Install Python dependencies for cubbi_init | |
RUN pip install ruamel.yaml |
|
||
# Set up environment | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV UV_LINK_MODE=copy |
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: The UV_LINK_MODE=copy
environment variable is set but the uv package installer is only used during build time, not runtime. This environment variable should be set only during the installation command to avoid unnecessary persistent configuration. [general, importance: 3]
ENV UV_LINK_MODE=copy | |
# No need for persistent UV_LINK_MODE in the final image | |
# Remove this line or use it only during installation |
# Copy initialization system | ||
COPY cubbi_init.py /cubbi/cubbi_init.py | ||
COPY goose_plugin.py /cubbi/goose_plugin.py | ||
COPY cubbi_image.yaml /cubbi/cubbi_image.yaml | ||
COPY init-status.sh /cubbi/init-status.sh | ||
RUN chmod +x /cubbi/cubbi_init.py /cubbi/init-status.sh |
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: The initialization scripts are copied to /cubbi/
directory but the entrypoint references /cubbi/cubbi_init.py
directly. This inconsistency with the documentation (which specifies scripts should be in the root directory) could cause integration issues. [possible issue, importance: 8]
# Copy initialization system | |
COPY cubbi_init.py /cubbi/cubbi_init.py | |
COPY goose_plugin.py /cubbi/goose_plugin.py | |
COPY cubbi_image.yaml /cubbi/cubbi_image.yaml | |
COPY init-status.sh /cubbi/init-status.sh | |
RUN chmod +x /cubbi/cubbi_init.py /cubbi/init-status.sh | |
# Copy initialization system according to specifications | |
COPY cubbi_init.py /cubbi_init.py | |
COPY goose_plugin.py /goose_plugin.py | |
COPY cubbi_image.yaml /cubbi/cubbi_image.yaml | |
COPY init-status.sh /init-status.sh | |
RUN chmod +x /cubbi_init.py /init-status.sh |
COPY cubbi_image.yaml /cubbi/cubbi_image.yaml | ||
COPY init-status.sh /cubbi/init-status.sh | ||
RUN chmod +x /cubbi/cubbi_init.py /cubbi/init-status.sh | ||
RUN echo '[ -x /cubbi/init-status.sh ] && /cubbi/init-status.sh' >> /etc/bash.bashrc |
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: The path to init-status.sh
in the bash.bashrc configuration doesn't match the path specified in the documentation. This will prevent the status tracking from working correctly when users log in. [possible issue, importance: 7]
RUN echo '[ -x /cubbi/init-status.sh ] && /cubbi/init-status.sh' >> /etc/bash.bashrc | |
RUN echo '[ -x /init-status.sh ] && /init-status.sh' >> /etc/bash.bashrc |
User description
This PR rework how image are build and separated. Most of the initialization are now shared across image.
PR Type
Enhancement
Description
Standardized image initialization system
Python-based plugin architecture
Shared initialization across images
Improved build context management
Changes walkthrough 📝
9 files
Enhanced image build process with temporary build context
Simplified network connection logging
Added shared Python initialization system
Added Goose-specific plugin for initialization
Removed in favor of plugin architecture
Removed in favor of Python initialization
Removed in favor of Python entrypoint
Updated status tracking for new initialization
Simplified with Python-based initialization
2 files
Updated image config file naming convention
Simplified configuration removing redundant options
1 files
Removed unnecessary module docstring
4 files
Updated image configuration file naming
Updated documentation for new architecture
Updated file naming convention references
Added comprehensive image specification documentation