Hello, we're observing an issue with Prefect Artif...
# ask-community
l
Hello, we're observing an issue with Prefect Artifacts and mapped tasks after update to 0.15.6, any ideas how to resolve 🙏 ?
k
Hi @Lukas N., what is the issue?
l
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.
Copy code
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
Copy code
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\'}]'}}}]
k
Is this specifically artifacts or does it affect flows without artifacts too?
Ok i think there is a bug. I’ll open an issue.
l
It's specific to artifacts in mapped tasks only, at least what we're observing
k
Will ask the team to confirm there is an issue.
l
just tested few versions of prefect on the ☝️ example,
0.15.4
works
0.15.5
doesn't
k
I opened it here
👍 1
thanks for the details!
l
thanks