refined-doctor-1380
08/31/2023, 3:52 AMwrapped = <function wf at 0x16316a670>, instance = None, args = (), kwargs = {}
@_decorator
def user_entry_point(wrapped, instance, args, kwargs):
"""
See the comment for the system_entry_point above as well.
Decorator for wrapping functions that enter into a user context. This will help us differentiate user-created
failures even when it is re-entrant into system code.
Note: a user_entry_point can ONLY ever be called from within a @system_entry_point wrapped function, therefore,
we can always ensure we will hit a system_entry_point to correctly reformat our exceptions. Also, any exception
we create here will only be handled within our system code so we don't need to worry about leaking weird exceptions
to the user.
"""
try:
_CONTEXT_STACK.append(_USER_CONTEXT)
if _is_base_context():
# See comment at this location for system_entry_point
fn_name = wrapped.__name__
try:
return wrapped(*args, **kwargs)
except FlyteScopedException as exc:
raise exc.type(f"Error encountered while executing '{fn_name}':\n {exc.value}") from exc
except Exception as exc:
> raise type(exc)(f"Error encountered while executing '{fn_name}':\n {exc}") from exc
E TypeError: Encountered error while executing workflow '<http://test_snowflake.wf|test_snowflake.wf>':
E Error encountered while executing 'wf':
E Failed to convert outputs of task 'test_snowflake.t1' at position 0:
E Protocol not known: snowflake
flytekit/exceptions/scopes.py:203: TypeError
-------------------------------------------------------------------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------------------------------------------------------------------
{"asctime": "2023-08-30 18:11:48,258", "name": "flytekit", "levelname": "ERROR", "message": "Failed to convert outputs of task 'test_snowflake.t1' at position 0:\n Protocol not known: snowflake"}
acceptable-window-92672
08/31/2023, 4:07 AMpip install -U git+<https://github.com/Yicheng-Lu-llll/flytekit.git@real-time-deck-support>
refined-doctor-1380
08/31/2023, 4:11 AMpip install -e .
to make sure we run the version) when it run the workflow.acceptable-window-92672
08/31/2023, 4:12 AMrefined-doctor-1380
08/31/2023, 4:13 AMacceptable-window-92672
08/31/2023, 4:15 AMacceptable-window-92672
08/31/2023, 4:15 AMrefined-doctor-1380
08/31/2023, 4:19 AMrefined-doctor-1380
08/31/2023, 4:26 AMrefined-doctor-1380
08/31/2023, 7:34 AM@mock.patch("snowflake.connector.connect")
in my unit-test function.
Any good suggestion?refined-doctor-1380
08/31/2023, 9:57 AM