-
Notifications
You must be signed in to change notification settings - Fork 7
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
FIX/ENH: a few more fixes for cached/offline mode + plugin only mode #178
Conversation
|
I think this is pretty much ready to be merged, pending a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything weird or unmotivated in the code here and the as-deployed serverless whatrecord has logs now 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logs have some connection/setup error right now that I'm going to paste here:
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8898 ssl:default [Connect call failed ('127.0.0.1', 8898)]
2023-10-09 16:00:27,639 - PID 28530 util.py: 91 run_script_with_json_output WARNING Standard error output while running script ('"/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/bin/python" -m whatrecord.plugins.twincat_pytmc'):
! Traceback (most recent call last):
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
! return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/base_events.py", line 1065, in create_connection
! raise exceptions[0]
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/base_events.py", line 1050, in create_connection
! sock = await self._connect_sock(
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/base_events.py", line 961, in _connect_sock
! await self.sock_connect(sock, address)
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/selector_events.py", line 500, in sock_connect
! return await fut
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/selector_events.py", line 535, in _sock_connect_cb
! raise OSError(err, f'Connect call failed {address}')
! ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 8898)
! The above exception was the direct cause of the following exception:
! Traceback (most recent call last):
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
! return _run_code(code, main_globals, None,
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/runpy.py", line 87, in _run_code
! exec(code, run_globals)
! File "/cds/home/k/klauer/Repos/whatrecord/whatrecord/plugins/twincat_pytmc.py", line 615, in <module>
! results = asyncio.run(_cli_main())
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/runners.py", line 44, in run
! return loop.run_until_complete(main)
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
! return future.result()
! File "/cds/home/k/klauer/Repos/whatrecord/whatrecord/plugins/twincat_pytmc.py", line 586, in _cli_main
! results = await main(**vars(args))
! File "/cds/home/k/klauer/Repos/whatrecord/whatrecord/plugins/twincat_pytmc.py", line 573, in main
! ioc_info = await client.get_iocs(server=server)
! File "/cds/home/k/klauer/Repos/whatrecord/whatrecord/client.py", line 38, in get_iocs
! response = await make_query(
! File "/cds/home/k/klauer/Repos/whatrecord/whatrecord/client.py", line 22, in make_query
! async with session.get(f"{server}{path}", params=params) as resp:
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__
! self._resp = await self._coro
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
! conn = await self._connector.connect(
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
! proto = await self._create_connection(req, traces, timeout)
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
! _, proto = await self._create_direct_connection(req, traces, timeout)
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
! raise last_exc
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
! transp, proto = await self._wrap_create_connection(
! File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.7.3/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
! raise client_error(req.connection_key, exc) from exc
! aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8898 ssl:default [Connect call failed ('127.0.0.1', 8898)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - that's this error: #174
Basically during the offline dump process it says "server, what IOCs do you have? I want to find TwinCAT ads-ioc instances..." But the --dump
mode doesn't even run a server, so it just fails.
Description
.json.gz
on pswww (perhaps due to my own lack of knowledge); reverted to using a separate library for decompression which should work in all casesTODO:
logs.vue
)Motivation and Context
How Has This Been Tested?
Where Has This Been Documented?
PR
Screenshots (if appropriate):