Quantcast

[JIRA] Created: (JENKINS-10555) Extended choice plugin does not work with remote builds

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] Created: (JENKINS-10555) Extended choice plugin does not work with remote builds

JIRA noreply@jenkins-ci.org
Extended choice plugin does not work with remote builds
-------------------------------------------------------

                 Key: JENKINS-10555
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-10555
             Project: Jenkins
          Issue Type: Bug
          Components: plugin
         Environment: Hudson 1.395, Jenkins 1.383 with Extended choice Plugin 0.4
            Reporter: Danny Staple


The extended choice plugin will fail when used with remote builds. The parameter will not be recognised as being passed.
In the plugin the following function is incorrect:
{code()}
public ParameterValue createValue(StaplerRequest request) {

               String value[] = request.getParameterValues(getName());

               if (value == null) {
                       return getDefaultParameterValue();
               }
               return null;
       }
{code}

Note here that if the parameter is not set, it will set a default value. Otherwise it will always return NULL when it should return the current value, as something like a new ExtendedChoiceParameterValue.


--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-10555) Extended choice plugin does not work with remote builds

JIRA noreply@jenkins-ci.org

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

Costin Caraivan commented on JENKINS-10555:
-------------------------------------------

Confirmed.
Using GET with parameters for buildWithParameters triggers the build, but the default parameters are used.
Using POST with parameters returns HTTP 500.

Example usage and exception thrown:

send: b'POST http://jenkins.$PROJECT.corp.$COMPANY.com/job/StageDeploy_Restricted/buildWithParameters HTTP/1.1\r\nHost: jenkins.$PROJECT.corp.$COMPANY.com\r\nAccept-Encoding: identity\r\nContent-Length: 265\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: Basic Y2FyYWl2YW46YjNmN2E0ODJjNTYzYTk3NTVhNWZiMmM2NDAzOTYwNjc=\r\n\r\nSELECTED_DATACENTERS=$DC&json
=%7B%7B+%22parameter%22%3A+%5B++%7B+%22name%22%3A+%22BUILD_NUMBER%22+%2C+%22value%22%3A+%221%22+%7D%2C++%7B+%22name%22%3A+%22SELECTED_DATACENTERS%22+%2C+%22value%22%3A+%22$DC%22+%7D%2C+%5D%2C+%22%22%3A+%22%22+%7D%7D&BUILD_NUMBER=1'
reply: 'HTTP/1.1 302 Found\r\n'

[Winstone 2011/12/07 12:10:19] - Untrapped Error in Servlet
javax.servlet.ServletException: java.lang.IllegalArgumentException: Parameter SELECTED_DATACENTERS was missing.
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:603)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:234)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
        at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:74)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:52)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Parameter SELECTED_DATACENTERS was missing.
        at hudson.model.ParametersDefinitionProperty.buildWithParameters(ParametersDefinitionProperty.java:145)
        at hudson.model.AbstractProject.doBuildWithParameters(AbstractProject.java:1626)
        at sun.reflect.GeneratedMethodAccessor1822.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:104)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
        ... 49 more
               

> Extended choice plugin does not work with remote builds
> -------------------------------------------------------
>
>                 Key: JENKINS-10555
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-10555
>             Project: Jenkins
>          Issue Type: Bug
>          Components: plugin
>         Environment: Hudson 1.395, Jenkins 1.383 with Extended choice Plugin 0.4
>            Reporter: Danny Staple
>
> The extended choice plugin will fail when used with remote builds. The parameter will not be recognised as being passed.
> In the plugin the following function is incorrect:
> {code()}
> public ParameterValue createValue(StaplerRequest request) {
>                String value[] = request.getParameterValues(getName());
>                if (value == null) {
>                        return getDefaultParameterValue();
>                }
>                return null;
>        }
> {code}
> Note here that if the parameter is not set, it will set a default value. Otherwise it will always return NULL when it should return the current value, as something like a new ExtendedChoiceParameterValue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-10555) Extended choice plugin does not work with remote builds

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

     [ https://issues.jenkins-ci.org/browse/JENKINS-10555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Melvyn de Kort updated JENKINS-10555:
-------------------------------------

       Priority: Critical  (was: Major)
    Component/s: extended-choice-parameter
                     (was: plugin)
   

> Extended choice plugin does not work with remote builds
> -------------------------------------------------------
>
>                 Key: JENKINS-10555
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-10555
>             Project: Jenkins
>          Issue Type: Bug
>          Components: extended-choice-parameter
>         Environment: Hudson 1.395, Jenkins 1.383 with Extended choice Plugin 0.4
>            Reporter: Danny Staple
>            Priority: Critical
>
> The extended choice plugin will fail when used with remote builds. The parameter will not be recognised as being passed.
> In the plugin the following function is incorrect:
> {code()}
> public ParameterValue createValue(StaplerRequest request) {
>                String value[] = request.getParameterValues(getName());
>                if (value == null) {
>                        return getDefaultParameterValue();
>                }
>                return null;
>        }
> {code}
> Note here that if the parameter is not set, it will set a default value. Otherwise it will always return NULL when it should return the current value, as something like a new ExtendedChoiceParameterValue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-10555) Extended choice plugin does not work with remote builds

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
vimil resolved Bug JENKINS-10555 as Fixed

fixed in 0.4

Change By: vimil (14/Jul/12 3:09 PM)
Status: Open Resolved
Assignee: vimil
Resolution: Fixed
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
Loading...