@@ -102,19 +102,27 @@ def parse(cls, string: str) -> list["Request"]:
102
102
... Foo bAr. <!--TESTING_FARM:invalid-chroot/33333333-fc9a-4e1d-95fe-567cc9d62ad4/8,9,10--> fafa
103
103
... FOO bar. <!--TESTING_FARM: fedora-40-x86_64/; cat /tmp/secret/file/11--> fafa
104
104
... FOO bar. <!--TESTING_FARM: fedora-40-x86_64/33333333-fc9a-4e1d-95fe-567cc9d62ad4/12,13,14--> fafa
105
- ... This next request ID is missing build IDs. We allow it because there used to be comment IDs
106
- ... that didn't have these IDs.
107
- ... FOO bar. <!--TESTING_FARM: fedora-38 -x86_64/44444444 -fc9a-4e1d-95fe-567cc9d62ad4--> fafa
105
+ ... This next request ID is missing build IDs. We allow it because we don't store build IDs for performance-comparison requests.
106
+ ... FOO bar. <!--TESTING_FARM: fedora-38-x86_64/44444444-fc9a-4e1d-95fe-567cc9d62ad4/--> fafa
107
+ ... FOO bar. <!--TESTING_FARM: fedora-42 -x86_64/55555555 -fc9a-4e1d-95fe-567cc9d62ad4/ --> fafa
108
108
... '''
109
109
>>> reqs = Request.parse(s)
110
110
>>> [req.chroot for req in reqs]
111
- ['fedora-38-x86_64', 'fedora-39-x86_64', 'fedora-40-x86_64', 'fedora-rawhide-x86_64']
112
- >>> [req.request_id for req in reqs]
113
- [UUID('44444444-fc9a-4e1d-95fe-567cc9d62ad4'), UUID('22222222-fc9a-4e1d-95fe-567cc9d62ad4'), UUID('33333333-fc9a-4e1d-95fe-567cc9d62ad4'), UUID('271a79e8-fc9a-4e1d-95fe-567cc9d62ad4')]
111
+ ['fedora-38-x86_64', 'fedora-39-x86_64', 'fedora-40-x86_64', 'fedora-42-x86_64', 'fedora-rawhide-x86_64']
112
+ >>> [req.request_id for req in reqs] # doctest: +NORMALIZE_WHITESPACE
113
+ [UUID('44444444-fc9a-4e1d-95fe-567cc9d62ad4'),
114
+ UUID('22222222-fc9a-4e1d-95fe-567cc9d62ad4'),
115
+ UUID('33333333-fc9a-4e1d-95fe-567cc9d62ad4'),
116
+ UUID('55555555-fc9a-4e1d-95fe-567cc9d62ad4'),
117
+ UUID('271a79e8-fc9a-4e1d-95fe-567cc9d62ad4')]
114
118
>>> [req.copr_build_ids for req in reqs]
115
- [[], [5, 6, 7], [12, 13, 14], [1, 2, 3]]
119
+ [[], [5, 6, 7], [12, 13, 14], [], [ 1, 2, 3]]
116
120
"""
117
- matches = re .findall (r"<!--TESTING_FARM:([^/]+)/([^/]+)(/([^/]+))?-->" , string )
121
+ matches = re .findall (
122
+ pattern = r"<!--TESTING_FARM:([^/]+)/([^/]+)(/([^/]*))?-->" ,
123
+ string = string ,
124
+ flags = re .MULTILINE ,
125
+ )
118
126
if not matches :
119
127
logging .debug ("No testing-farm requests found to recover." )
120
128
return []
0 commit comments