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: internal project network with duplicate check, revert for #5305 #5533
fix: internal project network with duplicate check, revert for #5305 #5533
Conversation
Download the artifacts for this pull request:
See Testing a PR |
The only difference between a network created with
And when you have a network with these labels created programmatically, I see this as a win because with this approach we can have a project network at an early stage, I guess there might be some kind of race condition that creates duplicates for the networks in |
// "docker-compose up", which is called in this function later, may create | ||
// duplicate project networks, we can create this network in advance | ||
// see https://github.com/ddev/ddev/pull/5533 | ||
dockerutil.EnsureProjectNetwork() |
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 PR is easy to revert, you only need to remove this function call and the function itself.
// the loop below may not contain such a network | ||
var err error = &docker.NoSuchNetwork{ID: netName} |
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 a fix for a bug that I introduced in #5508
When you run ddev stop
or ddev poweroff
several times in a row, Network <name> removed
is shown each time, even if there is no such network.
// Ensure we have DDEV network | ||
dockerutil.EnsureDdevNetwork() |
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.
There is only refactoring.
There are some testing errors, I restarted them and they failed again. |
The colima failure was Colima regression in v0.6.0, should be fixed in v0.6.2, abiosoft/colima#856 The wsl failure looks like just internet problems or upstream problems. I'll restart both again. |
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.
If you're good with it I'm good with it. Thanks again for pursuing this!
Yeah, let's pull it in. Looks pretty good considering we have version control over |
The Issue
After switch to external project networks in #5305, there were issues with compatibility between different DDEV version, which made downgrade not smooth.
The last issue with downgrade from HEAD to v1.22.4:
How This PR Solves The Issue
Move back to internal project networks, and create them before
docker-compose up
to ensure no duplicates.I've refactored the code to make it clearer what's going on. In the previous PR #5305, it was unclear where and why the project network was created.
Manual Testing Instructions
Use DDEV as usual.
Automated Testing Overview
Related Issue Link(s)
Release/Deployment Notes