EnvInject plugin always unstable in Pull Requests

23 views
Skip to first unread message

Rafael Ribeiro Rezende

unread,
Apr 23, 2015, 9:08:49 AM4/23/15
to jenkin...@googlegroups.com
Hello,

I've just made a Pull Request that solves the JENKINS-20334 issue of EnvInject, but I'm stuck with a failing test in the internal Jenkins server:

Error Message
expected:</[tmp/hudson2388473214719746968test/customWorkspace]/materialize_workspa...> but was:</[scratch/jenkins/workspace/plugins/envinject-plugin]/materialize_workspa...>


It does not happen locally. Later I realized that this issue also happened in the last 56 builds or so (except those where the failing test was skipped) from other people.
Since the build history is showing only the latest ~20 builds (since 11.03.2015), I don't know since when this issue has been happening.
Interestingly, there are new releases of EnvInject after that date.

So, I would like a hint here. Is it failing because something in the EnvInject itself got broken some time ago? Or the build server changed its configuration somehow?

--
rafael

oliver gondža

unread,
Apr 28, 2015, 11:47:21 AM4/28/15
to jenkin...@googlegroups.com, Rafael Ribeiro Rezende
On Thu, 23 Apr 2015 15:08:49 +0200, Rafael Ribeiro Rezende
<rafael...@gmail.com> wrote:

> So, I would like a hint here. Is it failing because something in the
> EnvInject itself got broken some time ago? Or the build server changed
> its
> configuration somehow?

As I am looking at it, this is caused by JENKINS-26583[1] - envinject
captures variable value early and do not overwrite it. The reason this
manifests when tests are run from Jenkins is the WORKSPACE variables is
set during build but it likely is not on your development box. I have just
reproduced the failure locally running `WORKSPACE=XXX mvn clean package
-Dtest=EnvInjectBuildWrapperTest#testPropertiesContentCustomWorkspace`.

I gave up[2] half way trying to untangle countless variable contribution
sources in the plugin.

[1] https://issues.jenkins-ci.org/browse/JENKINS-26583
[2] https://github.com/jenkinsci/envinject-plugin/pull/37

--
oliver
Reply all
Reply to author
Forward
0 new messages