Lukas N.
11/03/2021, 1:23 PMKevin Kho
Lukas N.
11/03/2021, 1:24 PMfrom prefect.artifacts import create_markdown
import prefect
from prefect import task, Flow
@task
def foo(param):
create_markdown(f'Task {prefect.context["task_full_name"]}: {param}')
with Flow(
'test_artifacts',
) as flow:
foo('unmapped') # <-- this works
foo.map([1, 2, 3]) # <-- this doesn't
if __name__ == "__main__":
flow.register(project_name='test')
I'm running the flow locally from UI (prefect server start
+ prefect agent local start --show-flow-logs
). Artifacts for the unmapped task are created fine, for the mapped task it gives
prefect.exceptions.ClientError: [{'message': '[{\'extensions\': {\'path\': \'$.selectionSet.insert_task_run_artifact.args.objects\', \'code\': \'constraint-violation\'}, \'message\': \'Not-NULL violation. null value in column "tenant_id" violates not-null constraint\'}]', 'locations': [{'line': 2, 'column': 5}], 'path': ['create_task_run_artifact'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': '[{\'extensions\': {\'path\': \'$.selectionSet.insert_task_run_artifact.args.objects\', \'code\': \'constraint-violation\'}, \'message\': \'Not-NULL violation. null value in column "tenant_id" violates not-null constraint\'}]'}}}]
Kevin Kho
Kevin Kho
Lukas N.
11/03/2021, 1:31 PMKevin Kho
Lukas N.
11/03/2021, 1:42 PM0.15.4
works 0.15.5
doesn'tKevin Kho
Kevin Kho
Lukas N.
11/03/2021, 1:50 PM