-
Notifications
You must be signed in to change notification settings - Fork 39
Patch Search #87 #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
floatingstatic
merged 3 commits into
StackStorm-Exchange:master
from
jpavlav:jpavlav/#87/patch_search
Sep 15, 2025
Merged
Patch Search #87 #88
floatingstatic
merged 3 commits into
StackStorm-Exchange:master
from
jpavlav:jpavlav/#87/patch_search
Sep 15, 2025
+352
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR addresses StackStorm-Exchange#87. Atlassian has deprecated the previous `search` endpoint on their `/v2/` api. This PR includes the modified code from the upstream `jira` python package. It is not possible to simply upgrade the version at this time, because the stable release of `st2` is on `python3.8`. The `jira` python package that includes this update to the `search` function requires `python3.10` or higher. [Atlassian Changelog](https://developer.atlassian.com/changelog/#CHANGE-2046) ### Pre-patch ```yaml id: 68c4d36858dbb201f539580b action.ref: jira.search_issues context.user: st2admin parameters: log_level: DEBUG query: project = SCOPS ORDER BY created DESC status: failed (2s elapsed) start_timestamp: Sat, 13 Sep 2025 02:14:00 UTC end_timestamp: Sat, 13 Sep 2025 02:14:02 UTC log: - status: requested timestamp: '2025-09-13T02:14:00.360000Z' - status: scheduled timestamp: '2025-09-13T02:14:00.509000Z' - status: running timestamp: '2025-09-13T02:14:00.544000Z' - status: failed timestamp: '2025-09-13T02:14:02.406000Z' result: exit_code: 1 result: None stderr: "Traceback (most recent call last): File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 395, in <module> obj.run() File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 214, in run output = action.run(**self._parameters) File "/opt/stackstorm/packs.dev/jira/actions/search_issues.py", line 14, in run issues = self._client.search_issues(query, startAt=start_at, File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/jira/client.py", line 3557, in search_issues issues = self._fetch_pages( File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/jira/client.py", line 817, in _fetch_pages resource = self._get_json( File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/jira/client.py", line 4358, in _get_json else self._session.get(url, params=params) File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/jira/resilientsession.py", line 247, in request elif raise_on_error(response, **processed_kwargs): File "/opt/stackstorm/virtualenvs/jira/lib/python3.8/site-packages/jira/resilientsession.py", line 72, in raise_on_error raise JIRAError( jira.exceptions.JIRAError: JiraError HTTP 410 url: https://<redacted>.atlassian.net/rest/api/2/search?jql=project+%3D+SCOPS+AND+statusCategory+%21%3D+Done+ORDER+BY+created+DESC&startAt=0&validateQuery=True&fields=%2Aall&maxResults=50 \ttext: The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046 " stdout: '' ``` ### Post-patch ```yaml id: 68c4e40958dbb201f5395824 action.ref: jira.search_issues context.user: st2admin parameters: log_level: DEBUG query: reporter = currentUser() ORDER BY created DESC status: succeeded (3s elapsed) start_timestamp: Sat, 13 Sep 2025 03:24:57 UTC end_timestamp: Sat, 13 Sep 2025 03:25:00 UTC log: - status: requested timestamp: '2025-09-13T03:24:57.308000Z' - status: scheduled timestamp: '2025-09-13T03:24:57.369000Z' - status: running timestamp: '2025-09-13T03:24:57.392000Z' - status: succeeded timestamp: '2025-09-13T03:25:00.296000Z' result: exit_code: 0 result: - assignee: null created_at: 2025-08-08T23:39:38.473-0400 description: 'Test ' id: '1374684' key: SCOPS-11111 labels: [] priority: Unprioritized reporter: Justin Palmer resolution: null resolved_at: null status: To do summary: 'Test ' updated_at: 2025-08-09T03:49:29.881-0400 url: https://<redacted>.atlassian.net/browse/SCOPS-11111 ```
floatingstatic
approved these changes
Sep 15, 2025
Collaborator
floatingstatic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpavlav thanks, looks good to me! I'll make a note that we can look at potentially reverting parts of this after st2 3.9 release
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses #87. Atlassian has deprecated the previous
searchendpoint on their/v2/api. This PR includes the modified code from the upstreamjirapython package. It is not possible to simply upgrade the version at this time, because the stable release ofst2is onpython3.8. Thejirapython package that includes this update to thesearchfunction requirespython3.10or higher.Atlassian
Changelog
Pre-patch
Post-patch