-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support init container images #132
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
The bot is misinterpreting the "two of one" case. That was pre-existing and I added tests to assert it for backwards compatibility. Not introduced in this PR. |
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.
LGTM!
This includes adding test coverage for existing behavior to preserve backwards-compatibility. This was written to be a minimal addition to the existing support for 'additional containers', which work essentially the same as 'init containers'. To keep the changes minimal, unit tests rely on mocks and patches instead of rewriting the code to be more easily unit testable.
ec62d2b
to
6e072e3
Compare
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.
lgtm
User description
Describe Changes
See commit messages and code comments for more details. It's worth reading the comments for the "two of one" cases closely.
To run the tests I added:
This increases coverage from 14% to 27% on the service module.
Aside from the unit tests, I created a temp service in a Duplo portal and updated its service image, additional container images, and init container images in several patterns.
Link to Issues
N/A.
PR Review Checklist
PR Type
Enhancement, Tests, Documentation
Description
Added support for updating init container images in services.
Enhanced
update_image
method to handle init containers.Introduced comprehensive unit tests for init container functionality.
Updated documentation and changelog to reflect new features.
Changes walkthrough 📝
service.py
Support init container updates in `update_image`
src/duplo_resource/service.py
init_container_image
argument toupdate_image
method.args.py
Add CLI argument for init container images
src/duplocloud/args.py
INIT_CONTAINER_IMAGE
argument for init container updates.test_service_update_image.py
Add unit tests for init container updates
src/tests/test_service_update_image.py
CHANGELOG.md
Update changelog for init container support
CHANGELOG.md
update_image
.CONTRIBUTING.md
Enhance contributing guide with setup instructions
CONTRIBUTING.md
pyproject.toml
Update test dependencies for mocking
pyproject.toml
pytest-mock
to test dependencies.