mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 03:52:05 +00:00
Do not fail on non-fatal errors. (#810)
This commit is contained in:
parent
d4b654793e
commit
37e28b62d3
4
changelogs/fragments/810-compose-errors.yml
Normal file
4
changelogs/fragments/810-compose-errors.yml
Normal file
@ -0,0 +1,4 @@
|
||||
bugfixes:
|
||||
- "docker_compose_v2 - do not fail when non-fatal errors occur. This can happen when pulling an image fails, but then the image can be built
|
||||
for another service. Docker Compose emits an error in that case, but ``docker compose up`` still completes successfully
|
||||
(https://github.com/ansible-collections/community.docker/issues/807, https://github.com/ansible-collections/community.docker/pull/810)."
|
||||
@ -404,6 +404,8 @@ def is_failed(events, rc):
|
||||
|
||||
|
||||
def update_failed(result, events, args, stdout, stderr, rc, cli):
|
||||
if not rc:
|
||||
return False
|
||||
errors = []
|
||||
for event in events:
|
||||
if event.status in DOCKER_STATUS_ERROR:
|
||||
@ -419,8 +421,6 @@ def update_failed(result, events, args, stdout, stderr, rc, cli):
|
||||
status=event.status,
|
||||
msg=event.msg,
|
||||
))
|
||||
if not errors and not rc:
|
||||
return False
|
||||
if not errors:
|
||||
errors.append('Return code {code} is non-zero'.format(code=rc))
|
||||
result['failed'] = True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user