Skip to content
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

Fix issue with container network mode causing unnecessary redeployment #1290

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

damacus
Copy link
Member

@damacus damacus commented Dec 11, 2024

  • Added network mode normalization to handle container IDs consistently
  • Prevents container recreation when only the container ID format changes

Resolves #1273

…t when using `container:<name>` format

- Added network mode normalization to handle container IDs consistently
- Prevents container recreation when only the container ID format changes

Signed-off-by: Dan Webb <dan.webb@damacus.io>
@damacus damacus requested a review from a team as a code owner December 11, 2024 14:53
@damacus damacus requested a review from Copilot December 11, 2024 14:54
@damacus damacus self-assigned this Dec 11, 2024
@damacus damacus added the Release: Patch Release to Chef Supermarket as a version patch when merged label Dec 11, 2024
@damacus damacus changed the title Fix issue with container network mode causing unnecessary redeployment when using container:<name> format Fix issue with container network mode causing unnecessary redeployment Dec 11, 2024
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 suggestions.

Comments skipped due to low confidence (2)

libraries/helpers_network.rb:24

  • [nitpick] The method name 'normalize_network_mode' is too generic. Consider renaming it to 'normalize_container_network_mode' to better reflect its specific purpose.
def normalize_network_mode(mode)

resources/container.rb:750

  • [nitpick] The method name normalize_network_mode is ambiguous. Consider renaming it to something more specific like normalize_container_network_mode to avoid confusion with the similarly named method in helpers_network.rb.
def normalize_network_mode(value)

libraries/helpers_network.rb Outdated Show resolved Hide resolved
resources/container.rb Outdated Show resolved Hide resolved
damacus and others added 3 commits December 11, 2024 14:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dan Webb <dan.webb@damacus.io>
Signed-off-by: Dan Webb <dan.webb@damacus.io>
@damacus damacus merged commit 918a120 into main Dec 11, 2024
52 of 53 checks passed
@damacus damacus deleted the 1273 branch December 11, 2024 15:16
@kitchen-porter
Copy link
Contributor

Released as: 11.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Patch Release to Chef Supermarket as a version patch when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker_container network_mode "container:*" leads to redeploy on every chef client run
2 participants