Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 05/Mar/15 9:41 AM
Description:

Please look at the following comment:

https://issues.jenkins-ci.org/browse/JENKINS-12827?focusedCommentId=201381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-201381

This behavior does not work anymore in Jenkins 1.601.
The queue item URL which is in the location header of the start-build URL returns HTTP status code 404.

Steps to reproduce the problem

Start build via Remote API

The initial request was:

http://myjenkins/job/zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8/build

The HTTP header contains the correct location URL:

HTTP/1.1 201 Created
Date: ...
Server: ...
Location: http://myjenkins/queue/item/68/

Queue object while build is in the queue

That works in all used Jenkins versions.
URL: https://myjenkins:8081/queue/api/json
JSON response:

{
    "items": 
[
{
    "actions": 
[
{
    "causes": 
[
            {
                "shortDescription": "Started by user XYZ",
                "userId": "xyz",
                "userName": "xyz"
            }
        ]
    }
],
"blocked": false,
"buildable": false,
"id": 68,
"inQueueSince": 1425545634280,
"params": "",
"stuck": false,
"task":
            {
                "name": "zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8",
                "url": "https://myjenkins:8081/job/zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8/",
                "color": "notbuilt"
            },
            "url": "queue/item/68/",
            "why": "In the quiet period. Expires in 4.2 sec",
            "timestamp": 1425545639280
        }
    ]
}

Queue item object while build is in the queue

That does not work anymore in Jenkins 1.601. The following queue item URL is not found (HTTP status code 404).
URL: https://myjenkins:8081/queue/item/68/api/json
JSON response:

{
    "actions": 
[
{
    "causes": 
[
            {
                "shortDescription": "Started by user xyz
                "userId": "xyz",
                "userName": "xyz"
            }
        ]
    }
],
"blocked": false,
"buildable": false,
"id": 68,
"inQueueSince": 1425545634280,
"params": "",
"stuck": false,
"task":
{
    "name": "zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8",
    "url": "https://myjenkins:8081/job/zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8/",
    "color": "blue"
},
"url": "queue/item/68/",
"why": null,
"cancelled": false,
"executable":
    {
        "number": 1,
        "url": "https://myjenkins:8081/job/zzz_dummy_a61d370a3954428a949b87fc3d8f3cf8/1/"
    }
}

Cause of the issue

The reasons of the problem could be:

  1. The quiet period parameter is ignored. (In our case in it is 5 seconds by default.) That would mean, that queue item is deleted very fast and could not be requested properly.
  2. Maybe the queue item URL is not yet created anymore.

Possible Solution

In my opinion the solution would be to make the queue item URL still accessible even if the queue item is deleted. For our build workflow that would be a fine solution.

Or is there any other way to request finished queue items?

Goal

Our goal is to track a Jenkins build via external tools. So if there is another way to safely track a started build, please let me know.

Environment: Jenkins >= 1.601
Project: Jenkins
Labels: remote queue
Priority: Critical Critical
Reporter: Christian Gnüchtel
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to