loader: Fix preservation of multiple protocols on one port#6799
loader: Fix preservation of multiple protocols on one port#6799Apfelwurm wants to merge 1 commit intodocker:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thank you for contributing! It appears your commit message is missing a DCO sign-off, We require all commit messages to have a There is no need to open a new pull request, but to fix this (and make CI pass), Unfortunately, it's not possible to do so through GitHub's web UI, so this needs You can find some instructions in the output of the DCO check (which can be found Steps to do so "roughly" come down to:
Sorry for the hassle (I wish GitHub would make this a bit easier to do), and let me know if you need help or more detailed instructions! |
d51ca07 to
0a4281b
Compare
Signed-off-by: Alexander Volz <gh-contact@volzit.de>
0a4281b to
f5b2022
Compare
|
Thank you for the really fast response @thaJeztah ! |
Fixes #2407.
- What I did
I fixed a bug in the configuration loader, where ports with the same number but different protocols (e.g., 53:53/tcp and 53:53/udp) would overwrite each other instead of being preserved as separate port configurations.
- How I did it
Modified
toServicePortConfigsMapinmerge.goto use a composite key that includes both the published port number and protocol (e.g., "53tcp", "53udp") instead of just the port number. This ensures that ports with the same number but different protocols are treated as distinct entries in the map and won't overwrite each other during the merge process.- How to verify it
I added a test case in that defines the same port (53) with both TCP and UDP protocols. The test verifies that both port configurations are properly loaded and preserved in the resulting service configuration, confirming that neither gets overwritten during the merge process. Alternativeley follow the steps to reproduce of #2407.
- Human readable description for the release notes