Imporve parsing of skipped messages. (#916)

This commit is contained in:
Felix Fontein 2024-07-06 21:10:39 +02:00 committed by GitHub
parent e2f93a0c66
commit 48c0cdf2c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_compose_v2* modules - fix parsing of skipped pull messages for Docker Compose 2.28.x (https://github.com/ansible-collections/community.docker/issues/911, https://github.com/ansible-collections/community.docker/pull/916)."

View File

@ -202,9 +202,9 @@ _RE_SKIPPED_EVENT = re.compile(
r'\s*'
r'(?P<resource_id>\S+)'
r'\s+'
r'Skipped -'
r'Skipped(?: -'
r'\s*'
r'(?P<msg>\S(?:|.*\S))'
r'(?P<msg>\S(?:|.*\S))|\s*)'
r'$'
)

View File

@ -217,6 +217,36 @@ EXTRA_TEST_CASES = [
'dummy4: Foo bar',
],
),
(
# https://github.com/ansible-collections/community.docker/issues/911
'2.28.1-image-pull-skipped',
'2.28.1',
False,
" bash_1 Skipped \n"
" bash_2 Pulling \n"
" bash_2 Pulled \n",
[
Event(
'unknown',
'bash_1',
'Skipped',
None,
),
Event(
'service',
'bash_2',
'Pulling',
None,
),
Event(
'service',
'bash_2',
'Pulled',
None,
),
],
[],
),
]
_ALL_TEST_CASES = EVENT_TEST_CASES + EXTRA_TEST_CASES