Skip to content

Commit

Permalink
Version 1.1.7
Browse files Browse the repository at this point in the history
- Splunk UCC, SDK and other librairies refresh to very last versions
- Switch http.status_code verification from an explicit list of 2* codes to allow any 2* code, this change is to allow a workaround using Power Automate Flow to allow the deprecation of message cards by Microsoft.
  • Loading branch information
guilhemmarchand committed Oct 4, 2024
1 parent d503bf8 commit d363a78
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions docs/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release notes
#############

Version 1.1.7
=============

- Splunk UCC, SDK and other librairies refresh to very last versions
- Switch http.status_code verification from an explicit list of 2* codes to allow any 2* code, this change is to allow a workaround using Power Automate Flow to allow the deprecation of message cards by Microsoft.

Version 1.1.6
=============

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def process_event(helper, *args, **kwargs):
use_proxy=opt_use_proxy,
)
# No http exception, but http post was not successful
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):

helper.log_error(
"Microsoft Teams publish to channel has failed!. "
Expand Down Expand Up @@ -613,7 +613,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -668,7 +668,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def process_event(helper, *args, **kwargs):
)

# No http exception, but http post was not successful
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"Microsoft Teams publish to channel has failed!. "
"url={}, data={}, HTTP Error={}, HTTP Reason={}, HTTP content={}".format(
Expand Down Expand Up @@ -181,7 +181,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -213,7 +213,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd
# and does not have to be verified
response = requests.delete(record_url, headers=headers, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore delete operation has failed!. url={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -265,7 +265,7 @@ def process_event(helper, *args, **kwargs):
response = requests.post(
record_url, headers=headers, data=record, verify=False
)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -314,7 +314,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd and
# does not have to be verified
response = requests.post(record_url, headers=headers, data=record, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore saving has failed!. url={}, data={}, HTTP Error={}, "
"content={}".format(
Expand Down Expand Up @@ -352,7 +352,7 @@ def process_event(helper, *args, **kwargs):
# Splunk Cloud vetting note, this communication is a localhost communication to splunkd and
# does not have to be verified
response = requests.delete(record_url, headers=headers, verify=False)
if response.status_code not in (200, 201, 204):
if not (200 <= response.status_code < 300):
helper.log_error(
"KVstore delete operation has failed!. url={}, HTTP Error={}, "
"content={}".format(record_url, response.status_code, response.text)
Expand Down

0 comments on commit d363a78

Please sign in to comment.