[BUGFIX] Mass update script: Avoid passing in incident ids via query parameter, which can cause 414 errors #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link back to Jira ticket:
INCIDENTS-2776
Description
During some internal testing of the mass-update script to do bulk resolves, we found that the
i
/incident-ids
flag can cause the script to fail with a 414 error:This was when passing in a large number of incidents (100+) into the
i
flag. The cause was that these incident ids were being appended as query parameters, which eventually created a URL that's too large for the server to handle.Implementation
Changed the setup steps that occur for the resolve action, to simply pass the parsed list of incident ids to the initial PUT request that's used to fetch incident details; rather than appending them to the global
PARAMETERS
value that's used to build the query parameters for subsequent API calls.Steps to test changes
python mass_update_incidents.py -k mysecretapikey -s myserviceid -a resolve -e "from_email" -i incidentid1,incidentid2,etc
Documentation
- [] There is documentation that needs to be updated upon merging these changesLinks to any documentation to be updated: