guilhemmarchand / TA-jira-service-desk-simple-addon

Atlasian JIRA add-on for Splunk alert actions
11 stars 9 forks source link

Regression with version 2.10 regarding issues calling components #146

Closed cloutid closed 1 year ago

cloutid commented 1 year ago

We're going through an update phase at the moment with Splunk and we are also trying to update every app that is installed, this addon being one of them.

With the latest version we are encountering this error as I've put in the title.

HTTP Error=400, content={"errorMessages":[],"errors":{"components":"expected Object"}}"

Same jira ticket passes with no issues on version 2.0.7.

guilhemmarchand commented 1 year ago

@cloutid

I understand the TA fails to create a Jira issue, is this all your get from the alert logs?

(index="_internal" OR index="cim_modactions") (source="*jira_service_desk_modalert.log") CASE(ERROR)

Epecially at this level:

                # No http exception, but http post was not successful
                if response.status_code not in (200, 201, 204):
                    helper.log_error(
                        'JIRA Service Desk ticket creation has failed!. url={}, data={}, HTTP Error={}, '
                        'content={}'.format(jira_url, data, response.status_code, response.text))
cloutid commented 1 year ago

sendmodaction - signature="JIRA Service Desk ticket creation has failed!. url=https://jira.tpsgc-pwgsc.gc.ca/rest/api/latest/issue, data={'fields': {'project': {'key': 'GCDOCS'}, 'summary': 'Splunk Alert: DMC Alert - Missing forwarders (JIRA)', 'description': "The alert condition for 'DMC Alert - Missing forwarders (JIRA)' was triggered.\n\nMissing Forwarders:\nINNOV05", 'issuetype': {'name': 'Incident'}, 'priority': {'name': 'Critical'}, 'labels': ['Splunk'], 'components': ['TECH\\:SPLUNK'], 'customfield_11402': [{'value': 'ADDC'}], 'customfield_15302': [{'value': 'INNO'}], 'customfield_15301': [{'value': 'PSA / ASP'}]}}, HTTP Error=400, content={"errorMessages":[],"errors":{"components":"expected Object"}}" action_name="jira_service_desk" search_name="DMC Alert - Missing forwarders (JIRA)" sid="scheduler__admin_c3BsdW5rX21vbml0b3JpbmdfY29uc29sZQ__RMD51dc7b9afd916acd8_at_1669064040_22997" rid="0" app="splunk_monitoring_console" user="admin" action_mode="saved" action_status="failure"

Seems to have something to do with the components field, as soon as we remove it the jira gets created. at first we thought it was the ":" in the field value but it fails with any value in that field.

guilhemmarchand commented 1 year ago

Thanks @cloutid

I think I might have an idea then, the latest version invovled a large backend level change in the way the JIRA issue content gets created on the Python side (using dict rather concatenation)

Let me have a look, it might be that the component was meant to specify differently

cloutid commented 1 year ago

thanks @guilhemmarchand, appreciate it!

guilhemmarchand commented 1 year ago

Issue addressed in 2.0.11 @cloutid