| { |
| "commit": "fb07b5cfe1d986c3a7cd7879b11ecc43c75542b7", |
| "parent": "e4673d8aeaf97b9ad5d2500e459526b4cf494547", |
| "repository_id": "R003", |
| "schema_version": 1, |
| "task_id": "TASK_S2_R003_004", |
| "valid_end_to_end": true, |
| "validation": { |
| "commands": [ |
| "python -m pytest -q tests/unit tests/unit/objects" |
| ], |
| "elapsed_seconds": 1.5628152089193463, |
| "gold": [ |
| { |
| "command": "python -m pytest -q tests/unit tests/unit/objects", |
| "elapsed_seconds": 0.4472388750873506, |
| "returncode": 0, |
| "stderr": "", |
| "stdout": "....................................................................s..s [ 20%]\n........................................................................ [ 40%]\n........................................................................ [ 61%]\n....s................................................................... [ 81%]\n................................................................ [100%]\n349 passed, 3 skipped in 0.26s\n", |
| "timed_out": false |
| } |
| ], |
| "hidden": [ |
| { |
| "command": "python -m pytest -q tests/unit tests/unit/objects", |
| "elapsed_seconds": 0.47890033293515444, |
| "returncode": 1, |
| "stderr": "", |
| "stdout": "een executed {!r}\".format(\n [(match.method, match.url) for match in not_called]\n )\n )\nE AssertionError: Not all requests have been executed [('GET', 'http://localhost/api/v4/projects/1/jobs/123/artifacts')]\n\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/responses/__init__.py:1233: AssertionError\n=================================== FAILURES ===================================\n____________________ test_job_artifact_download_bytes_range ____________________\n\ngl = <gitlab.client.Gitlab object at 0x109354410>\nbinary_content = b'binary content'\nresp_job_artifact_bytes_range = <responses.RequestsMock object at 0x10935ddd0>\n\n def test_job_artifact_download_bytes_range(\n gl, binary_content, resp_job_artifact_bytes_range\n ):\n project = gl.projects.get(1, lazy=True)\n job = project.jobs.get(123, lazy=True)\n \n> artifacts = job.artifacts(extra_headers={\"Range\": \"bytes=0-9\"})\n\ntests/unit/objects/test_job_artifacts.py:71: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ngitlab/cli.py:70: in wrapped_f\n return f(*args, **kwargs)\ngitlab/exceptions.py:344: in wrapped_f\n return f(*args, **kwargs)\ngitlab/v4/objects/jobs.py:194: in artifacts\n result = self.manager.gitlab.http_get(\ngitlab/client.py:808: in http_get\n result = self.http_request(\ngitlab/client.py:732: in http_request\n result = self._backend.http_request(\ngitlab/_backends/requests_backend.py:157: in http_request\n response: requests.Response = self._client.request(\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/requests/sessions.py:589: in request\n resp = self.send(prep, **send_kwargs)\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send\n r = adapter.send(request, **kwargs)\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/responses/__init__.py:1202: in send\n return self._on_request(adapter, request, **kwargs)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <responses.RequestsMock object at 0x10935ddd0>\nadapter = <requests.adapters.HTTPAdapter object at 0x1093c7510>\nrequest = <PreparedRequest [GET]>, retries = None\nkwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}\nmatch = None\nmatch_failed_reasons = [\"Headers do not match: {} doesn't match {'Range': 'bytes=0-9'}\"]\nresp_callback = None\nerror_msg = \"Connection refused by Responses - the call doesn't match any registered mock.\\n\\nRequest: \\n- GET http://localhost/ap... http://localhost/api/v4/projects/1/jobs/123/artifacts Headers do not match: {} doesn't match {'Range': 'bytes=0-9'}\\n\"\ni = 0\nm = <Response(url='http://localhost/api/v4/projects/1/jobs/123/artifacts' status=206 content_type='application/octet-stream' headers='null')>\n\n def _on_request(\n self,\n adapter: \"HTTPAdapter\",\n request: \"PreparedRequest\",\n *,\n retries: Optional[\"_Retry\"] = None,\n **kwargs: Any,\n ) -> \"models.Response\":\n # add attributes params and req_kwargs to 'request' object for further match comparison\n # original request object does not have these attributes\n request.params = self._parse_request_params(request.path_url) # type: ignore[attr-defined]\n request.req_kwargs = kwargs # type: ignore[attr-defined]\n request_url = str(request.url)\n request.body = self._read_filelike_body(request.body)\n \n match, match_failed_reasons = self._find_match(request)\n resp_callback = self.response_callback\n \n if match is None:\n if any(\n [\n p.match(request_url)\n if isinstance(p, Pattern)\n else request_url.startswith(p)\n for p in self.passthru_prefixes\n ]\n ):\n logger.info(\"request.allowed-passthru\", extra={\"url\": request_url})\n return self._real_send(adapter, request, **kwargs) # type: ignore\n \n error_msg = (\n \"Connection refused by Responses - the call doesn't \"\n \"match any registered mock.\\n\\n\"\n \"Request: \\n\"\n f\"- {request.method} {request_url}\\n\\n\"\n \"Available matches:\\n\"\n )\n for i, m in enumerate(self.registered()):\n error_msg += \"- {} {} {}\\n\".format(\n m.method, m.url, match_failed_reasons[i]\n )\n \n if self.passthru_prefixes:\n error_msg += \"Passthru prefixes:\\n\"\n for p in self.passthru_prefixes:\n error_msg += f\"- {p}\\n\"\n \n response = ConnectionError(error_msg)\n response.request = request\n \n self._calls.add(request, response)\n> raise response\nE requests.exceptions.ConnectionError: Connection refused by Responses - the call doesn't match any registered mock.\nE \nE Request: \nE - GET http://localhost/api/v4/projects/1/jobs/123/artifacts?extra_headers%5BRange%5D=bytes%3D0-9\nE \nE Available matches:\nE - GET http://localhost/api/v4/projects/1/jobs/123/artifacts Headers do not match: {} doesn't match {'Range': 'bytes=0-9'}\n\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/responses/__init__.py:1129: ConnectionError\n=========================== short test summary info ============================\nFAILED tests/unit/objects/test_job_artifacts.py::test_job_artifact_download_bytes_range\nERROR tests/unit/objects/test_job_artifacts.py::test_job_artifact_download_bytes_range\n1 failed, 348 passed, 3 skipped, 1 error in 0.30s\n", |
| "timed_out": false |
| } |
| ], |
| "hidden_apply": { |
| "elapsed_seconds": 0.009702750016003847, |
| "returncode": 0, |
| "stderr": "", |
| "stdout": "" |
| }, |
| "original": [ |
| { |
| "command": "python -m pytest -q tests/unit tests/unit/objects", |
| "elapsed_seconds": 0.5725481668487191, |
| "returncode": 0, |
| "stderr": "", |
| "stdout": "....................................................................s..s [ 20%]\n........................................................................ [ 41%]\n........................................................................ [ 61%]\n...s.................................................................... [ 82%]\n............................................................... [100%]\n348 passed, 3 skipped in 0.39s\n", |
| "timed_out": false |
| } |
| ], |
| "reason": null, |
| "source_apply": { |
| "elapsed_seconds": 0.009480291046202183, |
| "returncode": 0, |
| "stderr": "", |
| "stdout": "" |
| }, |
| "valid": true |
| } |
| } |
|
|