ONSdigital / dp-data-pipelines

Pipeline specific python scripts and tooling for automated website data ingress.
MIT License
1 stars 0 forks source link

Disable notifications #94

Closed mikeAdamss closed 5 months ago

mikeAdamss commented 5 months ago

What

Allow a developer to disable notifications to slack while developing by using the DISABLE_NOTIFICATIONS env var. This task: https://github.com/ONSdigital/dp-data-pipelines/issues/49

I've changed the nomanclature to "Notifier" over "Messenger" as its just pass/fail notifications now.

I've created a BasePipelineNotifier base class with two implementations:

There;'s a function which decides which one you've instantiated based on the DISABLE_NOTIFICATIONS env var.

Ran fmt and lint to tidy up the codebase so there's quite a lot of noise here. To stop this from happening all the time I've added a github action to run everything on push to branches (for now, we should really be using concourse).

How to review

Try it out. Sanity check.

Who can review

Anyone.