Storing the buildId is the normal/correct thing to do

A few examples:
https://github.com/jenkinsci/workflow-plugin/blob/master/support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java#L65
https://github.com/jenkinsci/gerrit-trigger-plugin/blob/master/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java#L802

/B

On Wed, Feb 24, 2016 at 5:27 PM, Dmitry Savenko <[email protected]> wrote:

> Hi folks,
>
> I noticed a strange thing about the Multijob Plugin
> <https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin>. The
> MultiJobAction class
> (com.tikal.jenkins.plugins.multijob.MultiJobBuilder_-MultiJobAction, a
> private class) has a field 'build' of AbstractBuild type, which gets
> serialized not by reference, as other similar fields in other action
> classes, but as is. So, instead of
>
>    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder_-MultiJobAction
> plugin="[email protected]">
>       <build class="build" reference="../../.."/>
>    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder_-MultiJobAction>
>
> I'm seeing this:
>
>    <com.tikal.jenkins.plugins.multijob.MultiJobBuilder_-MultiJobAction
> plugin="[email protected]">
>       <build class="com.tikal.jenkins.plugins.multijob.MultiJobBuild">
>          ... full build config is here, with all actions, which may in
> turn be MultiJobActions ...
>       </build>
>    </com.tikal.jenkins.plugins.multijob.MultiJobBuilder_-MultiJobAction>
>
> This leads to immense bloat of build configuration files. For example, we
> have a branchy multijob config, and some build.xml files easily reach 2-3
> megabytes in size just because of this, while one run of the whole config
> (all the builds combined) takes about 100Mb on disk.
>
> So, I have a couple of questions:
>
>    1. Why the build field is not serialized by reference?
>    2. Is there a way to serialize it by reference?
>    3. Do we really need a build refernece in MultiJobAction? I briefly
>    looked at the code, and it seems like only build number is used—could we
>    just store the build number?
>
>
> Best regards,
> Dmitry.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/1456331246.2260567.530664026.41B52BCC%40webmail.messagingengine.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/1456331246.2260567.530664026.41B52BCC%40webmail.messagingengine.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS20i-sE924QoAkz%3D8ghQMLunHOJ4gEw7kSmJK4gQt-Z0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to