On 31 July 2014 15:27, <[email protected]> wrote: > thanks again, Stephen. Could I ask more questions? excerpt from "" > https://wiki.jenkins-ci.org/display/JENKINS/Marking+a+new+plugin+version+as+incompatible+with+older+versions > says "*Hudson has an automatic data format upgrade capability*" - what > does it mean? >
readResolve() and the fact that XStream doesn't care about matching the serialVersionUid > > I have one more issue with my final solution - after plugin update at > runtime all fields in job configurations appear empty - after restart they > all are filled correctly - should I force some kind of job reloading or > something? > Sounds like you are not doing thing right. > > thanks in advance > > > On Thursday, July 31, 2014 4:55:04 PM UTC+4, Stephen Connolly wrote: > >> I worry about the startup time scanning all jobs... there can be 1000's >> of them... better if you can have something that kicks in when the job is >> being saved... as that way people can revert your upgrade if there is >> something wrong without loosing data. >> >> Oh and whatever approach you take, remember to set the >> compatibleSinceVersion to the first version with the new data layout to >> give people the scary warning that they never read correctly >> >> >> On 31 July 2014 13:47, <[email protected]> wrote: >> >>> Finally I have ended with following solution. >>> >>> 1. add removed fields and mark them as transient >>> 2. register static method with @Initializer(after = >>> InitMilestone.JOB_LOADED) >>> 3. for each job do check whether new job property exists if not create >>> new one and move transient fields to it and then add new job property to >>> the job >>> >>> does it go? what do you think guys? >>> >>> >>> On Thursday, July 31, 2014 2:21:05 PM UTC+4, [email protected] wrote: >>>> >>>> Thanks, Stephen. nice approach. but what to do if I just moved some >>>> fields from one job property to another new one (not swapping them >>>> entirely) >>>> >>>> On Tuesday, July 29, 2014 6:36:30 PM UTC+4, Stephen Connolly wrote: >>>>> >>>>> Note that you need to be swapping like for like... you can swap one >>>>> Publisher for another Publisher, but you cannot swap a Publisher for a >>>>> JobProperty >>>>> >>>>> >>>>> On 29 July 2014 15:35, Stephen Connolly <[email protected]> >>>>> wrote: >>>>> >>>>>> If you are swapping one JobProperty for another just have readResolve >>>>>> return the correctly configured new JobProperty, e.g. see similar >>>>>> https://github.com/jenkinsci/cloudbees-deployer-plug >>>>>> in/blob/master/src/main/java/org/jenkins/plugins/cloudbees/ >>>>>> CloudbeesPublisher.java#L102 >>>>>> >>>>>> >>>>>> On 29 July 2014 14:25, <[email protected]> wrote: >>>>>> >>>>>>> thanks, slide. I have already gone through it. but I can't figure >>>>>>> out the final solution of issue - >>>>>>> so I can mark fields as transient and check their values at >>>>>>> readResolve, what then? how to move these values to new job property? >>>>>>> >>>>>>> вторник, 29 июля 2014 г., 16:36:08 UTC+4 пользователь slide написал: >>>>>>>> >>>>>>>> This page, [1], has some good tips. >>>>>>>> >>>>>>>> slide >>>>>>>> >>>>>>>> 1 - https://wiki.jenkins-ci.org/display/JENKINS/Hint+on+retain >>>>>>>> ing+backward+compatibility >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Jul 29, 2014 at 5:30 AM, <[email protected]> wrote: >>>>>>>> >>>>>>>>> Hi, everyone. Could you please advice me what to do at the >>>>>>>>> following case: >>>>>>>>> >>>>>>>>> I have one JobProperty at the old version of plugin. after some >>>>>>>>> refactoring I have created another one job property and moved >>>>>>>>> attributes >>>>>>>>> from old job property to new one. >>>>>>>>> the issue is how to upgrade old job configurations to new one >>>>>>>>> seamlessly? >>>>>>>>> >>>>>>>>> thanks in advance >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> 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]. >>>>>>>>> >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Website: http://earl-of-code.com >>>>>>>> >>>>>>> -- >>>>>>> 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]. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> >>>>> -- >>> 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]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
