Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Build Failure Analyser plugin #51

Merged
merged 2 commits into from Apr 5, 2014
Merged

Support Build Failure Analyser plugin #51

merged 2 commits into from Apr 5, 2014

Conversation

drekbour
Copy link
Contributor

Implementation for #41

  • Tested HPI against Jenkins 1.480 and 1.540
    • Again there are no tests at the JS layer as I'm not sure where to begin with that.
  • Have not updated README or anything else

@jan-molak jan-molak removed the ready label Apr 5, 2014
jan-molak added a commit that referenced this pull request Apr 5, 2014
Support Build Failure Analyser plugin
@jan-molak jan-molak merged commit c5cfac2 into jenkinsci:master Apr 5, 2014
@jan-molak
Copy link
Member

This pull request looks good, thanks for your contribution, @drekbour !

@jan-molak
Copy link
Member

Hi @drekbour, there seems to be an issue when trying to install the plugin on a stand-alone Jenkins instance.
Steps to reproduce:

  • build the Build Monitor plugin with mvn clean package
  • upload the resulting .hpi file to a stand-alone Jenkins instance (I checked a fresh 1.557 and 1.480) using Manage Jenkins/Manage plugins/Advanced/Upload plugin

What I'm getting is a failed installation and the following error:

java.io.IOException: Failed to dynamically deploy this plugin
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1304)
    at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1103)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Failed to install build-monitor-plugin plugin
    at hudson.PluginManager.dynamicLoad(PluginManager.java:440)
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1300)
    ... 6 more
Caused by: java.io.IOException: Dependency git-client (1.0.6) doesn't exist
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:488)
    at hudson.PluginManager.dynamicLoad(PluginManager.java:430)
    ... 7 more

Which could be potentially caused by this entry in the pom.xml:

        <dependency>
            <!-- required for build-failure-analyser -->
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>git</artifactId>
            <version>1.5.0</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

once the dependency on git is removed, Build Monitor installs correctly.

Could you please elaborate a bit more on why is this dependency needed?

Many thanks for your help,
Jan

@jan-molak
Copy link
Member

Update: Those seem to be bugs in the Build Failure Analyzer itself:

I'll remove the dependency on git plugin from the Build Monitor; it seems like an optional dependency on BFA should be enough from the JBM point of view (after all it's BFA that needs to ensure that the git plugin is installed, not JBM).
What do you reckon?

jan-molak added a commit that referenced this pull request Apr 6, 2014
…nding on the git plugin. See #51

Dependency on the git plugin causes the following error during the installation of the Build Monitor:

java.io.IOException: Failed to dynamically deploy this plugin
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1304)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1103)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Failed to install build-monitor-plugin plugin
	at hudson.PluginManager.dynamicLoad(PluginManager.java:440)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1300)
	... 6 more
Caused by: java.io.IOException: Dependency git-client (1.0.6) doesn't exist
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:488)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:430)
	... 7 more
@drekbour
Copy link
Contributor Author

drekbour commented Apr 7, 2014

I remember there was something nasty about the git dependency of BFA, I probably made it work "for me" and didn't (couldn't actually) test on anything other than our local Jenkins.

You need to defend your project from the likes of me :) but the project needs the (much slower) Jenkins Integration Tests in order to make that reasonable. Should I raise an Issue for an integration test (even if it's just an "installation test"!)

@drekbour drekbour deleted the analysed-build branch April 7, 2014 08:45
@jan-molak
Copy link
Member

I agree with having an integration test for any 3rd plugin Build Monitor supports - did you have a chance to look at https://wiki.jenkins-ci.org/display/JENKINS/Unit+Test ? The API is really low-level, but seems like a good place to start.
I'll try to find some time over the weekend to put a basic test harness together.

jan-molak added a commit that referenced this pull request May 11, 2014
Initial work to enable integration (see #51) and acceptance testing.
jan-molak added a commit that referenced this pull request May 18, 2014
jan-molak added a commit that referenced this pull request Jun 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants