Re: slowness with jenkins 1.490

2012-12-06 Thread ohad shai
Is there a way to disable lazy loading?

On Monday, November 26, 2012 11:38:47 PM UTC+2, ohad shai wrote:
>
> I have some views, but this happened on default view. the main page is on 
> the default view.
> Maybe there is a plugin involved?
>
>
> On Mon, Nov 26, 2012 at 8:03 PM, Jesse Glick  wrote:
>
>> On 11/20/2012 08:41 AM, ohad shai wrote:
>>
>>> Handling GET / : …
>>>
>>>  at java.io.UnixFileSystem.**getBooleanAttributes0(Native 
>>> Method)
>>>  at java.io.UnixFileSystem.**getBooleanAttributes(**
>>> UnixFileSystem.java:228)
>>>  at java.io.File.isDirectory(File.**java:754)
>>>  at jenkins.model.lazy.**AbstractLazyLoadRunMap.load(**
>>> AbstractLazyLoadRunMap.java:**599)
>>>  at jenkins.model.lazy.**AbstractLazyLoadRunMap.search(**
>>> AbstractLazyLoadRunMap.java:**344)
>>>  at hudson.model.AbstractBuild.**getPreviousBuild(**
>>> AbstractBuild.java:207)
>>>  at hudson.model.AbstractBuild.**getPreviousBuild(**
>>> AbstractBuild.java:100)
>>>  at hudson.model.Job.**getLastFailedBuild(Job.java:**824)
>>>
>>
>> Looks like build lazy loading (1.485+) is not so lazy after all: 
>> something in your home screen is searching backwards through build records 
>> to find a failure, which implies loading build records that would otherwise 
>> have been left alone. Maybe you are using a special default view?
>>
>
>

Re: Request hosting for 'Job StrongAuthSimple Plugin'

2012-12-06 Thread KK.Kon


Hello Jenkins developers,

I'm Sorry.
I added Jenkins Wiki page.


POM artifactId
 job-strongauth-simple

Current source on GitHub
 https://github.com/kkkon/job-strongauth-simple-plugin
My GitHubID:
 kkkon https://github.com/kkkon 
Jenkins Wiki page:
 http://wiki.jenkins-ci.org/display/JENKINS/Job+StrongAuthSimple+Plugin

Thank you,
KK.Kon

On 2012/12/03 1:28, KK.Kon wrote:


Hi,

I'd like to host a plugin at jenkins-ci.org.

POM artifactId
 job-strongauth-simple-plugin

Current source on GitHub
https://github.com/kkkon/job-strongauth-simple-plugin
My GitHubID:
 kkkon https://github.com/kkkon 
Jenkins Wiki page:
http://wiki.jenkins-ci.org/display/JENKINS/Job+StrongAuthSimple+Plugin

Cheers,
KK.Kon




howto retrieve node from Launcher ?

2012-12-06 Thread nicolas de loof
I need the current node to resolve NodeSpecific ToolInstallation during SCM
polling
(clearcase, working on JENKINS-14247)

clearcase plugin uses Computer.currentComputer().getNode(), and fall into a
NullPointer when master is configure to have 0 executors
currentComputer javadoc says "This method only works when called during a
build", so it probably don't make sense to use it during polling.

SCM#calcRevisionsFromBuild give me a Launcher
"Abstraction of the machine where the polling will take place"
but Launcher.getComputer is deprecated and unsafe according to javadoc to
retrieve the node
anyway it seems to work in this case,
any better suggestion ?


Re: Request to commit access to upload Over-the-Air Ad Hoc Deployment Plugin For iOS

2012-12-06 Thread Christopher Orr

Hi there,

On 06/12/12 08:14, justin wrote:

I have developed a Jenkins Plugin that automates the process
of Over-the-Air Ad Hoc Deployment for iOS projects. The plugin is
written in jruby https://github.com/sourcebits-jesly/otabuilder-plugin.
Am all new towards programming as well as contribution to any open
source project. Though I have read the wiki, I don't completely
understand how to have the plugin uploaded to Jenkins code base.


A Ruby plugin -- nice!  This is kinda interesting; we do some similar 
things in Jenkins (though otherwise we just use the HockeyApp plugin).


However, this plugin seems like it's pretty niche due to the FTP 
integration.  Do people really still use FTP? :)
I wonder whether the "Publish over..." plugins have an integration point 
that could be used.


Otherwise, it would be useful if the plugin had a build step which 
generated the OTA Manifest.plist, automatically determining the Bundle 
Identifier, Bundle Version (and perhaps icon and title) from the .ipa, 
rather than having to configure these manually.


