this issue is related to
https://prefect-community.slack.com/archives/CL09KU1K7/p1634635485031900. We're using the Artifacts beta feature and it broke when we updated to Prefect 0.15.6, also tested on latest 0.15.7, it was working before.
from 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\'}]'}}}]