Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasks: Test cross-project PR test request #593

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Mar 11, 2024

This covers the regression with job-runner for cross-project test
requests: cockpit-project/bots#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.


@martinpitt
Copy link
Member Author

I created a https://github.com/cockpit-project/bots/tree/cross-job-runner branch which reverts cockpit-project/bots#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: cockpit-project/bots#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.
Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking forward to this being Python :)

@allisonkarlitskaya allisonkarlitskaya merged commit a7ec360 into main Mar 11, 2024
3 checks passed
@allisonkarlitskaya allisonkarlitskaya deleted the test-cross-project branch March 11, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants