Closed vinay033 closed 4 years ago
Changing to this format would break the existing API contract. The Response is by definition a rule and thus the nested rule is not necessary and the response below would not break the current contract.
{
"messages":[],
"id":"2d543148-c733-11ea-ac94-080027ee87c4",
"name":"test1",
"event":"CCRFailure",
"SlackAlert": {
"url":"http://requestbin.sjcmmsn.com/ys9bp7ys"
}
}
can we make it like
{
"messages":[],
"id":"454705d2-c733-11ea-a46b-080027ee87c4",
"rule":
{
"id":"454705d2-c733-11ea-a46b-080027ee87c4",
"name":"test3",
"event":"CCRFailure",
"WebhookAlert": {
"url":"https://a2-dev.test/settings/data-feed/form"
}
}
}
I have pushed code changes to a branch https://github.com/chef/automate/compare/satellite15/%234074
I had to update the notifications_compile_protobuf function to include additional src directories as recent secrets.proto changes were breaking the build.
However I have problems compiling the notifications-service I get the following errors assembling the release
Generated notifications app
==> Assembling release..
==> Building release notifications:1.0.0 using environment habitat
==> Including ERTS 10.3 from /hab/pkgs/core/erlang/21.3/20200404003757/lib/erlang/erts-10.3
==> Release failed, during .boot generation:
Duplicated modules:
'Elixir.Google.Protobuf.Value' specified in google_protos and notifications
'Elixir.Google.Protobuf.Struct.FieldsEntry' specified in google_protos and notifications
'Elixir.Google.Protobuf.Struct' specified in google_protos and notifications
'Elixir.Google.Protobuf.NullValue' specified in google_protos and notifications
'Elixir.Google.Protobuf.ListValue' specified in google_protos and notifications
notifications-service: Build time: 2m44s
notifications-service: Exiting on error
I haven't worked out what these are yet, maybe @lancewf could shed some light on these?
I have these build issues sorted. Now trying to make this work.
@vinay033 You can test with this branch https://github.com/chef/automate/compare/satellite15/%234074
You need to build the automate-gateway and notifications-service components and deploy them to receive the updated responses. I have them as originally requested.
changes required for notification create API backend response
needed changes for https://github.com/chef/automate/issues/3708 right now we are getting below response from creating API
but we needed to create API response like mentioned below
response for WebhookAlert