Skip to content

[JENKINS-62661] Views with status filters lost upgrading from 2.238 to 2.240 #11587

Closed

Description

@jenkins-infra-bot

Upgraded using apt (running on ubuntu bionic).

I was able to recover the config file from a support plugin archive, and ungarble it and try again and these items are consistently being eaten.


Originally reported by jsoref, imported from: Views with status filters lost upgrading from 2.238 to 2.240
  • status: Closed
  • priority: Major
  • component(s): core, status-view-plugin
  • label(s): 2.249.2-fixed, regression
  • resolution: Fixed
  • resolved: 2020-09-22T16:20:51+00:00
  • votes: 2
  • watchers: 9
  • imported: 2025-11-24
Raw content of original issue

Upgraded using apt (running on ubuntu bionic).

I was able to recover the config file from a support plugin archive, and ungarble it and try again and these items are consistently being eaten.

1 attachment

Activity

  1. jenkins-infra-bot commented on Jun 10, 2020

    @jenkins-infra-bot
    Author
    • Remote link associated with this issue:

  2. jenkins-infra-bot commented on Jun 10, 2020

    @jenkins-infra-bot
    Author
    jsoref:
    • Original comment link
    • Raw content of original comment:

      I have been able to manually re-create these objects from the gui...

    I have been able to manually re-create these objects from the gui...

  3. jenkins-infra-bot commented on Jun 29, 2020

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      Were any warnings logged, or did the "old data monitor" trigger and complain about unloadable data? If so, what specifically?

    Were any warnings logged, or did the "old data monitor" trigger and complain about unloadable data? If so, what specifically?

  4. jenkins-infra-bot commented on Jul 1, 2020

    @jenkins-infra-bot
    Author
    jsoref:
    • Original comment link
    • Raw content of original comment:

      I didn't see/couldn't find any.

       

      And I'm used to seeing them.

    I didn't see/couldn't find any.

     

    And I'm used to seeing them.

  5. jenkins-infra-bot commented on Sep 14, 2020

    @jenkins-infra-bot
    Author
    tgr:
    • Original comment link
    • Raw content of original comment:

      I seem to have a similar issue, all my ListViews where statusFilter is in use are "missing" and unreadable data:

      ConversionException: Could not call hudson.model.ListView.readResolve() : null : Could not call hudson.model.ListView.readResolve() : null
      ---- Debugging information ----
      message             : Could not call hudson.model.ListView.readResolve() : null
      cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
      cause-message       : Could not call hudson.model.ListView.readResolve() : null
      class               : hudson.model.ListView
      required-type       : hudson.model.ListView
      converter-type      : hudson.util.RobustReflectionConverter
      path                : /com.cloudbees.hudson.plugins.folder.Folder/folderViews/views/hudson.model.ListView
      line number         : 56
      -------------------------------
      

      It seems I can force the error with the JobDSL plugin using a view which tries to set a statusFilter:

      Caused by: java.io.IOException: Unable to read
      	at hudson.model.View.createViewFromXML(View.java:1400)
      	at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateView(JenkinsJobManagement.java:183)
      	... 11 more
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call hudson.model.ListView.readResolve() : null : Could not call hudson.model.ListView.readResolve() : null
      ---- Debugging information ----
      message             : Could not call hudson.model.ListView.readResolve() : null
      cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
      cause-message       : Could not call hudson.model.ListView.readResolve() : null
      class               : hudson.model.ListView
      required-type       : hudson.model.ListView
      converter-type      : hudson.util.RobustReflectionConverter
      path                : /hudson.model.ListView
      line number         : 43
      version             : not available
      -------------------------------
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      	at hudson.util.XStream2.unmarshal(XStream2.java:161)
      	at hudson.util.XStream2.unmarshal(XStream2.java:132)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
      	at hudson.model.View.createViewFromXML(View.java:1395)
      	... 12 more
      Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call hudson.model.ListView.readResolve() : null
      	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:72)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      	... 23 more
      Caused by: java.lang.UnsupportedOperationException
      	at java.util.AbstractList.add(AbstractList.java:148)
      	at hudson.model.ListView.readResolve(ListView.java:153)
      	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
      	... 25 more
      

      (This is with Jenkins 2.249.1)

    I seem to have a similar issue, all my ListViews where statusFilter is in use are "missing" and unreadable data:

    ConversionException: Could not call hudson.model.ListView.readResolve() : null : Could not call hudson.model.ListView.readResolve() : null
    ---- Debugging information ----
    message     : Could not call hudson.model.ListView.readResolve() : null
    cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
    cause-message       : Could not call hudson.model.ListView.readResolve() : null
    class       : hudson.model.ListView
    required-type       : hudson.model.ListView
    converter-type      : hudson.util.RobustReflectionConverter
    path: /com.cloudbees.hudson.plugins.folder.Folder/folderViews/views/hudson.model.ListView
    line number : 56
    -------------------------------
    
    

    It seems I can force the error with the JobDSL plugin using a view which tries to set a statusFilter:

    Caused by: java.io.IOException: Unable to read
    	at hudson.model.View.createViewFromXML(View.java:1400)
    	at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateView(JenkinsJobManagement.java:183)
    	... 11 more
    Caused by: com.thoughtworks.xstream.converters.ConversionException: Could not call hudson.model.ListView.readResolve() : null : Could not call hudson.model.ListView.readResolve() : null
    ---- Debugging information ----
    message     : Could not call hudson.model.ListView.readResolve() : null
    cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
    cause-message       : Could not call hudson.model.ListView.readResolve() : null
    class       : hudson.model.ListView
    required-type       : hudson.model.ListView
    converter-type      : hudson.util.RobustReflectionConverter
    path: /hudson.model.ListView
    line number : 43
    version     : not available
    -------------------------------
    	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
    	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
    	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
    	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
    	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
    	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
    	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
    	at hudson.util.XStream2.unmarshal(XStream2.java:161)
    	at hudson.util.XStream2.unmarshal(XStream2.java:132)
    	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
    	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
    	at hudson.model.View.createViewFromXML(View.java:1395)
    	... 12 more
    Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call hudson.model.ListView.readResolve() : null
    	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:72)
    	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
    	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
    	... 23 more
    Caused by: java.lang.UnsupportedOperationException
    	at java.util.AbstractList.add(AbstractList.java:148)
    	at hudson.model.ListView.readResolve(ListView.java:153)
    	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
    	... 25 more
    
    

    (This is with Jenkins 2.249.1)

  6. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      tgr That looks promising. Do you have the XML that the plugin attempts to submit there?

    tgr That looks promising. Do you have the XML that the plugin attempts to submit there?

  7. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    tgr:
    • Original comment link
    • Raw content of original comment:

      The minimal JobDSL script provoking this error is:

      import javaposse.jobdsl.dsl.views.ListView
      
      listView('test') {
        statusFilter ListView.StatusFilter.ENABLED
      }
      

      which produces this XML:

      <hudson.model.ListView>
          <filterExecutors>false</filterExecutors>
          <filterQueue>false</filterQueue>
          <properties class='hudson.model.View$PropertyList'></properties>
          <jobNames class='tree-set'>
              <comparator class='hudson.util.CaseInsensitiveComparator'></comparator>
          </jobNames>
          <jobFilters></jobFilters>
          <columns></columns>
          <statusFilter>true</statusFilter>
      </hudson.model.ListView>
      

      Ah: jobFilters is a DescribableList, which doesn't implement public void add(int index, E element) ...

    The minimal JobDSL script provoking this error is:

    import javaposse.jobdsl.dsl.views.ListView
    
    listView('test') {
      statusFilter ListView.StatusFilter.ENABLED
    }
    

    which produces this XML:

    
        false
        false
        'hudson.model.View$PropertyList'>
        'tree-set'>
    'hudson.util.CaseInsensitiveComparator'>
        
        
        
        true
    
    

    Ah: jobFilters is a DescribableList, which doesn't implement public void add(int index, E element) ...

  8. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    timja:

    There's some notes in here too:
    https://github.com/jenkins-infra/jenkins.io/pull/3697/files

  9. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    egutierrez:
    • Original comment link
    • Raw content of original comment:

      timja I'm not sure I get your comment. Do you mean maybe the users facing this issue did not take the upgrade guidelines into account?

      tgr danielbeck just to confirm: job-dsl is not the culprit but a way of triggering the issue, right?

    timja I'm not sure I get your comment. Do you mean maybe the users facing this issue did not take the upgrade guidelines into account?

    tgr danielbeck just to confirm: job-dsl is not the culprit but a way of triggering the issue, right?

  10. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    timja:
    • Original comment link
    • Raw content of original comment:

      egutierrez I meant that markewaite has been documenting the config change that users need to make at least for jcasc in relation to this change.

    egutierrez I meant that markewaite has been documenting the config change that users need to make at least for jcasc in relation to this change.

  11. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    markewaite:
    • Original comment link
    • Raw content of original comment:

      Add statusFilter and alternate URL to 2.249.1 upgrade guide jenkins-infra/jenkins.io#3697 is the pull request that adds upgrade guide instructions for the move of statusFilter from an attribute of a view to a separately defined component of a view. It doesn't describe the case that jsoref reports but it might be considered to be the start of describing the case that tgr has reported. The description addresses configuration as code and how to make the transition. I assume a similar type of transition will be needed in JobDSL. If someone is willing to submit the JobDSL upgrade instructions, they could also be included in the upgrade guide.

    jenkins-infra/jenkins.io#3697 is the pull request that adds upgrade guide instructions for the move of statusFilter from an attribute of a view to a separately defined component of a view. It doesn't describe the case that jsoref reports but it might be considered to be the start of describing the case that tgr has reported. The description addresses configuration as code and how to make the transition. I assume a similar type of transition will be needed in JobDSL. If someone is willing to submit the JobDSL upgrade instructions, they could also be included in the upgrade guide.

  12. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      This has nothing to do with Job DSL and nobody claimed it did.

      It's just that nobody bothered to do an update test here, and there's no autotest for it either.

      Steps to reproduce:

      1. Install 2.238
      2. Skip plugins
      3. create a job
      4. Go back to dashboard
      5. click "+" in the tab bar
      6. select List View
      7. Select "Enabled job only"
      8. Save
      9. Stop Jenkins
      10. Start 2.240

      The list view you just created will be gone.

    This has nothing to do with Job DSL and nobody claimed it did.

    It's just that nobody bothered to do an update test here, and there's no autotest for it either.

    Steps to reproduce:

    1. Install 2.238
    2. Skip plugins
    3. create a job
    4. Go back to dashboard
    5. click "+" in the tab bar
    6. select List View
    7. Select "Enabled job only"
    8. Save
    9. Stop Jenkins
    10. Start 2.240

    The list view you just created will be gone.

  13. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    jsoref:
    • Original comment link
    • Raw content of original comment:

      That fits our problem. And it matches the earlier note about "status filter".

    That fits our problem. And it matches the earlier note about "status filter".

  14. jenkins-infra-bot commented on Sep 15, 2020

    @jenkins-infra-bot
    Author
    jsoref:
    • Original comment link
    • Raw content of original comment:

      The attachment clearly has:

      <statusFilter>true</statusFilter>

    The attachment clearly has:

    true

  15. jenkins-infra-bot commented on Sep 17, 2020

    @jenkins-infra-bot
    Author
    initialzero:
    • Original comment link
    • Raw content of original comment:

      Same, all views using <statusFilter>true</statusFilter> are yanked from the config on Stable upgrade.

    Same, all views using true are yanked from the config on Stable upgrade.

  16. 7 remaining items

  17. jenkins-infra-bot commented on Sep 23, 2020

    @jenkins-infra-bot
    Author
    pwiseman:
    • Original comment link
    • Raw content of original comment:

      The status has changed to Resolution and tagged as fixed in 2.258.  I've re-tested an upgrade from 2.238 to 2.258 and the problem is still present (the views go missing).  What was the RESOLUTION?

    The status has changed to Resolution and tagged as fixed in 2.258.  I've re-tested an upgrade from 2.238 to 2.258 and the problem is still present (the views go missing).  What was the RESOLUTION?

  18. jenkins-infra-bot commented on Sep 23, 2020

    @jenkins-infra-bot
    Author
    markewaite:
    • Original comment link
    • Raw content of original comment:

      That sounds like the fix provided in PR-4466 did not resolve the issue you are seeing. The fix was a code change in that pull request that was intended to handle the upgrade.

    That sounds like the fix provided in PR-4466 did not resolve the issue you are seeing. The fix was a code change in that pull request that was intended to handle the upgrade.

  19. jenkins-infra-bot commented on Sep 23, 2020

    @jenkins-infra-bot
    Author
    markewaite:
    • Original comment link
    • Raw content of original comment:

      pwiseman I suspect more details will be required to duplicate the problem you're seeing. I was unable to duplicate the problem with 2.258, while I was able to duplicate the problem with 2.257. Steps I took:

      Jenkins 2.238

      1. Install Jenkins 2.238 with no plugins
      2. Define a job 'enabled-job' that is an enabled Freestyle job and run it several times
      3. Define a job 'disabled-job' this is a disabled Freestyle job
      4. Define a view 'Enabled' that uses the job status filter to show only enabled jobs, recursing in subfolders, matching the regular expression '.*'
      5. Define a view 'Disabled' that uses the job status filter to show only disabled jobs, recursing in subfolders, matching the regular expression '.*'
      6. Confirm that the view 'Enabled' shows only the enabled job and the view 'Disabled' shows only the disabled job
      7. Stop Jenkins 2.238
      8. Create a backup of the Jenkins home directory for reuse

      Jenkins 2.258

      1. Restore the Jenkins home directory backup from Jenkins 2.238
      2. Start Jenkins 2.258
      3. Confirm that the 'Disabled' and 'Enabled' views are visible in Jenkins 2.258

      Jenkins 2.257

      1. Restore the Jenkins home directory backup from Jenkins 2.238
      2. Start Jenkins 2.257
      3. Confirm that the 'Disabled' and 'Enabled' views are lost in Jenkins 2.257

      If someone needs a copy of the Jenkins home directory backup, I placed it temporarily at https://home.markwaite.net/~mwaite/jenkins-2.238.zip. The login user name is butler with the password butler.

    pwiseman I suspect more details will be required to duplicate the problem you're seeing. I was unable to duplicate the problem with 2.258, while I was able to duplicate the problem with 2.257. Steps I took:

    Jenkins 2.238

    1. Install Jenkins 2.238 with no plugins
    2. Define a job 'enabled-job' that is an enabled Freestyle job and run it several times
    3. Define a job 'disabled-job' this is a disabled Freestyle job
    4. Define a view 'Enabled' that uses the job status filter to show only enabled jobs, recursing in subfolders, matching the regular expression '.*'
    5. Define a view 'Disabled' that uses the job status filter to show only disabled jobs, recursing in subfolders, matching the regular expression '.*'
    6. Confirm that the view 'Enabled' shows only the enabled job and the view 'Disabled' shows only the disabled job
    7. Stop Jenkins 2.238
    8. Create a backup of the Jenkins home directory for reuse

    Jenkins 2.258

    1. Restore the Jenkins home directory backup from Jenkins 2.238
    2. Start Jenkins 2.258
    3. Confirm that the 'Disabled' and 'Enabled' views are visible in Jenkins 2.258

    Jenkins 2.257

    1. Restore the Jenkins home directory backup from Jenkins 2.238
    2. Start Jenkins 2.257
    3. Confirm that the 'Disabled' and 'Enabled' views are lost in Jenkins 2.257

    If someone needs a copy of the Jenkins home directory backup, I placed it temporarily at https://home.markwaite.net/~mwaite/jenkins-2.238.zip. The login user name is butler with the password butler.

  20. jenkins-infra-bot commented on Sep 23, 2020

    @jenkins-infra-bot
    Author
    pwiseman:
    • Original comment link
    • Raw content of original comment:

      markewaite Thanks for detailing the test (that helped), and sorry to have required you to re-test.  I found my problem.  I tested too quickly and failed to notice that the views do not appear on the main page unless there is at least one job.  I was looking at the Welcome screen, and thinking there were no views.  I failed to spot this pre-upgrade.  So all is good.  Many thanks for everyone's work on this.

    markewaite Thanks for detailing the test (that helped), and sorry to have required you to re-test.  I found my problem.  I tested too quickly and failed to notice that the views do not appear on the main page unless there is at least one job.  I was looking at the Welcome screen, and thinking there were no views.  I failed to spot this pre-upgrade.  So all is good.  Many thanks for everyone's work on this.

  21. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-63678]

  22. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-63718]

  23. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions