Uploaded image for project: 'Jira Software Cloud'
  1. Jira Software Cloud
  2. JSWCLOUD-24115

API calls to delete Versions time out

    XMLWordPrintable

Details

    Description

      Issue Summary

      Timeouts occur when deleting versions via API call, when a project has a high number of versions.

      Steps to Reproduce

      1.  https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-removeandswap-post
      2. Retrieve all existing versions (< 1s)
      3. Read the file of deleted versions, in reverse (oldest first)
      4. For each deleted version:
        • if it does not exist, skip it
        • if it does exist, send a POST request to aVersion.getSelfLink() + "/" + "removeAndSwap"
        • final HttpPost myRequest = new HttpPost(aVersion.getSelfLink() + "/" + "removeAndSwap");
          myRequest.setEntity(jsonEntity(Map.of()));

      Expected Results

      Versions are deleted from database. 

      Actual Results

      The below exception is thrown:

      ERROR c.i.r.server.jira.JiraRestApi - Exception on version deletion for com.imc.releasenotes.server.jira.JiraVersion@7573e12f: 
      <html> 
      <head><title>504 Gateway Time-out</title></head> 
      <body> 
      <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx</center> </body> 
      </html> 

      Workaround

      There is no workaround at this time. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2a6a615ea6bd Andy Launer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: