-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
I have a thought around the publishing part. To me tailoring the message (with rigid email structure) already at publishing stage is a bit too early. I can understand this notification was probably designed for emailing purpose only, however I think it could be used for other things if the message only contains informative fields, e.g. |
Agreed, we built out the notifications feature with the original intent of just being able to produce email notifications but the eventual goal is to have a rich notification system that spans beyond emails and includes additional user-topic queues and of course, flexible notification message structures. This is all on the back-log unfortunately :( |
@honnix yes, eventual goal is to publish subscribable notifications to some pubsub system. I think the biggest thing we need to do is define the egress structure. But, this is awesome, 💯 |
@@ -129,7 +129,9 @@ type NotificationsConfig struct { | |||
// scheme is used. | |||
Type string `json:"type"` | |||
// Some cloud providers require a region to be set. | |||
Region string `json:"region"` | |||
Region string `json:"region"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should have 2 different structures.
AWS {
Region:
}
GCP {
projectID
}
etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that makes sense. Unfortunately that would be a breaking change. How do we handle this kind of change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there are a few other places having Region
defined, should we change them all? It does feel out of scope of this PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Played with this idea a bit. PTAL honnix#1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @kumare3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is out of the scope of this PR. But, if you can create a follow up issue we are golden :)
I tried a bit to add unit tests, but it seems this is where dependency injection happens, so I guess it is fine to skip unit test than adding another layer of injection? |
@katrogan @kumare3 We configured the message body to be a JSON, but due to no proper escaping, it's like playing with fire (as an example we cannot put
|
have dedicated config sections for aws and gcp
@katrogan ^^ did you see the mess
@katrogan did you see this message? |
@honnix can we take this as a separate issue and merge this one. I think your changes look good. |
+1 to filing a separate issue for message formatting |
Here it is flyteorg/flyte#293 |
* publish notification to GCP Pub/Sub * have dedicated config sections for aws and gcp Close flyteorg/flyte#268
TL;DR
Add support of GCP Pub/Sub for publishing workflow execution events.
Type
Are all requirements met?
Complete description
Tested on a GCP project with configuration:
Subscriber and emailer are NOT implemented in this PR, and the
emailer
configuration is only use to verify the correctness of message body.Tracking Issue
flyteorg/flyte#268
Follow-up issue
NA