Then you could upload the OTA artifacts however you like, rather than 
being bound to FTP..


In any case, regarding a release, we can fork your GitHub repo into the 
jenkinsci account.  Then you can use that as your canonical repository, 
and run the release from there, which I believe is just a case of 
running "jpi release".


Regards,
Chris


periodic build - get time of next build

2012-12-06 Thread david michael gang
Hi all,

How do i know when a job which builds periodically will be built next time?
Which Java class and function should i use?

Thanks,
David


memory consumption of builds

2012-12-06 Thread Johannes Ohlemacher
Hello,

i noticed a memory problem with my valgrind plugin for jenkins. The result 
of the valgrind plugin (basically a list of errors with stacktraces) is 
stored with the build (build.xml).

After a fresh restart of jenkins, those builds gets deserialized and kept 
in memory as soon as the first user opens jenkins in his browser. 

Some users of my plugin have huge projects with a lot of errors (up to 
1 per build). After a few dozen builds, all those errors and 
stacktraces are eating up a lot of memory, despite most of them are never 
needed. 

Why does jenkins always deserialize all builds for all jobs? My initial 
(naive?) expectation was that jenkins would only deserialize a build when a 
user opens it in the browser.

Or am i doing something fundamentally wrong with the way the plugin stores 
its data?

Regards,
Johannes



Re: howto retrieve node from Launcher ?

2012-12-06 Thread Bruno P. Kinoshita
Hi Nicolas!

I *think* when you set executors=0 in the master it is not inserted in the 
computers list. Thus the NPE.

However, if you try to set executors=0 in a slave you will get an error. 

So I think we can assume that whenever you Computer.currentComputer() returning 
null, you have a master with 0 executors? 

So maybe you can try the following code:

---
Computer computer = Computer.currentComputer();
if(computer == null) 
  computer = Jenkins.getInstance().createComputer(); // Calls new 
Hudson.MasterComputer()
Node node = computer.getNode();
---

Not the most elegant solution, but hopefully it will give you some direction to 
follow, or someone else will chime in with a better alternative. Just my 0.02 
cents :)

Cheers
Bruno P. Kinoshita
http://kinoshita.eti.br
http://tupilabs.com


>
> From: nicolas de loof 
>To: jenkinsci-dev@googlegroups.com 
>Sent: Thursday, December 6, 2012 9:01 AM
>Subject: howto retrieve node from Launcher ?
> 
>
>I need the current node to resolve NodeSpecific ToolInstallation during SCM 
>polling
>(clearcase, working on JENKINS-14247)
>
>
>clearcase plugin uses Computer.currentComputer().getNode(), and fall into a 
>NullPointer when master is configure to have 0 executors
>currentComputer javadoc says "This method only works when called during a 
>build", so it probably don't make sense to use it during polling.
>
>
>SCM#calcRevisionsFromBuild give me a Launcher 
>"Abstraction of the machine where the polling will take place"
>but Launcher.getComputer is deprecated and unsafe according to javadoc to 
>retrieve the node
>anyway it seems to work in this case, 
>any better suggestion ?
>
>
>
> 


Re: howto retrieve node from Launcher ?

2012-12-06 Thread nicolas de loof
That's not what I'm looking for : I need the node that will run the polling
process, and was passed as Launcher to SCM polling

2012/12/6 Bruno P. Kinoshita 

> Hi Nicolas!
>
> I *think* when you set executors=0 in the master it is not inserted in the
> computers list. Thus the NPE.
>
> However, if you try to set executors=0 in a slave you will get an error.
>
> So I think we can assume that whenever you Computer.currentComputer()
> returning null, you have a master with 0 executors?
>
> So maybe you can try the following code:
>
> ---
> Computer computer = Computer.currentComputer();
> if(computer == null)
>   computer = Jenkins.getInstance().createComputer(); // Calls new
> Hudson.MasterComputer()
> Node node = computer.getNode();
> ---
>
> Not the most elegant solution, but hopefully it will give you some
> direction to follow, or someone else will chime in with a better
> alternative. Just my 0.02 cents :)
>
> Cheers
> Bruno P. Kinoshita
> http://kinoshita.eti.br
> http://tupilabs.com
>
>
> >
> > From: nicolas de loof 
> >To: jenkinsci-dev@googlegroups.com
> >Sent: Thursday, December 6, 2012 9:01 AM
> >Subject: howto retrieve node from Launcher ?
> >
> >
> >I need the current node to resolve NodeSpecific ToolInstallation during
> SCM polling
> >(clearcase, working on JENKINS-14247)
> >
> >
> >clearcase plugin uses Computer.currentComputer().getNode(), and fall into
> a NullPointer when master is configure to have 0 executors
> >currentComputer javadoc says "This method only works when called during a
> build", so it probably don't make sense to use it during polling.
> >
> >
> >SCM#calcRevisionsFromBuild give me a Launcher
> >"Abstraction of the machine where the polling will take place"
> >but Launcher.getComputer is deprecated and unsafe according to javadoc to
> retrieve the node
> >anyway it seems to work in this case,
> >any better suggestion ?
> >
> >
> >
> >
>


