Closed martinpitt closed 7 months ago
I created a https://github.com/cockpit-project/bots/tree/cross-job-runner branch which reverts https://github.com/cockpit-project/bots/pull/6045 . You can run it with
COCKPIT_BOTS_BRANCH=cross-job-runner tasks/run-local.sh
This fails with trying to post statuses to cockpituous, as the mock doesn't allow that:
Traceback (most recent call last):
File "/work/bots/lib/aio/job.py", line 166, in run_job
await status.post('pending', 'In progress')
File "/work/bots/lib/aio/github.py", line 181, in post
await self.api.post(self.resource, {
File "/work/bots/lib/aio/github.py", line 70, in post
return await post_once()
^^^^^^^^^^^^^^^^^
File "/work/bots/lib/aio/github.py", line 64, in post_once
async with self.session.post(self.api / resource, json=body) as response:
File "/usr/lib64/python3.12/site-packages/aiohttp/client.py", line 1194, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/site-packages/aiohttp/client.py", line 693, in _request
resp.raise_for_status()
File "/usr/lib64/python3.12/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 405, message='Method not allowed: /repos/cockpit-project/cockpituous/statuses/cef660f099a496a2e0e9ad1ebd5ac076562778f4', url=URL('http://127.0.0.7:8443/repos/cockpit-project/cockpituous/statuses/cef660f099a496a2e0e9ad1ebd5ac076562778f4')
it would also fail later on in the POST messages assertions.
This covers the regression with job-runner for cross-project test requests: https://github.com/cockpit-project/bots/pull/6045
Due to that revert, this currently tests the old
tests-invoke
code path. Allow some flexibility in the status description as tests-invoke and job-runner's descriptions are slightly different.