Fix replacing "service:x" with "container:y"#10036
Conversation
Signed-off-by: i-ky <[email protected]>
|
With this implemented in compose/pkg/compose/convergence.go Line 118 in 7cf5940 |
Codecov ReportBase: 75.86% // Head: 75.86% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## v2 #10036 +/- ##
=======================================
Coverage 75.86% 75.86%
=======================================
Files 2 2
Lines 232 232
=======================================
Hits 176 176
Misses 49 49
Partials 7 7 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: i-ky <[email protected]>
Do you mean removing filtering by compose/pkg/compose/convergence.go Line 90 in 7cf5940 |
What I did
As mentioned in #9055 (comment) and #9055 (comment),
updateServices()gets called fromprepareRun()with an array of all containers belonging to the project and taking only first one of them is wrong in general case. For this use case we should construct amapfrom service name to ID of the first container belonging to that service. Thismapis then used ro replaceservice:xwithcontainer:yinnetwork_mode:,ipc:andpid:. This change should not break the second use case ofupdateServices()when it is called fromupdateProject()with an array of containers already filtered by service (as pointed out in #9055 (comment)). In this casemapwill contain only one pair and code will behave exactly like before - only replacing mentions of one particular service and leaving all otherservice:xintact.Related issue
Fixes #9055.