Title
l

Lukas N.

11/03/2021, 1:23 PM
Hello, we're observing an issue with Prefect Artifacts and mapped tasks after update to 0.15.6, any ideas how to resolve 🙏 ?
k

Kevin Kho

11/03/2021, 1:24 PM
Hi @Lukas N., what is the issue?
l

Lukas N.

11/03/2021, 1:24 PM
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\'}]'}}}]
k

Kevin Kho

11/03/2021, 1:25 PM
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

Lukas N.

11/03/2021, 1:31 PM
It's specific to artifacts in mapped tasks only, at least what we're observing
k

Kevin Kho

11/03/2021, 1:33 PM
Will ask the team to confirm there is an issue.
l

Lukas N.

11/03/2021, 1:42 PM
just tested few versions of prefect on the ☝️ example,
0.15.4
works
0.15.5
doesn't
k

Kevin Kho

11/03/2021, 1:44 PM
I opened it here
👍 1
thanks for the details!
l

Lukas N.

11/03/2021, 1:50 PM
thanks