TransientProjectActionFactory and installation without restart

25 views
Skip to first unread message

vojta....@gmail.com

unread,
Aug 28, 2015, 9:49:53 AM8/28/15
to Jenkins Developers
Hi,

My Jenkins plugin implements an TransientProjectActionFactory in order to provide project-level action. Unfortunately the action doesn't appear until the Jenkins is restarted. My two questions are:

1. Is there a mechanism that will allow me to see the action without requiring the restart?

2. If not, is there a mechanism that will allow me to indicate that restart is actually required in order not to mislead the user?

The problem is that currently part of the functionality is not working and I'm afraid it may be confusing to the users.

Thanks,
Vojta

Jesse Glick

unread,
Aug 28, 2015, 11:53:14 AM8/28/15
to Jenkins Dev
On Fri, Aug 28, 2015 at 9:49 AM, <vojta....@gmail.com> wrote:
> My Jenkins plugin implements an TransientProjectActionFactory in order to
> provide project-level action. Unfortunately the action doesn't appear until
> the Jenkins is restarted.

Probably the factory is getting used for newly created and newly
modified projects, but not for existing projects which were not
reconfigured, since there is a cache of transient actions.

Try using `TransientActionFactory<Job>` (or
`TransientActionFactory<AbstractProject>` if required) instead. This
gets called every time `getAllActions` is called, without caching.
This means your implementation must have no measurable overhead, of
course.

vojta....@gmail.com

unread,
Aug 28, 2015, 1:09:43 PM8/28/15
to Jenkins Developers
Thanks for the tip. There should be no measurable overhead imposed by the action creation. I'll give this a try and report back later...

vojta....@gmail.com

unread,
Sep 9, 2015, 9:17:12 AM9/9/15
to Jenkins Developers
Finally I managed to try the TransientActionFactory<AbstractProject> approach and it works indeed. Thank you once more.


On Friday, August 28, 2015 at 5:53:14 PM UTC+2, Jesse Glick wrote:
Reply all
Reply to author
Forward
0 new messages