Blog

BioUno meeting 2016-11-18

19 November 2016 by Ioannis K. Moutsatsos, Bruno P. Kinoshita

Participants: Bruno P. Kinoshita and Ioannis K. Moutsatsos. 2016-11-18 08:00 PM UTC using Google Hangouts.

Meeting topics

  • Regressions in Active Choices Plug-in
    • Action: Bruno to try to write unit tests to prevent it from happening again

BioUno Project Developer and User Engagement

  • Do we have any statistics?
  • Are previous contributors/users still engaged?

BioUno Web Site

  • Do we need a refresh?
  • New material? What is of interest?

Ioannis’s Playground Explorations

  • Interactive UIs with Active Choices and JavaScript
  • International Image Interoperability Framework (iiif) Cantaloupe (project owner is very collaborative and responsive! Cudos!)

Future Directions

  • Script management beyond Groovy (especially R)
  • Build metadata, tagging and searching
  • Build parameter management and re-usability
  • Image management
  • Interactive build and report user interfaces
  • High performance computing
  • Jenkins in data-science (Spark integration etc)
  • Cloud computing and resource management

What happens when you make a Java member variable transient in a Jenkins plug-in

11 November 2016 by Bruno P. Kinoshita

This blog post is a post mortem. Even though it is not exactly about an outage in a system, as it is common to be announced in post mortems, it is still a big mess that happened due to a field in one of our Jenkins plug-ins being made transient.

Before anything, here is a TL;DR on transient fields in Java. When you have a field such as

public class SomeClass {
    private transient String someVariable;
}

you are specifying that you do not want it to be persisted if/when the class is serialized.

We made some fields transient in Active Choices Plug-in, which caused users to lose the Groovy scripts used in their jobs parameters.

So sit back and relax, while I tell you what happened to the release 1.5 of our Active Choices Plug-in, which was dropped and never made the update center, why we had to remove release 1.5.0 from Jenkins update center. And finally, how we fixed it in release 1.5.1.

Skipped release 1.5

We released 1.5-alpha to the Jenkins experimental update center on 20th March this year. We cut that release due to the script-security-plugin integration.

This alpha release is not available to all users, unless they choose to use the alpha version. This was announced in our mailing list, and I tried giving it some testing.

But our post mortem has - almost - nothing to do with the script-security-plugin.

The problem with the release 1.5, which was next following after our previous releases 1.3 and 1.4, was that since 1.4, Jenkins plug-in API changed, and plug-ins now are required to update how they define the Jenkins version against which they are built against. You can read more about it in INFRA-588.

The release process works almost completely flawlessly. Except for the upload stage. Before the upload stage, there is a task where a tag is created. The tag (uno-choice-1.5) is in GitHub, in the active-choices-plugin repository under the Jenkins organization.

After fixing the issue, following the instructions in INFRA-588, we couldn’t release 1.5, since the task to create a tag would fail, before it tried to upload the plug-in binary to the update center.

It is possible to request someone with karma to manually delete the tag from GitHub, or we can just skip that version. That is what was done, and that is why the release 1.5 was skipped.

FindBugs in Jenkins plug-ins

This is important because it plays part in the issue. After the plug-in was ready to be released as 1.5.0, it was just a matter of running mvn clean release:prepare release:perform. However, during the execution of the release, besides running tests, Jenkins is now also running FindBugs.

It means that every plug-in released recently, has been scanned by FindBugs, which is great.

One of the issues in Active Choices Plug-in, was that instead of Groovy scripts being Strings, they are now instances of SecureGroovyScript, from the script-security-plugin.

The SecureGroovyScript does not implement Serializable. Which is not really a problem since Jenkins is not using Java traditional serialization to persist objects as XML. But since FindBugs was complaining about it, and it was Friday night, I fixed that warning by making that field as transient…

Hmmmm

Removing version 1.5.0

So Monday morning I started seeing users reporting the issue. Actually, one issue reported before Monday that his scripts had disappeared, but since he mentioned the pipeline-plugin, I didn’t consider it could be such a blocker issue (active-choices-plugin does not support the pipeline-plugin).

