Perforce SCM is polluting the config.xml

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Perforce SCM is polluting the config.xml

vtintillier
Hi all,

I have an issue with the Perforce plugin. A feature was introduced months ago:

Version 1.0.25 - (Mar 20, 2010)

  • ...
  • Added the environment variable HUDSON_CHANGELOG_FILE that contains the location of the changelog xml, so builds with custom sync logic can modify it.
  • ...
The problem is that the field is saved to the job config.xml at each build:
  <scm class="hudson.plugins.perforce.PerforceSCM">
    ...
    <slaveClientNameFormat>${basename}-${hash}</slaveClientNameFormat>
    <changelogFilename>D:\hudson\jobs\extendedblock_trunkdev\builds\2010-08-18_11-32-54\changelog.xml</changelogFilename>
    <lineEndValue></lineEndValue>
    ...
  </scm>
The problem is that we are using the "Job Config History" plugin, and thus we have one job config version for each build, where the only difference is the build timestamp, and we do not see our own modifications in all those.

How can we prevent the field changelogFilename of being serialized to the config.xml file ? I looked at the source of PerforceSCM.java and could not find anything indicating which fields should/should not be serialized.

Thank you for any help.

Vivien
Reply | Threaded
Open this post in threaded view
|

Re: Perforce SCM is polluting the config.xml

vtintillier
I just found out that it was reported last month under HUDSON-6994 but for the jobconfighistory component, not the perforce one.
Reply | Threaded
Open this post in threaded view
|

Re: Perforce SCM is polluting the config.xml

Rob Petti
In reply to this post by vtintillier
The entire object is serialized, so any member variables are put into
the config.xml. I'll set that one as transient so it doesn't show up in
the config.xml. You can expect a release either today or tomorrow.

On 10-08-18 05:28 AM, Vivien Tintillier wrote:

> Hi all,
>
> I have an issue with the Perforce plugin. A feature was introduced
> months ago:
>
> Version 1.0.25 - (Mar 20, 2010)
>
>     * ...
>     * Added the environment variable HUDSON_CHANGELOG_FILE that contains
>       the location of the changelog xml, so builds with custom sync
>       logic can modify it.
>     * ...
>
> The problem is that the field is saved to the job config.xml at each build:
>
>    <scm class="hudson.plugins.perforce.PerforceSCM">
>      ...
>      <slaveClientNameFormat>${basename}-${hash}</slaveClientNameFormat>
>      *<changelogFilename>D:\hudson\jobs\extendedblock_trunkdev\builds\2010-08-18_11-32-54\changelog.xml</changelogFilename>*
>      <lineEndValue></lineEndValue>
>      ...
>    </scm>
>
> The problem is that we are using the "Job Config History" plugin, and
> thus we have one job config version for each build, where the only
> difference is the build timestamp, and we do not see our own
> modifications in all those.
>
> How can we prevent the field changelogFilename of being serialized to
> the config.xml file ? I looked at the source of PerforceSCM.java and
> could not find anything indicating which fields should/should not be
> serialized.
>
> Thank you for any help.
>
> Vivien

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Perforce SCM is polluting the config.xml

vtintillier
Thank you Rob for looking into this.

The member is no more serialized so it's a good thing.
BUT the config.xml is still written at each build, despite nothing being changed. And so it still make it impossible to efficiently use the job config history plugin.

Why is the Perforce plugin writing the config.xml file at every build?

Thanks

On Thu, Aug 19, 2010 at 4:02 PM, Rob Petti <[hidden email]> wrote:
The entire object is serialized, so any member variables are put into the config.xml. I'll set that one as transient so it doesn't show up in the config.xml. You can expect a release either today or tomorrow.


On 10-08-18 05:28 AM, Vivien Tintillier wrote:
Hi all,

I have an issue with the Perforce plugin. A feature was introduced
months ago:

Version 1.0.25 - (Mar 20, 2010)

   * ...
   * Added the environment variable HUDSON_CHANGELOG_FILE that contains
     the location of the changelog xml, so builds with custom sync
     logic can modify it.
   * ...

The problem is that the field is saved to the job config.xml at each build:

  <scm class="hudson.plugins.perforce.PerforceSCM">
    ...
    <slaveClientNameFormat>${basename}-${hash}</slaveClientNameFormat>
    *<changelogFilename>D:\hudson\jobs\extendedblock_trunkdev\builds\2010-08-18_11-32-54\changelog.xml</changelogFilename>*
    <lineEndValue></lineEndValue>
    ...
  </scm>

The problem is that we are using the "Job Config History" plugin, and
thus we have one job config version for each build, where the only
difference is the build timestamp, and we do not see our own
modifications in all those.

How can we prevent the field changelogFilename of being serialized to
the config.xml file ? I looked at the source of PerforceSCM.java and
could not find anything indicating which fields should/should not be
serialized.

Thank you for any help.

Vivien

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]