You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,9 @@ PROJECT_NAME = prefect_docker
5
5
PROJECT_SRV = ${PROJECT_NAME}
6
6
TARGET_URL ?=
7
7
TARGET_KEY ?=
8
+
TARGET_BUCKET ?=
8
9
DO_HARVEST ?= True
10
+
FULL_HARVEST ?= False
9
11
10
12
.PHONY = help
11
13
.DEFAULT:
@@ -61,6 +63,6 @@ submodules: ## Sets up the submodules and checks out their main branch.
61
63
git submodule foreach git checkout main
62
64
git submodule foreach git pull origin main
63
65
ingest: ## Runs the ingest workflow for a specified data provider. The url and key of the target can be optionally added. eg: make ingest data_provider=CBS TARGET_URL=https://portal.example.odissei.nl TARGET_KEY=abcde123-11aa-22bb-3c4d-098765432abc
When workflows fail notifications should be sent (to a Slack channel) in order for the person(s)
5
+
responsible for the service to check the logs and fix the problems.
6
+
7
+
8
+
# Configure Slack
9
+
10
+
There is a Slack workplace created for the messages about the Odissei Ingest (workflows) with the name `odissei-ingest`.
11
+
In this workspace there is a `prefect-notifications` channel that will be used for sending
12
+
the notifications from the prefect workflow on failures.
13
+
Using the Slack Api page (https://api.slack.com/apps/) a ‘Webhook App' application was created .
14
+
With this application there is a 'Webhooks Features' option that allows to create new webhooks. The URL for this newly created webhook is then used for the configuration of Prefect, described in the next section.
You can test this on the commandline, the message should appear in that Slack channel.
21
+
22
+
# Configure Prefect
23
+
24
+
Create a ‘Slack Webhook Block’ in the Prefect UI. That webhook URL from Slack is pasted into the the URL field of that block. The Prefect UI will give sample code to be placed inside your flow code in order to notify. This has been used in the code at the point where the 'bucket' with the failure information (failed dataset PIDs) is created. Noet that instead of using the hardcodede name of the block, you need to assign that name to the `PREFECT_SLACK_WEBHOOK_BLOCK` setting.
25
+
The simplest way to test if it works is to force an error by using wrong API key. Then check the logs, the Slack channel and the 'bucket'.
0 commit comments