Commit 677c5fb
Fabian Holler
build: fix: compose process ignores TERM signal when resolving deps
On big docker compose projects with a lot of dependencies, the
docker-compose plugin process does not terminate when the process group
receives a TERM or INT signal.
The docker-compose process continues to run and does not react to any
TERM signals.
When a TERM signal is received, compose cancels the context.
The code that resolves the dependency tree is not checking if the
context gets canceled and does not abort.
Check if the context is canceled when receiving or sending to NodeCh
and terminate in that case.
With this change, docker-compose returns immediately when an INT or TERM
signal is received, also on the big compose project where it got stuck
before.1 parent 7c3fe35 commit 677c5fb
1 file changed
Lines changed: 21 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | | - | |
152 | 160 | | |
153 | | - | |
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
| 167 | + | |
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
| |||
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
186 | | - | |
187 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
| |||
0 commit comments