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

Local Updates vs API Updates #100

Open
noursaidi opened this issue Aug 22, 2023 · 1 comment
Open

Local Updates vs API Updates #100

noursaidi opened this issue Aug 22, 2023 · 1 comment
Labels
bug Something isn't working framework Involves backend components (e.g framework or test modules)
Milestone

Comments

@noursaidi
Copy link
Contributor

If a device in local/devices is deleted whilst testrun is running, this remains in the testrun session. Consequently a subsequent API call to recreate the deleted device results in an error:

Traceback (most recent call last):
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/fastapi/applications.py", line 290, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 83, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/fastapi/routing.py", line 241, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/elsaidi/test-run/venv/lib/python3.11/site-packages/fastapi/routing.py", line 167, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/elsaidi/test-run/framework/python/src/api/api.py", line 206, in save_device
    self._test_run.save_device(device, device_json)
  File "/usr/local/google/home/elsaidi/test-run/framework/python/src/core/testrun.py", line 250, in save_device
    with open(config_file_path, 'w+', encoding='utf-8') as config_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/google/home/elsaidi/test-run/local/devices/aa O3-DIN-CPU/device_config.json'

@noursaidi noursaidi added the bug Something isn't working label Aug 22, 2023
@jboddey jboddey added the framework Involves backend components (e.g framework or test modules) label Oct 17, 2023
@jboddey jboddey added this to the Patch Release 1.1.1 milestone Dec 18, 2023
@jboddey
Copy link
Collaborator

jboddey commented Jan 4, 2024

This is low priority at the moment as this would only be caused if the user was to manually delete/modify files whilst Testrun is running. Moving this to v1.2

@jboddey jboddey modified the milestones: Release 1.2, Release v1.2.1 Apr 8, 2024
@jboddey jboddey modified the milestones: Release v1.2.2, Release 1.3 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working framework Involves backend components (e.g framework or test modules)
Projects
None yet
Development

No branches or pull requests

2 participants