Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-2628

Invalid JSON from ci.jenkins.io breaks incrementals-publisher

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: ci.jenkins.io
    • Labels:
      None
    • Environment:
      ci.jenkins.io running 2.222.4 as of June 3, 2020 with pipeline library from same date
    • Similar Issues:

      Description

      Jenkins core pull request builds succeed but include an ignored error message at the end of the build log. The message is:

      17:49:15  [Pipeline] bat
      17:49:15  
      17:49:15  jenkins@win2019-0d49f0 C:\Jenkins\workspace\Core_jenkins_PR-4766>curl.exe -i -H "Content-Type: application/json" -d "{""build_url"":""https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4766/5/""}" "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=****"   || echo Problem calling Incrementals deployment function 
      17:49:15    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
      17:49:15                                   Dload  Upload   Total   Spent    Left  Speed
      17:49:16  
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      100   611  100   538  100    73    538     73  0:00:01 --:--:--  0:00:01   850
      17:49:16  HTTP/1.1 400 Bad Request
      17:49:16  Content-Length: 538
      17:49:16  Content-Type: text/plain; charset=utf-8
      17:49:16  Request-Context: appId=cid-v1:ea51b449-66e3-4af7-ac1a-bf45e22a223b
      17:49:16  Date: Wed, 03 Jun 2020 23:49:15 GMT
      17:49:16  
      17:49:16  invalid json response body at https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4766/5/api/json?tree=actions[revision[hash,pullHash]] reason: Unexpected token < in JSON at position 0
      17:49:16  FetchError: invalid json response body at https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4766/5/api/json?tree=actions[revision[hash,pullHash]] reason: Unexpected token < in JSON at position 0
      17:49:16      at D:\home\site\wwwroot\incrementals-publisher\node_modules\node-fetch\lib\index.js:254:32
      17:49:16      at process._tickCallback (internal/process/next_tick.js:68:7)
      17:49:16  [Pipeline] }
      

      The infra.maybePublishIncrementals() on Windows seems to be the cause of the failure in the two cases that I checked.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment - - edited

          Thanks very much Tim Jacomb.

          As far as I can tell, incremental publishing is now reporting a different message:

          12:57:24  + curl -i -H Content-Type: application/json -d {"build_url":"https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/"} https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=****
          12:57:24    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
          12:57:24                                   Dload  Upload   Total   Spent    Left  Speed
          12:57:26  
            0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
          100    73    0     0  100    73      0     56  0:00:01  0:00:01 --:--:--    56
          100   724  100   651  100    73    301     33  0:00:02  0:00:02 --:--:--   335
          100   724  100   651  100    73    301     33  0:00:02  0:00:02 --:--:--   335
          12:57:26  HTTP/1.1 200 OK
          12:57:26  Content-Length: 651
          12:57:26  Content-Type: text/plain; charset=utf-8
          12:57:26  Request-Context: appId=cid-v1:ea51b449-66e3-4af7-ac1a-bf45e22a223b
          12:57:26  Date: Sat, 06 Jun 2020 18:57:25 GMT
          12:57:26  
          12:57:26  Skipping deployment as no artifacts were found with the expected path, typically due to a PR merge build not up to date with its base branch: https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/artifact/**/*-rc*.13831d2ca80a/*-rc*.13831d2ca80a*/*zip*/archive.zip
          12:57:26  
          12:57:26  SuccessRequestError: Skipping deployment as no artifacts were found with the expected path, typically due to a PR merge build not up to date with its base branch: https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/artifact/**/*-rc*.13831d2ca80a/*-rc*.13831d2ca80a*/*zip*/archive.zip
          12:57:26  
          12:57:26      at IncrementalsPlugin.main (D:\home\site\wwwroot\incrementals-publisher\index.js:227:13)
          
          Show
          markewaite Mark Waite added a comment - - edited Thanks very much Tim Jacomb . As far as I can tell, incremental publishing is now reporting a different message: 12:57:24 + curl -i -H Content-Type: application/json -d {"build_url":"https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/"} https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=**** 12:57:24 % Total % Received % Xferd Average Speed Time Time Time Current 12:57:24 Dload Upload Total Spent Left Speed 12:57:26 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 73 0 0 100 73 0 56 0:00:01 0:00:01 --:--:-- 56 100 724 100 651 100 73 301 33 0:00:02 0:00:02 --:--:-- 335 100 724 100 651 100 73 301 33 0:00:02 0:00:02 --:--:-- 335 12:57:26 HTTP/1.1 200 OK 12:57:26 Content-Length: 651 12:57:26 Content-Type: text/plain; charset=utf-8 12:57:26 Request-Context: appId=cid-v1:ea51b449-66e3-4af7-ac1a-bf45e22a223b 12:57:26 Date: Sat, 06 Jun 2020 18:57:25 GMT 12:57:26 12:57:26 Skipping deployment as no artifacts were found with the expected path, typically due to a PR merge build not up to date with its base branch: https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/artifact/**/*-rc*.13831d2ca80a/*-rc*.13831d2ca80a*/*zip*/archive.zip 12:57:26 12:57:26 SuccessRequestError: Skipping deployment as no artifacts were found with the expected path, typically due to a PR merge build not up to date with its base branch: https://ci.jenkins.io/job/Core/job/jenkins/job/PR-4767/6/artifact/**/*-rc*.13831d2ca80a/*-rc*.13831d2ca80a*/*zip*/archive.zip 12:57:26 12:57:26 at IncrementalsPlugin.main (D:\home\site\wwwroot\incrementals-publisher\index.js:227:13)
          Hide
          zastai Tim Van Holder added a comment -

          I had the same message on two PRs, but they were indeed behind master, so I fetched, merged and pushed. Will see if that resolves it.

          Does seem to make it quite tricky to get PRs published as incrementals when it's such a moving target, especially with how long builds take.

          Show
          zastai Tim Van Holder added a comment - I had the same message on two PRs, but they were indeed behind master, so I fetched, merged and pushed. Will see if that resolves it. Does seem to make it quite tricky to get PRs published as incrementals when it's such a moving target, especially with how long builds take.
          Hide
          markewaite Mark Waite added a comment -

          https://ci.jenkins.io/job/Core/job/jenkins/view/change-requests/job/PR-4774/4/ shows that the incrementals publisher is working if the base branch is a superset of the master branch. Closing this as resolved

          Show
          markewaite Mark Waite added a comment - https://ci.jenkins.io/job/Core/job/jenkins/view/change-requests/job/PR-4774/4/ shows that the incrementals publisher is working if the base branch is a superset of the master branch. Closing this as resolved
          Hide
          jglick Jesse Glick added a comment -

          Broken again.

          Show
          jglick Jesse Glick added a comment - Broken again.
          Hide
          timja Tim Jacomb added a comment -

          changed the password back again...
          caused by the mass reset.

          Show
          timja Tim Jacomb added a comment - changed the password back again... caused by the mass reset.

            People

            Assignee:
            timja Tim Jacomb
            Reporter:
            markewaite Mark Waite
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: