Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6413

Releasing using REST API leads often to HTTP 500

    XMLWordPrintable

    Details

      Description

      The following script leads often to HTTP 500:

      Set your connect token in the environment variable TOKEN
      export TOKEN=...
      set USERNAME in the folowing script

      i=$1
      USERNAME=pabgrall
      while true; do
              let "i=$i+1"
              version="0.0."$i
              data="{\"revision\":\"feature/sup34748\",\"versionName\":\""${version}"\"}"
              curl -s X POST https://connect.nuxeo.com/nuxeo/site/studio/v2/project/pabgrall-sandbox-10-nuxe/releases -H "Content-Type: application/json" -u $USERNAME:$TOKEN -d $data
              sleep 10
              echo
      done
      

      (invoke the script with an increasing number ito avoid creating the same release number over and over)
      e.g.

      bash ./connect_release.sh 30
      {"entity-type":"exception","status":500,"message":"com.nuxeo.studio.core.api.exception.VersioningException: state='SAFE', dir='/var/lib/nuxeo/studio/workspaces/pabgrall-sandbox-10-nuxe/pabgrall-sandbox-10-nuxe-#658-cloned-2021-05-23-16-46-35/.git', HEAD='ref: refs/heads/master'"}
      {"entity-type":"exception","status":500,"message":"com.nuxeo.studio.core.api.exception.VersioningException: state='SAFE', dir='/var/lib/nuxeo/studio/workspaces/pabgrall-sandbox-10-nuxe/pabgrall-sandbox-10-nuxe-#682-cloned-2021-05-23-16-48-03/.git', HEAD='ref: refs/heads/master'"}
      {"entity-type":"exception","status":500,"message":"com.nuxeo.studio.core.api.exception.VersioningException: state='SAFE', dir='/var/lib/nuxeo/studio/workspaces/pabgrall-sandbox-10-nuxe/pabgrall-sandbox-10-nuxe-#682-cloned-2021-05-23-16-48-03/.git', HEAD='ref: refs/heads/master'"}
      {"entity-type":"exception","status":500,"message":"com.nuxeo.studio.core.api.exception.VersioningException: state='SAFE', dir='/var/lib/nuxeo/studio/workspaces/pabgrall-sandbox-10-nuxe/pabgrall-sandbox-10-nuxe-#682-cloned-2021-05-23-16-48-03/.git', HEAD='ref: refs/heads/master'"}
      {"version":"0.0.35","bundleSymbolicName":"studio.extensions.pabgrall-sandbox-10-nuxe","mavenCoordinates":"nuxeo-studio:pabgrall-sandbox-10-nuxe:0.0.35"}
      {"entity-type":"exception","status":500,"message":"com.nuxeo.studio.core.api.exception.VersioningException: state='SAFE', dir='/var/lib/nuxeo/studio/workspaces/pabgrall-sandbox-10-nuxe/pabgrall-sandbox-10-nuxe-#658-cloned-2021-05-23-16-46-35/.git', HEAD='ref: refs/heads/master'"}
      

      where the release "0.0.35" worked and not the others

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h