jira icon indicating copy to clipboard operation
jira copied to clipboard

Upcoming Deprecation of Jira Cloud Search APIs

Open glewandowski opened this issue 11 months ago • 29 comments

Problem trying to solve

On October 31, 2024, Atlassian announced the deprecation of four Jira Cloud search APIs. These APIs will be replaced with new, more efficient alternatives through our enhanced JQL service, which are currently available for use. You can read more about these new APIs here. Effective May 1, 2025, Atlassian will remove the following Jira REST endpoints:

  • GET /rest/api/3/search
  • POST /rest/api/3/search
  • POST /rest/api/3/search/id
  • POST /rest/api/3/expression/eval We have identified that this library may be used to access the deprecated endpoints in Jira Cloud. Failing to migrate to the new APIs before May 1, 2025, could negatively impact any solutions that depend on this library. By evolving our JQL service, we aim to provide a more reliable, performant, and scalable Jira experience tailored to meet the needs of enterprise customers. If you have any questions or require further assistance, please do not hesitate to ask on our developer community forum

Possible solution(s)

client.py#search_issues https://github.com/pycontribs/jira/blob/3a630c5f1c771fb27b407860d684da879d14e622/jira/client.py#L3484 Function should be updated so it does call new endpoint /rest/api/3/search/jql and does not expose any deprecated parameters like startAt or validate_query

Alternatives

No response

Additional Context

No response

glewandowski avatar Jan 28 '25 14:01 glewandowski

Hi friends, is anybody actively working on this? Starting to get a little concerned as the deadline is rapidly approaching. Losing the ability to search for issues would be a pretty huge blow to how useful this library is.

jeffgeorge avatar Mar 07 '25 17:03 jeffgeorge

This is indeed very concerning. I will try to work on it during the weekends, but I have limited free time. It would be better if someone else made a PR.

wblondel avatar Mar 10 '25 14:03 wblondel

Hello everyone I am from Atlassian and I have started working on it and will raise a PR once the development is complete.

CC @jeffgeorge @glewandowski @wblondel

skumar36-atlassian avatar Mar 11 '25 05:03 skumar36-atlassian

Hello @jeffgeorge , @wblondel ,@adehad, @ssbarnea

I have raised a PR for this change: https://github.com/pycontribs/jira/pull/2326, can you please review. Also as this is my first contribution to this repo, please let me know what all rituals I should follow to meet this repository requirement.

skumar36-atlassian avatar Mar 18 '25 08:03 skumar36-atlassian

@gonchik can you help in merging/releasing this PR as well?

skumar36-atlassian avatar Mar 25 '25 15:03 skumar36-atlassian

PR was pushed to main. I hope it will be part of a release soon.

wblondel avatar Mar 31 '25 08:03 wblondel

trials can be run already via pip install git+https://github.com/pycontribs/jira

studioj avatar Apr 01 '25 20:04 studioj

From this week, I find two search exception during search people and create issue from an old stable service.

text: JiraError HTTP None text: No matching user found for: [email protected]

  1. {"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}

I guess jira cloud try to warn me to notify this change ?

lishoujun avatar Apr 03 '25 06:04 lishoujun

Is there a requirement for Python 3.10 or higher? What about previous versions?

ns-ccanevit avatar Apr 03 '25 15:04 ns-ccanevit

hey @studioj when can we release the change?

skumar36-atlassian avatar Apr 10 '25 04:04 skumar36-atlassian

We are very near to the deadline the Jira will remove these APIs in 1st of May, Can we please release the newer version? @studioj Thanks

jibraniqbal666 avatar Apr 16 '25 09:04 jibraniqbal666

glenn-sq avatar Apr 22 '25 16:04 glenn-sq

hey @studioj are you blocked somewhere?

skumar36-atlassian avatar Apr 23 '25 15:04 skumar36-atlassian

I don't have any rights to help out with the releasing... I'm sorry... I see @adehad and @ssbarnea did some improvements to the GHA ... But I think we're not there yet.

studioj avatar Apr 23 '25 18:04 studioj

@studioj I'm not sure the state of the pypi, but I think the server tests are broken indefinitely, we can try a pypi release with the current state of the GHA? I've given you necessary admin permission to also push through PRs without any pycomtribs approval, so do use those permissions as you see necessary to merge any relevant PRs.

State of CI reference is https://github.com/pycontribs/jira/issues/896#issuecomment-2829670005

adehad avatar Apr 25 '25 08:04 adehad

@studioj I'm not sure the state of the pypi, but I think the server tests are broken indefinitely, we can try a pypi release with the current state of the GHA? I've given you necessary admin permission to also push through PRs without any pycomtribs approval, so do use those permissions as you see necessary to merge any relevant PRs.

State of CI reference is #896 (comment)

Ok, I'll first draft a 3.10 release to try along the new GHA from @ssbarnea and i'll try taking it from there... Lets see

studioj avatar Apr 26 '25 21:04 studioj

i'm currently looking into how the jenkinsapi package does it in pycontribs .. hope im taking the right direction

studioj avatar Apr 26 '25 22:04 studioj

@adehad @ssbarnea i think something needs to be configured on pypi. I'm always getting the following error

* `invalid-publisher`: valid token, but no corresponding publisher (All lookup strategies exhausted)
* This generally indicates a trusted publisher configuration error, but could
also indicate an internal error on GitHub or PyPI's part.


The claims rendered below are **for debugging purposes only**. You should **not**
use them to configure a trusted publisher unless they already match your expectations.

If a claim is not present in the claim set, then it is rendered as `MISSING`.

* `sub`: `repo:pycontribs/jira:environment:pypi-publishing`
* `repository`: `pycontribs/jira`
* `repository_owner`: `pycontribs`
* `repository_owner_id`: `1846087`
* `workflow_ref`: `pycontribs/jira/.github/workflows/release.yml@refs/tags/3.10.2`
* `job_workflow_ref`: `pycontribs/jira/.github/workflows/release.yml@refs/tags/3.10.2`
* `ref`: `refs/tags/3.10.2`

studioj avatar Apr 26 '25 23:04 studioj

What I can do is publish the whl as a GitHub release... Then people could already use it like that🤔

studioj avatar Apr 27 '25 08:04 studioj

When would it be available on pip ?

anubhav-ranjan-alight avatar Apr 28 '25 10:04 anubhav-ranjan-alight

What I can do is publish the whl as a GitHub release... Then people could already use it like that🤔

Yes do git release.

jibraniqbal666 avatar Apr 28 '25 13:04 jibraniqbal666

What I can do is publish the whl as a GitHub release... Then people could already use it like that🤔

Yes do git release.

Had a chat with @ssbarnea ... He said he'll be able to fix the deployment probably before the deadline...

For the case that doesn't work out, I'll prepare that custom release by Tuesday evening and share the temporary fix in our readme as well as here

Will be something like

pip install https://github.com/pycontribs/jira/releases/3.10.1/something_somethong.whl

studioj avatar Apr 28 '25 14:04 studioj

What I can do is publish the whl as a GitHub release... Then people could already use it like that🤔

Yes do git release.

Had a chat with @ssbarnea ... He said he'll be able to fix the deployment probably before the deadline...

For the case that doesn't work out, I'll prepare that custom release by Tuesday evening and share the temporary fix in our readme as well as here

Will be something like

pip install https://github.com/pycontribs/jira/releases/3.10.1/something_somethong.whl

Please provide whl link.

anubhav-ranjan-alight avatar Apr 28 '25 14:04 anubhav-ranjan-alight

I believe there is a bug in the current updates that would be great to get fixed prior to publishing -> https://github.com/pycontribs/jira/issues/2346

glenn-sq avatar Apr 29 '25 18:04 glenn-sq

I believe there is a bug in the current updates that would be great to get fixed prior to publishing -> #2346

I think that should be fixed now in 3.10.1 which will be released soon

similarly this https://github.com/pycontribs/jira/pull/2348 adds the released whl file to the release assets ... I hope the URL is ok, im second guessing atm the url structure

studioj avatar Apr 29 '25 21:04 studioj

release should be installable as shown in the readme

pip install https://github.com/pycontribs/jira/releases/download/3.10.1/jira-3.10.1-py3-none-any.whl

studioj avatar Apr 29 '25 21:04 studioj

Hi All, thanks for getting that wheel posted as an interim solution. I was able to pull it into my uv-based project by running:

uv add https://github.com/pycontribs/jira/releases/download/3.10.1/jira-3.10.1-py3-none-any.whl

which added this block to the end of my pyproject.toml:

[tool.uv.sources]
jira = { url = "https://github.com/pycontribs/jira/releases/download/3.10.1/jira-3.10.1-py3-none-any.whl" }

Additionally, I can confirm that with no changes to my code I'm now hitting the correct endpoint:

2025-04-30 11:58:50,091 - DEBUG - https://[...].atlassian.net:443 "GET /rest/api/2/search/jql?jql=[...]&fields=%2Aall&expand=changelog&maxResults=50 HTTP/1.1" 200 None

Fingers crossed for tomorrow! 🤞

jeffgeorge avatar Apr 30 '25 16:04 jeffgeorge

I could be mistaken, but it seems to me the old API still works...

studioj avatar May 05 '25 07:05 studioj

In this code, I have added the redirection logic for JIRA cloud if it's called with startAt=0 then I redirect the call to the new search/jql API and if it's more than 0 then I throw an exception.

skumar36-atlassian avatar May 05 '25 07:05 skumar36-atlassian

What is the status of this? Note that atlassian pushed the deadline from May 1 to Aug. 1 2025

(base) PS C:\Users\AndrewGarland> python --version Python 3.12.7

(base) PS C:\Windows\system32> pip3 install --upgrade jira==3.10.1 ERROR: Could not find a version that satisfies the requirement jira==3.10.1 (from versions: 0.1.0, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.25, 0.28, 0.30, 0.31, 0.32, 0.33, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.50, 1.0.3, 1.0.7.dev20160607111203, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.13, 1.0.14, 1.0.15, 2.0.0.0rc3, 2.0.0.0rc4, 2.0.0.0rc6, 2.0.0.0rc7, 2.0.0.0rc9, 2.0.0.0rc10, 2.0.0, 2.0.1.0rc1, 3.0.0.0a0, 3.0a1, 3.0a2, 3.0.1, 3.1.0rc1, 3.1.1, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.4.1, 3.5.0, 3.5.1, 3.5.2, 3.6.0, 3.8.0)

Update: saw the readme comment about needing to install directly.

andrew-garland avatar Jul 02 '25 13:07 andrew-garland