Request for comment: Descriptor change

12 views
Skip to first unread message

Kohsuke Kawaguchi

unread,
Dec 31, 2011, 4:28:50 PM12/31/11
to jenkins.rb

I've posted my proposed chage to jenkins-plugin-runtime.rb at
https://github.com/jenkinsci/jenkins-plugin-runtime.rb/pull/1

This is also documented at [2].

If someone (I'm mostly looking at Charles) can take a look at it and see
if the general direction is OK, that'd be greatly appreciated.
(This came up in the context of supporting RVM as a matrix axis.)


One thing I notice is the asymmetry in associating various proxy objects
(see describe_as/descriptor_is/JPP::register in [1]) I wonder if we
should be better off just having one method that does all the
association in one go, like


register self, J::P::P::AxisProxy, J::P::P::AxisDescriptorProxy,
Java.hudson.matrix.Axis

?

The other thing I notice is the name overlaps. In the current naming
convention, we've got three "Builder"s --- one Java class,
Jenkins::Plugin::Proxies::Builder, and Jenkins::Tasks::Builder. I'd like
to suggest that proxies have the "Proxy" suffix (that is,
Jenkins::Plugin::Proxies::BuilderProxy) to reduce the confusion.


[1] https://github.com/jenkinsci/rvm-plugin/blob/axis/models/axis.rb
[2] https://wiki.jenkins-ci.org/display/JENKINS/Ruby+glue+layer
--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
Try Nectar, our professional version of Jenkins

Kohsuke Kawaguchi

unread,
Dec 31, 2011, 8:01:29 PM12/31/11
to jenkins.rb

And I've added another pull request [1] needed for adding the matrix
support in the RVM plugin.

[1] https://github.com/jenkinsci/jenkins-plugin-runtime.rb/pull/2

R. Tyler Croy

unread,
Dec 31, 2011, 8:07:59 PM12/31/11
to jenk...@googlegroups.com, jorg...@gmail.com

I'm not sure if Jorgen is on the jenkinsrb list, so I'm going to pull him in on
this thread since he'll likely be interested in this as well :)

- R. Tyler Croy
--------------------------------------
Code: http://github.com/rtyler
Chatter: http://twitter.com/agentdero
rty...@jabber.org

Charles Lowell

unread,
Jan 3, 2012, 11:50:59 AM1/3/12
to jenk...@googlegroups.com

On Dec 31, 2011, at 3:28 PM, Kohsuke Kawaguchi wrote:

>
> I've posted my proposed chage to jenkins-plugin-runtime.rb at https://github.com/jenkinsci/jenkins-plugin-runtime.rb/pull/1
>
> This is also documented at [2].
>
> If someone (I'm mostly looking at Charles) can take a look at it and see if the general direction is OK, that'd be greatly appreciated.
> (This came up in the context of supporting RVM as a matrix axis.)
>
>
> One thing I notice is the asymmetry in associating various proxy objects (see describe_as/descriptor_is/JPP::register in [1]) I wonder if we should be better off just having one method that does all the association in one go, like
>
>
> register self, J::P::P::AxisProxy, J::P::P::AxisDescriptorProxy,
> Java.hudson.matrix.Axis
>
> ?

That makes sense to me, although given the number of parameters we should probably name them.


>
> The other thing I notice is the name overlaps. In the current naming convention, we've got three "Builder"s --- one Java class, Jenkins::Plugin::Proxies::Builder, and Jenkins::Tasks::Builder. I'd like to suggest that proxies have the "Proxy" suffix (that is, Jenkins::Plugin::Proxies::BuilderProxy) to reduce the confusion.

Agree totally. What was I thinking!


As far as the Pull requests go, I'll go over them as soon as I have the chance.

cheers,
Charles

Reply all
Reply to author
Forward
0 new messages