The class for the custom block is exactly the same as the SlackWebhook one. KeyError: "No class found for dispatch key 'mattermost-webhook' in registry for type 'Block'." When enabled, the user can type code starting, hit ENTER, and instead of sending the message, it adds a new line to the code block. Return lookup_type(cls, block_schema_to_key(schema))įile "/home/nduminy/.pyenv/versions/3.9.7/envs/youtube-v2-test/lib/python3.9/site-packages/prefect/utilities/dispatch.py", line 186, in lookup_type However, when adding a notification via the UI with this new custom type (policy all tags and all states), it fails to notify with the following error: Error sending notification for policy 85df5553-6aab-47eb-800a-40dd407c522b on flow run 9703078b-257c-4455-a187-90adf0b3412aįile "/home/nduminy/.pyenv/versions/3.9.7/envs/youtube-v2-test/lib/python3.9/site-packages/prefect/orion/services/flow_run_notifications.py", line 88, in send_flow_run_notificationįile "/home/nduminy/.pyenv/versions/3.9.7/envs/youtube-v2-test/lib/python3.9/site-packages/prefect/blocks/core.py", line 401, in _from_block_documentĮlse cls.get_block_class_from_schema(block_document.block_schema)įile "/home/nduminy/.pyenv/versions/3.9.7/envs/youtube-v2-test/lib/python3.9/site-packages/prefect/blocks/core.py", line 432, in get_block_class_from_schema If disabled, pressing Shift Enter on Windows or Linux. or pressing on Mac automatically closes the code block and posts the message. It is working fine when I create a test block on the UI and load it to notify by hand. Using Mattermost in a web browser or the desktop app, you can change the email address where notifications are sent by selecting Profile > Profile Settings > Email. When a user post contains a Github code line, it should attach a markdown code block that will contain the preview of that section of the code with possibly 3 lines before and after (much like the display shown in code compares. I was able to register a custom notification block class, and I can create instances on the UI. There, you can also learn how to use Markdown to make code snippets, math formulas, and tables appear in special formats, too. Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations. Markdown utilizes an easily consumable plaintext syntax to denote rich content elements such as bold/italic items, numbered and bulleted lists, code blocks.
0 Comments
Leave a Reply. |