Closed Ishankoradia closed 11 months ago
Updated prefect to 2.11.5 and ran a flow. The webhook is now being invoked although we seem to have lost the configuration
2|prefect- | pydantic.error_wrappers.ValidationError: 2 validation errors for DiscordWebhook
2|prefect- | webhook_id
2|prefect- | field required (type=value_error.missing)
2|prefect- | webhook_token
2|prefect- | field required (type=value_error.missing)
@Ishankoradia please reconfigure the webhooks and trigger a quick run for the deployment manual-sync-shri-kobotoolbox-postgres
seem
Were we checking in the right virtual environement? I remeber us having this confusion before also
2|prefect- | File "/home/ddp/prefect-proxy/venv/lib/python3.10/site-packages/prefect/server/services/flow_run_notifications.py", line 92, in send_flow_run_notification
2|prefect- | block = Block._from_block_document(
2|prefect- | File "/home/ddp/prefect-proxy/venv/lib/python3.10/site-packages/prefect/blocks/core.py", line 623, in _from_block_document
2|prefect- | block = block_cls.parse_obj(block_document.data)
2|prefect- | File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
2|prefect- | File "/home/ddp/prefect-proxy/venv/lib/python3.10/site-packages/prefect/blocks/notifications.py", line 37, in __init__
2|prefect- | super().__init__(*args, **kwargs)
2|prefect- | File "/home/ddp/prefect-proxy/venv/lib/python3.10/site-packages/prefect/blocks/core.py", line 249, in __init__
2|prefect- | super().__init__(*args, **kwargs)
2|prefect- | File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
2|prefect- | pydantic.error_wrappers.ValidationError: 2 validation errors for DiscordWebhook
2|prefect- | webhook_id
2|prefect- | field required (type=value_error.missing)
2|prefect- | webhook_token
2|prefect- | field required (type=value_error.missing)
we were not using the DiscordWebhook from prefect, we were using a package called prefect-2-discord
, which hadn't been added to the new venv
prefect
to 2.11.3
prefect-2-discord==0.1.1
and that fixed it
ImportError: cannot import name 'DiscordWebhook' from 'prefect.blocks.notifications' (/home/ddp/prefect-proxy/venv/lib/python3.10/site-packages/prefect/blocks/notifications.py)
prefect --version
gives2.11.3
the documentation for which doesn't show
DiscordWebhook
DiscordWebhook
first appears in 2.11.5how is the Discord Webhook configuration showing up in the Prefect UI then? And how come it was working until recently