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

Improve error message to include expected network label #12213

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

divinity76
Copy link
Contributor

@divinity76 divinity76 commented Oct 15, 2024

Updated the error message when a network is found with an incorrect label to also display the expected label value. This provides more context for debugging.

Should make debugging #10797 much easier.

What I did

$ docker compose --file docker-compose.yml --file docker-compose.dev.yml up
[+] Running 24/24
 ✔ mailhog 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                                    8.1s 
   ✔ df20fa9351a1 Pull complete                                                                                                                                                                                                                         0.5s 
   ✔ ed8968b2872e Pull complete                                                                                                                                                                                                                         0.5s 
   ✔ a92cc7c5fd73 Pull complete                                                                                                                                                                                                                         0.5s 
   ✔ f17c8f1adafb Pull complete                                                                                                                                                                                                                         4.3s 
   ✔ 03954754c53a Pull complete                                                                                                                                                                                                                         0.9s 
   ✔ 60493946972a Pull complete                                                                                                                                                                                                                         1.2s 
   ✔ 368ee3bc1dbb Pull complete                                                                                                                                                                                                                         1.5s 
 ✔ redis 15 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                            14.8s 
   ✔ 6414378b6477 Pull complete                                                                                                                                                                                                                         2.8s 
   ✔ caaf2b7eab60 Pull complete                                                                                                                                                                                                                         2.9s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                                                                                         3.2s 
   ✔ 86a1720f5df2 Pull complete                                                                                                                                                                                                                         3.6s 
   ✔ 7fa31013e891 Pull complete                                                                                                                                                                                                                         7.9s 
   ✔ 904fa886b986 Pull complete                                                                                                                                                                                                                         4.1s 
   ✔ c9baa17a1bc5 Pull complete                                                                                                                                                                                                                         4.3s 
   ✔ f47dc7262436 Pull complete                                                                                                                                                                                                                         5.4s 
   ✔ 4c8c88ac5d8a Pull complete                                                                                                                                                                                                                         7.7s 
   ✔ c17f3cf48586 Pull complete                                                                                                                                                                                                                         8.9s 
   ✔ 0a9cf6132a4c Pull complete                                                                                                                                                                                                                         9.2s 
   ✔ e27f0a722fd3 Pull complete                                                                                                                                                                                                                         8.4s 
   ✔ 0fae4b43eb13 Pull complete                                                                                                                                                                                                                         8.8s 
   ✔ 561bb2dc87d6 Pull complete                                                                                                                                                                                                                         9.2s 
   ✔ 79e6e2693bf3 Pull complete                                                                                                                                                                                                                         9.3s 
WARN[0014] a network with name easyad_web-network exists but was not created by compose.
Set `external: true` to use an existing network 
network easyad_web-network was found but has incorrect label com.docker.compose.network set to "web-network,com.docker.compose.project=easyad,com.docker.compose.version=2.24.6"

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did
IMG_20230802_005159_262

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

Updated the error message when a network is found with an incorrect label to also display the expected label value. This provides more context for debugging.

Signed-off-by: divinity76 <hans@loltek.net>
@divinity76
Copy link
Contributor Author

divinity76 commented Oct 15, 2024

(had a little problem with gofmt and then with "this repo requires signed-off-by" and.. that's why I did force-push, sorry about that)

@ndeloof ndeloof merged commit 0cbb73c into docker:main Oct 15, 2024
28 checks passed
@divinity76
Copy link
Contributor Author

divinity76 commented Oct 15, 2024

merged, thanks! any idea when this will be in a release? I'm kinda struggling with a #10797 -like issue right now, and idk how to build docker compose from source 🤔

@divinity76
Copy link
Contributor Author

figured out how to build it from source :)

sudo apt install git golang docker-buildx;
git clone 'https://github.com/docker/compose.git';
cd compose;
make;
make install;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants