akshayrai commented on a change in pull request #4814: [TE][notification] Minor
cleaning up of the jira related code
URL: https://github.com/apache/incubator-pinot/pull/4814#discussion_r345939546
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/notification/formatter/channels/JiraContentFormatter.java
##########
@@ -156,13 +135,43 @@ private JiraEntity buildJiraEntity(String jiraTemplate,
Map<String, Object> temp
Template template = freemarkerConfig.getTemplate(jiraTemplate);
template.process(templateValues, out);
- String alertEmailHtml = new String(baos.toByteArray(), CHARSET);
+ description = new String(baos.toByteArray(), CHARSET);
+ } catch (Exception e) {
+ description = "Found an exception while constructing the description
content. Pls report & reach out"
+ + " to the Thirdeye team. Exception = " + e.getMessage();
+ }
+
+ return description;
Review comment:
When an exception is thrown in this method, the description is neither null
or empty. It will store and print an error message in the jira ticket.
Reg. Snapshot- this is not enabled right now. I will test and enable this in
a subsequent PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]