notification-plugin pull request: HTTP BasicAuth

2012-12-06 Thread Jack Repenning
Similar to something that came up about a month ago, I've posted a pull request 
to notification-plugin 
(https://github.com/jenkinsci/notification-plugin/pull/5), but it seems to be 
effectively unowned.

I'm new to Jenkins, but experienced in managing open-source projects (partial 
committed to Subversion 1.0, managed OS X Finder SVN plugin 
http://scplugin.tigris.org for some years). If notification-plugin needs a 
care-taker, I'm willing to take that on. Do I have to earn my spurs somehow? ;-)

But so far as my own initial contribution goes, an extra pair of eyes on 
concept, implementation, and packaging would be welcome.

Jack Repenning

un Byron impassible, qui aurait vécu mille ans sans vieillir.






Re: Jenkow plugin hacking

2012-12-06 Thread Max Spring

Trying to build it myself I ran into a missing dependency:

   com.cloudbees:vietnam4j-core:jar:1.5-SNAPSHOT

Earlier, I also missed the database plugin 1.0-SNAPSHOT dependency, but I could 
resolve that by building it from source.

-Max


On 11/28/2012 12:01 PM, Kohsuke Kawaguchi wrote:


This is mainly to Max,

Over the Thanksgiving break, I hacked more on the Jenkow plugin (in the 
activiti-explorer branch.)

I successfully embedded Activiti Explorer (AE) inside the plugin. You load the 
plugin, you hit http://localhost:8080/activiti-explorer/ and you'll see AE 
embedded within.

I've also created database-plugin [1,2] that defines a common abstraction for 
connecting database (more about this in a separate post.) I've used that in 
this branch to let the administrator configure the backend database for 
Activiti.

Both the embedded AE and the activiti engine that the Jenkow plugin uses honor 
this configuration.

I've also took a stub at integrating authentication between Jenkins and AE --- 
if you run AE stand-alone, you'll see that it asks you to login to the app. But 
in the embedded code, I alter the way AE wires the components to inject our own 
code that relies on Jenkins to do the authentication. So in effect it creates a 
single sign-on.

The good thing about AE is that it has a contract interface for the 
identity/authentication service separated from its default implementation, and 
this is how I was able to swap in Jenkins auth as the backend.

However, the bad thing about AE is that the assumption that AE makes about the 
identity/authentication service is so strict that even if I go all the way of 
implementing this contract (with Jenkins SecurityRealm as the real backend), we 
won't be able to avoid some clunkiness --- for example, it has methods like 
changePassword.

So another conceivable approach is to do federation --- we have administrators 
define uses and groups in AE as it is today, then we let Jenkins users to be 
linked with AE users, so that once you login to Jenkins, you automatically 
login as the corresponding linked user in AE.


Also, now that I've done it, I think it might make more sense for the embedded 
AE to be in a separate plugin from Jenkow. Or maybe not, given that presumably 
it doesn't prevent other AE instances to run elsewhere that connects to the 
same database.



This act of embedding a real web application inside another web application was 
an interesting work that I really had fun with.

Your thoughts would be appreciated.



[1] https://wiki.jenkins-ci.org/display/JENKINS/Database+Plugin
[2] https://github.com/jenkinsci/database-plugin




Re: Jenkow plugin hacking

2012-12-06 Thread Jesse Glick

On 12/06/2012 03:18 PM, Max Spring wrote:

Trying to build it myself I ran into a missing dependency:

com.cloudbees:vietnam4j-core:jar:1.5-SNAPSHOT


1.5 was already released, so I guess just update the dep.


Refactoring some Subversion code into core

2012-12-06 Thread Dean Yu
Hi folks, specifically rpetti and kutzi,
  I'd like to do some work to provide a post-commit hook for the Perforce 
plugin[1]. Looking through that code base, it's looks like it started life 
modeled on the Subversion plugin, but it has diverged significantly. I'm not 
going to attempt to rationalize the two, but in an effort to re-use some code, 
I propose refactoring:

hudson.scm.RevisionParameterAction
hudson.scm.SubversionRepositoryStatus

out of the Subversion plugin back into Jenkins core, so that some logic can be 
shared with the Perforce plugin. This would of course mean that new versions of 
both plugins would require a newer version of core to take advantage of the 
refactored code. (Obviously, this could be done in stages, so it doesn't happen 
all at once.)

Any objections?

  -- Dean


[1] JENKINS-12101



Re: howto retrieve node from Launcher ?

2012-12-06 Thread Jesse Glick

For reference, this problem is long known: JENKINS-5984 [1]. What is wanted is 
to modify SCM.compareRemoteRevisionWith to take a sixth argument of type Node.

But then it is tricky to retain compatibility for older plugins. It would have been better for the method to take a single “context” argument which would be a struct that 
we could easily add fields to; or for SCM to be an interface used only as an SPI, with a separate final class used as an API and able to handle multiple versions of the 
SPI. Mixing API and SPI is just asking for trouble later. Unfortunately it is too late now.


With the current class design, the best option is probably to introduce a new abstract method, making the original one not abstract, and catching AbstractMethodError or 
checking getDeclaredMethod to retain compatibility. But then you might resurrect JENKINS-5756 [2] (which I cannot reproduce).



[1] https://issues.jenkins-ci.org/browse/JENKINS-5984
[2] https://issues.jenkins-ci.org/browse/JENKINS-5756


Re: memory consumption of builds

2012-12-06 Thread Jesse Glick

On 12/06/2012 09:37 AM, Johannes Ohlemacher wrote:

Why does jenkins always deserialize all builds for all jobs? My initial 
(naive?) expectation was that jenkins would only deserialize a build when a 
user opens it in the
browser.


That is what happens in 1.485+, or should happen at least.


Or am i doing something fundamentally wrong with the way the plugin stores its 
data?


There is just no better option yet. See discussion on the thread “[RFC] 
Database plugin”.


Re: slowness with jenkins 1.490

2012-12-06 Thread Jesse Glick

On 12/06/2012 03:56 AM, ohad shai wrote:

Is there a way to disable lazy loading?


No; the problem in your case is that it is apparently not lazy enough.


Re: Refactoring some Subversion code into core

2012-12-06 Thread Christoph Kutzinski

Sounds like this makes sense.
I guess this code should be generic enough, so that any SCM plugin could 
profit from it. I've something similar in the Git-plugin - which 
probably also originated from the svn-plugin, but has since then diverged.


Another alternative would be to offer a shared 'abstract scm plugin' 
which could be used by all SCM plugins - similar to the 
instant-msg-plugin which is used by IRC, Jabber and more.
Have you thought about that approach? It offers IMO a lot of advantages 
over the having-it-in-core approach. Most notably to offer bug fixes/new 
feature without the need to update the core.



cheers
Kutzi

Am 06.12.2012 22:54, schrieb Dean Yu:

Hi folks, specifically rpetti and kutzi,
   I'd like to do some work to provide a post-commit hook for the
Perforce plugin[1]. Looking through that code base, it's looks like it
started life modeled on the Subversion plugin, but it has diverged
significantly. I'm not going to attempt to rationalize the two, but in
an effort to re-use some code, I propose refactoring:

hudson.scm.RevisionParameterAction
hudson.scm.SubversionRepositoryStatus

out of the Subversion plugin back into Jenkins core, so that some logic
can be shared with the Perforce plugin. This would of course mean that
new versions of both plugins would require a newer version of core to
take advantage of the refactored code. (Obviously, this could be done in
stages, so it doesn't happen all at once.)

Any objections?

   -- Dean


[1] JENKINS-12101 





Re: [ANN] Wiki moderators & spam removal tool

2012-12-06 Thread Larry Shatzer, Jr.
Looks like the spammers were tired of us deleting their spam pages, and now
have moved on to the Japanese section of the wiki:

https://wiki.jenkins-ci.org/display/JA/ekiosku.com+shopping+very+easy+and+enjoyable

I don't have permissions to delete this page.,

-- Larry


On Sat, Nov 17, 2012 at 5:15 PM, Kohsuke Kawaguchi  wrote:

> I created a new group in Wiki called "moderators" that has a
> permission to delete pages.
>
> I've also packaged the spam remover tool [1], which can be used by
> moderators to detect spam pages and delete them en mass.
>
> If you are interested in joining this effort, please let me know your
> jenkins-ci.org account ID, so that I can add you to the group.
>
> (Thanks to larrys and orrc for pushing this effort.)
>
> [1] https://wiki.jenkins-ci.org/display/JENKINS/Wiki+Spams
> --
> Kohsuke Kawaguchi
>


Re: Refactoring some Subversion code into core

2012-12-06 Thread Dean Yu
I'm not a big fan of the shared plugin model. As a user, I've gotten
bitten way to many times by compatibility problems this causes.

  -- Dean

On 12/6/12 2:16 PM, "Christoph Kutzinski"  wrote:

>Sounds like this makes sense.
>I guess this code should be generic enough, so that any SCM plugin could
>profit from it. I've something similar in the Git-plugin - which
>probably also originated from the svn-plugin, but has since then diverged.
>
>Another alternative would be to offer a shared 'abstract scm plugin'
>which could be used by all SCM plugins - similar to the
>instant-msg-plugin which is used by IRC, Jabber and more.
>Have you thought about that approach? It offers IMO a lot of advantages
>over the having-it-in-core approach. Most notably to offer bug fixes/new
>feature without the need to update the core.
>
>
>cheers
>Kutzi
>
>Am 06.12.2012 22:54, schrieb Dean Yu:
>> Hi folks, specifically rpetti and kutzi,
>>I'd like to do some work to provide a post-commit hook for the
>> Perforce plugin[1]. Looking through that code base, it's looks like it
>> started life modeled on the Subversion plugin, but it has diverged
>> significantly. I'm not going to attempt to rationalize the two, but in
>> an effort to re-use some code, I propose refactoring:
>>
>> hudson.scm.RevisionParameterAction
>> hudson.scm.SubversionRepositoryStatus
>>
>> out of the Subversion plugin back into Jenkins core, so that some logic
>> can be shared with the Perforce plugin. This would of course mean that
>> new versions of both plugins would require a newer version of core to
>> take advantage of the refactored code. (Obviously, this could be done in
>> stages, so it doesn't happen all at once.)
>>
>> Any objections?
>>
>>-- Dean
>>
>>
>> [1] JENKINS-12101 
>>
>



Re: Refactoring some Subversion code into core

2012-12-06 Thread Jesse Glick

On 12/06/2012 08:03 PM, Dean Yu wrote:

I'm not a big fan of the shared plugin model. As a user, I've gotten
bitten way to many times by compatibility problems this causes.


Then report those problems and drive them to get fixed please! We should be 
moving in the direction of more modularization and a slimmer core.


Re: Request to commit access to upload Over-the-Air Ad Hoc Deployment Plugin For iOS

2012-12-06 Thread Jesly Varghese
Hi Chris,

Thanks for the suggestions. Gave me a lot of ideas for improvement.

The company I work for uses FTP to store the app bundles. :). But I
consider coupling to a certain type of deployment alone is not good. I will
look into the publish over plugin, and see how it can be coupled along. I
would love to hear some ideas from you guys too.

Scanning the ipa file and getting the details such as icons, bundle
identifier and bundle version is awesome. I am on it.

I would like the repo to be forked and a commit access in it. But if i
incorporate the above changes it will drastically change the plugin, is it
fine that i do these things while its a part of jenkins, or should I make
these changes and then tell you guys?.

The repo got moved to: https://github.com/jeslyvarghese/otabuilder-plugin
And my github handle is: jeslyvarghese

Thank You.

Regards
Jesly

And

On Thu, Dec 6, 2012 at 5:17 PM, Christopher Orr  wrote:

> However, this plugin seems like it's pretty niche due to the FTP
> integration.  Do people really still use FTP? :)
> I wonder whether the "Publish over..." plugins have an integration point
> that could be used.
>
> Otherwise, it would be useful if the plugin had a build step which
> generated the OTA Manifest.plist, automatically determining the Bundle
> Identifier, Bundle Version (and perhaps icon and title) from the .ipa,
> rather than having to configure these manually.
>
> Then you could upload the OTA artifacts however you like, rather than
> being bound to FTP..
>
> In any case, regarding a release, we can fork your GitHub repo into the
> jenkinsci account.  Then you can use that as your canonical repository, and
> run the release from there, which I believe is just a case of running "jpi
> release".
>


Re: slowness with jenkins 1.490

2012-12-06 Thread ohad shai
I think this is not correct.
prior to version 1.485 jenkins was OK, although its startup time was few
minutes.
after the upgrade the startup time decreased to few seconds.
However, each load of a web page take from few long seconds to few minutes
or timeout.
>From my point of view, it is better to have few minutes at startup than few
minutes at each page load.
Can I set a flag to return it to previous state? or something similar?
If not, I will have to downgrade back.
Thanks,
Ohad.

On Thu, Dec 6, 2012 at 11:58 PM, Jesse Glick  wrote:

> On 12/06/2012 03:56 AM, ohad shai wrote:
>
>> Is there a way to disable lazy loading?
>>
>
> No; the problem in your case is that it is apparently not lazy enough.
>