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

Snowflake OSCP response_validation_cache.lock #18

Open
DVD-99 opened this issue Apr 27, 2023 · 7 comments
Open

Snowflake OSCP response_validation_cache.lock #18

DVD-99 opened this issue Apr 27, 2023 · 7 comments

Comments

@DVD-99
Copy link

DVD-99 commented Apr 27, 2023

If any of the checks fail in the soda I'm getting the following error
image

@AlessandroLollo
Copy link
Collaborator

Hey @DVD-99 👋
Would you mind adding the stack trace using a code block?
It's a bit hard to read the log from the screenshot 😅

@DVD-99
Copy link
Author

DVD-99 commented Apr 28, 2023

@AlessandroLollo here is the block

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 1552, in orchestrate_task_run 
result = await call.aresult()
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 181, in aresult 
return await asyncio.wrap_future(self.future)
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 218, in _run_async 
result = await coro
File "/usr/local/lib/python3.8/site-packages/prefect_soda_core/tasks.py", line 104, in soda_scan_execute 
soda_logs = await shell_run_command.fn(command-command, return_all=True)
File "/usr/local/lib/python3.8/site-packages/prefect_shell/commands.py", line 114, in shell_run_command 
raise RuntimeError(msg)
RuntimeError: Command failed with exit code 2:
Lock 140243394888224 released on /root/.cache/snowflake/ocsp_response_validation_cache.lock
20:54:08.536 | ERROR Task run 'soda_scan_execute-0' - Finished in state Failed('Task run encountered an exception: RuntimeError: Command failed with exit code 2:\nLock 140243394888224 released on /root/.cache/snowflake/ocsp_response_ validation_cache.lock\n\n') 
20:54:08.538 | INFO Flow run 'steadfast-centipede' - Failed('Task run encountered an exception: RuntimeError: Command failed with exit code 2: \nLock 140243394888224 released on /root/.cache/snowflake/ocsp_response_validation_cache.1 ock\n\n')
20:54:08.594 | ERROR Flow run 'steadfast-centipede' - Finished in state Failed('1/1 states failed.')
Traceback (most recent call last):
File "/app/main.py", line 122, in <module>
run_soda_scan()
File "/usr/local/lib/python3.8/site-packages/prefect/flows.py", line 468, in ___call___
return enter_flow_run_engine_from_flow_call( 
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 184, in enter_flow_run_engine_from_flow_call 
retval = from_sync.wait_for_call_in_loop_thread(
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/api.py", line 137, in wait_for_call_in_loop_thread 
return call.result()
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 173, in result
return self.future.result(timeout=timeout)
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 218, in _run_async 
result = await coro
File "/usr/local/lib/python3.8/site-packages/prefect/client/utilities.py", line 40, in with_injected_client 
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 258, in create_then_begin_flow_run 
return await state.result(fetch=True)
File "/usr/local/lib/python3.8/site-packages/prefect/states.py", line 91, in _get_state_result
raise await get_state_exception (state)
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 1552, in orchestrate_task_run
result = await call.aresult()
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 181, in aresult 
return await asyncio.wrap_future(self.future)
File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 218, in _run_async 
result = await coro
File "/usr/local/lib/python3.8/site-packages/prefect_soda_core/tasks.py", line 104, in soda_scan_execute soda_logs = await shell_run_command.fn(command=command, return_all=True)
File "/usr/local/lib/python3.8/site-packages/prefect_shell/commands.py", line 114, in shell_run_command 
raise RuntimeError(msg)
RuntimeError: Command failed with exit code 2:
Lock 140243394888224 released on /root/.cache/snowflake/ocsp_response_validation_cache.lock

@AlessandroLollo
Copy link
Collaborator

Hey @DVD-99 👋
Where you able to solve the issue?
Otherwise, can you provide a reproducible example?
Thanks!

@DVD-99
Copy link
Author

DVD-99 commented Aug 21, 2023

@AlessandroLollo The above issue has been fixed with this PR #21
But there is this new error

Encountered exception during execution:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/prefect/engine.py", line 1730, in orchestrate_task_run
    result = await call.aresult()
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 292, in aresult
    return await asyncio.wrap_future(self.future)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 346, in _run_async
    result = await coro
             ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prefect_soda_core/tasks.py", line 148, in soda_scan_execute
    return soda_logs
           ^^^^^^^^^
UnboundLocalError: cannot access local variable 'soda_logs' where it is not associated with a value

Finished in state Failed("Task run encountered an exception UnboundLocalError: cannot access local variable 'soda_logs' where it is not associated with a value")

@AlessandroLollo
Copy link
Collaborator

Hey @DVD-99 👋
Glad to know the lock error was resolved!
Will take a look at this new one, should be quite simple to fix.

@AlessandroLollo
Copy link
Collaborator

Hey @DVD-99 can you share a snippet to reproduce the error?
Thanks!

@AlessandroLollo
Copy link
Collaborator

AlessandroLollo commented Aug 22, 2023

I suspect the error happens because the soda scan command fails but the raised exception does not start with Command failed with exit code 2: and return_scan_file_content is set to False.

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

No branches or pull requests

2 participants