It took Ioannis reporting the same issue, and some coffee, until I realized what had happened. Anyone who installed the 1.5.0 release, and saved the job, or had a plug-in saving the job, or if Jenkins decided to save the job, would get all the GroovyScript instances removed from the job XML. Meanining that the next time someone tried to execute the job, the parameters would probably be empty.

Another issue reported that the same happened to him, and suggested to remove that release, so that other users would not lose their scripts. It took just a few minutes (OSS is great, Jenkins project is great, Daniel Beck is great! Hooray!). I logged in to Jenkins #jenkins IRC channel, briefly explained the issue and asked how to remove a release from the update center.

You just need to submit a pull request to the backend-update-center2, like this one.

So now users won’t be affected by the issue. Great, let’s fix the issue and release a new version.

Add FindBugs filters to ignore warnings in Jenkins plug-ins

That’s how we fixed it. Revert the change, removing the transient tokens from the code, add an ignore filter for FindBugs. Took just a few minutes to write the fix, but even then we still had to test the change, before releasing 1.5.1.

Confirming the regression is gone

So I arrived earlier from work today, and decided to thorougly test that the fix would work, before releasing 1.5.1.

  • Download Jenkins LTS 2.19.2
  • Create a blank JENKINS_HOME
  • Start Jenkins (`JENKINS_HOME=/tmp/new_home java -jar jenkins*war), and accept the default plug-ins
  • Install active-choices-plugin 1.4
  • Restart Jenkins
  • Create test job, with a simple parameter

Now here’s the job XML.

<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>-1</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <org.biouno.unochoice.ChoiceParameter plugin="uno-choice@1.4">
          <name>param001</name>
          <description></description>
          <randomName>choice-parameter-6543037871533</randomName>
          <visibleItemCount>1</visibleItemCount>
          <script class="org.biouno.unochoice.model.GroovyScript">
            <script>return [1,2,3,4]</script>
            <fallbackScript>return []</fallbackScript>
          </script>
          <projectName>test-001</projectName>
          <choiceType>PT_MULTI_SELECT</choiceType>
          <filterable>true</filterable>
        </org.biouno.unochoice.ChoiceParameter>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
  </properties>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders/>
  <publishers/>
  <buildWrappers/>
</project>

Notice the <script class=”org.biouno.unochoice.model.GroovyScript”>.

  • Execute job, save job, reload configuration from disk, restart, execute job
  • Install active-choices-plugin 1.5.0
  • Restart Jenkins
  • Save job

Here’s the job XML.

<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>-1</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <org.biouno.unochoice.ChoiceParameter plugin="uno-choice@1.5.0">
          <name>param001</name>
          <description></description>
          <randomName>choice-parameter-6543037871533</randomName>
          <visibleItemCount>1</visibleItemCount>
          <script class="org.biouno.unochoice.model.GroovyScript"/>
          <projectName>test-001</projectName>
          <choiceType>PT_MULTI_SELECT</choiceType>
          <filterable>true</filterable>
        </org.biouno.unochoice.ChoiceParameter>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
  </properties>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders/>
  <publishers/>
  <buildWrappers/>
</project>

Noticed anything?

  • Execute job. No issues.
  • Reload configuration from disk.
  • At this point, I have successfully reproduced the issue
  • So let’s update to 1.5.1
  • Save the job
<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <jenkins.model.BuildDiscarderProperty>
      <strategy class="hudson.tasks.LogRotator">
        <daysToKeep>-1</daysToKeep>
        <numToKeep>-1</numToKeep>
        <artifactDaysToKeep>-1</artifactDaysToKeep>
        <artifactNumToKeep>-1</artifactNumToKeep>
      </strategy>
    </jenkins.model.BuildDiscarderProperty>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <org.biouno.unochoice.ChoiceParameter plugin="uno-choice@1.5.1-SNAPSHOT">
          <name>param001</name>
          <description></description>
          <randomName>choice-parameter-6543037871533</randomName>
          <visibleItemCount>1</visibleItemCount>
          <script class="org.biouno.unochoice.model.GroovyScript">
            <secureScript plugin="script-security@1.24">
              <script>return [1,2,3,4]</script>
              <sandbox>false</sandbox>
            </secureScript>
            <secureFallbackScript plugin="script-security@1.24">
              <script>return []</script>
              <sandbox>false</sandbox>
            </secureFallbackScript>
          </script>
          <projectName>test-001</projectName>
          <choiceType>PT_MULTI_SELECT</choiceType>
          <filterable>true</filterable>
        </org.biouno.unochoice.ChoiceParameter>
      </parameterDefinitions>
    </hudson.model.ParametersDefinitionProperty>
  </properties>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders/>
  <publishers/>
  <buildWrappers/>
</project>

Again, not quite the same as 1.4, but our script is in persisted in the job configuration. So what changed? The script is not wrapped around a <secureScript> tag, from the script-security-plugin.

Issue fixed, quite

Users that installed 1.5.0 have lost their scripts. Unless they used a test bed server to install and test the plug-in against their jobs, or they have some backup process in place, I am afraid there is not much that can be done.

I also tested a very similar scenario, but going from 1.4 to 1.5.1, which is going to happen to users that have not upgraded to 1.5.0. Again, the script was not correctly rendered.

But this time it is not exactly an issue in the plug-in code. Maybe a usability, an UX, issue. What I got in the logs after upgrading from 1.4 to 1.5.1 was the following exception.

SEVERE: Error executing script for dynamic parameter
java.lang.RuntimeException: Failed to evaluate fallback script: script not yet approved for use
    at org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:178)
    at org.biouno.unochoice.util.ScriptCallback.call(ScriptCallback.java:96)
    at org.biouno.unochoice.AbstractScriptableParameter.eval(AbstractScriptableParameter.java:233)
    at org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:196)
    at org.biouno.unochoice.AbstractScriptableParameter.getChoices(AbstractScriptableParameter.java:184)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
    at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
    at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
    at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
    at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
    at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
    at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
    at org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61)
    at org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsIterator(ExpressionSupport.java:94)
    at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:89)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
    at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
    at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
    at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
    at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
    at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
    at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
    at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
    at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
    at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55)
    at jenkins.model.ParameterizedJobMixIn.doBuild(ParameterizedJobMixIn.java:188)
    at hudson.model.AbstractProject.doBuild(AbstractProject.java:1759)
    at hudson.model.AbstractProject.doBuild(AbstractProject.java:1765)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    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 jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
    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:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use
    at org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.using(ScriptApproval.java:459)
    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:168)
    at org.biouno.unochoice.model.GroovyScript.eval(GroovyScript.java:175)
    ... 167 more

This happens to scripts that are pending approval. Users now have to go to the manage page, and the in process approval option. There they are able to approve/reject scripts, and manage their script security. This is not part of the active-choices-plugin, but from the script-security-plugin.

Version 1.5.1 has just been released. If you intend to upgrade, please remember to always use a test bed server, as well as to have a good backup process. And also that you may have to have some time to approve your parameter scripts.

On the bright side:

  • Our next releases will be better tested
  • You probably won’t see any issue related to making fields transient in BioUno plug-ins
  • Maybe this post will prevent other developers of doing the same mistake

Apologies for the inconvenience.


Jenkins: Documenting Data with Metadata

22 October 2016 by Ioannis K. Moutsatsos

Data without associated annotation and metadata (documentation describing the data) is of little lasting value 1. It is imperative that each dataset used for processing and analysis includes sufficient metadata so that its origin, content, and processing state are clearly understood. It is only then that data becomes truly useful and trustworthy.

A friend of mine has called well-annotated data ‘civilized data’, others have called it ‘tidy data’ 2.

Here I establish some metadata vocabulary for Jenkins data science applications, so we can continue future blogs with a common vocabulary.

Continue reading


BioUno meeting 2016-07-27

27 July 2016 by Ioannis K. Moutsatsos, Bruno P. Kinoshita

Participants: Bruno P. Kinoshita and Ioannis K. Moutsatsos. 2016-07-27 08:00 PM UTC using Google Hangouts.

Meeting topics

New requirements

  • Control number of items shown in Active Choice Options.
    • note: There is already a ticket for that in JIRA
  • Allow an HTML select element to be displayed like a multi-select, but the user must choose just one
  • AC-Reactive-Reference: Easier way to pass an ‘input’ value to the build-New return type option?
    • action: To think
  • Improve ‘trigger’ control of a ‘self-referential’ active reference.
    • note: there is already a ticket related to that (filtering delay)
    • note: probably related: JENKINS-34750 Reactive Parameter updating on click of itself not on change of referenced parameter
    • option #1: Suppress trigger parameters, Delay, or ignore change due to filtering
    • option #2: Have a button for on-demand triggering the change
  • r plug-in
    • action: Have a better way to search for the plug-in name in the update centre

Current issues in Jenkins Plug-ins

  • JENKINS-31973: When using the scriptler plugin the server is responding very slow
    • action: Need to find an easy way to reproduce the issue
  • https://groups.google.com/d/msg/jenkinsci-users/sQ65m4Y7nRE/Vvti2XpmNwAJ
    • action: @bruno try to reproduce and comment back in the mailing list
  • https://groups.google.com/d/msg/jenkinsci-issues/k3G8PMOlFd0/vOH7QgQGBAAJ
    • note: fixed for Folders, other issues logged for multi-branch and multi-configuration
  • Scriptler links to scripts: are they correct in Active Choices? Bug JENKINS-24584: View selected script option’ in build configuration displays wrong scriptler script
    • action: @bruno will work on this issue in this development cycle
  • BioUno log reports errors that do not trigger default script or affect functionality. Can we clean it up?
    • note: related to: Bug JENKINS-34188: jenkins.log noise: “script parameter … is not an instance of Java.util.Map.”
    • action: @bruno will work on this issue in this development cycle
  • Bug JENKINS-36158: Active choice reactive reference parameter not working on checkbox reference
    • action: @ioannis will reproduce and comment on the ticket Can’t reproduce. See CheckBoxValue_Propagation project on test server. Left comment on JIRA (10/11/2016)
  • JENKINS-35101 The selected values of checkbox reactive parameter are not available in Scriptler groovy script
    • note: I think I’ve also experienced this
    • note: Need examples to test with
    • note: @bruno pinged the user. If there’s no answer, close as Not able to Reproduce or similar status
  • Value of file type Active Choice React Reference is not cascaded. Want to cascade name of user selected file
    • action: @ioannis will file an issue in JIRA JIRA-38893
    • action: @bruno will work this ticket, given that the file parameter works and should be easy to fix

Future Directions

  • R Plug-in improvements and Scriptler integration
  • PBS Plug-ins n’ DRMAA integration
  • Script catalogs for organizing and grouping functionality. See also: JENKINS-24354
  • Deploy R on Jenkins. Invoke with API and parameters (See Domino Server http://www.r-bloggers.com/integrating-r-with-production-systems-using-an-http-api/)
    • note: we can use RServer with Java to transform Jenkins into a kind of Shiny server
  • Metadata catalog and metadata searching
    • note: enrich build metadata with property artifacts so they can be found using the Jenkins API
    • note: implement flexible metadata searching
    • action: @bruno to make some progress during this development cycle

Is it Wow or Just about Time?

7 June 2016 by Ioannis K. Moutsatsos

We all know and love Jenkins despite some of its historical quirks. The community is now on a march to introduce some new concepts and a more modern UI that includes support for visualizing build pipelines. I’m very happy with this project direction! Since 2012 I have been waiting anxiously to see some graphical support for workflow configuration and review in Jenkins. Similar features are standard in other workflow tools, but did not seem to find their way into the Jenkins core. Now every tweet seems to be a ‘Wow!’ for the new UI improvements of Jenkins. In this exciting moment do we really think that Jenkins has caught-up with the graphical workflow world?

Continue reading


Blog Archive