[JIRA] (JENKINS-58581) The installNecessaryPlugins REST API fails to inform user when the plugin version does not exist

6 views
Skip to first unread message

martin.danjou14@gmail.com (JIRA)

unread,
Jul 20, 2019, 9:50:02 PM7/20/19
to jenkinsc...@googlegroups.com
Martin d'Anjou created an issue
 
Jenkins / Bug JENKINS-58581
The installNecessaryPlugins REST API fails to inform user when the plugin version does not exist
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-07-21 01:49
Environment: Jenkins 2.176.2
Priority: Minor Minor
Reporter: Martin d'Anjou

This REST API does not report that the requested plugin version does not exist:

curl -v -X POST -d "<jenkins><install plugin=\"workflow-...@2.130\" /></jenkins>" -H "Content-Type: text/xml" "http://localhost:8080/pluginManager/installNecessaryPlugins"

The response does not indicate a problem:

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /pluginManager/installNecessaryPlugins HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: text/xml
> Content-Length: 65
>
* upload completely sent off: 65 out of 65 bytes
< HTTP/1.1 302 Found
< Date: Sun, 21 Jul 2019 01:25:33 GMT
< X-Content-Type-Options: nosniff
< Location: http://localhost:8080/updateCenter
< Content-Length: 0
< Server: Jetty(9.4.z-SNAPSHOT)
<
* Connection #0 to host localhost left intact

But the log does have a warning:

WARNING: No such plugin workflow-aggregator to upgrade

This makes automating plugin installation from the REST API very error prone.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

martin.danjou14@gmail.com (JIRA)

unread,
Jul 20, 2019, 9:51:02 PM7/20/19
to jenkinsc...@googlegroups.com
Martin d'Anjou updated an issue
Change By: Martin d'Anjou
This REST API does not report that the requested plugin version does not exist:
{noformat}
curl -v -X POST
\
-d "<jenkins><install plugin=\"workflow-...@2.130\" /></jenkins>" \
-H "Content-Type: text/xml" \


The response does not indicate a problem:

{noformat}

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /pluginManager/installNecessaryPlugins HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Type: text/xml
> Content-Length: 65
>
* upload completely sent off: 65 out of 65 bytes
< HTTP/1.1 302 Found
< Date: Sun, 21 Jul 2019 01:25:33 GMT
< X-Content-Type-Options: nosniff
< Location: http://localhost:8080/updateCenter
< Content-Length: 0
< Server: Jetty(9.4.z-SNAPSHOT)
<
* Connection #0 to host localhost left intact
{noformat}


But the log does have a warning:
{noformat}

WARNING: No such plugin workflow-aggregator to upgrade
{noformat}


This makes automating plugin installation from the REST API very error prone.

martin.danjou14@gmail.com (JIRA)

unread,
Jul 21, 2019, 9:01:04 AM7/21/19
to jenkinsc...@googlegroups.com
Martin d'Anjou updated an issue
Change By: Martin d'Anjou
This is an Improvement ticket to fix the following problem:

This
REST API does not report that the requested plugin version does not exist:

martin.danjou14@gmail.com (JIRA)

unread,
Jul 21, 2019, 9:01:04 AM7/21/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages