Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33106

CustomOrganizationFolderDescriptor does not work after a dynamic installation

      Currently CustomOrganizationFolderDescriptor only works if the plugins offering SCMNavigatorDescriptor (like github-branch-source) and MultiBranchProjectFactoryDescriptor (like workflow-multibranch), as well as branch-api itself, are already loaded during Jenkins startup.

      Basically this code would need to also be run in response to an ExtensionListListener, though that requires a 1.625+ dep.

      Alternately, we could fix the problem the right way in DescriptorVisibilityFilter, using a new core API dependency.

      Whether it is fixable using the current 1.609.x core dependency, I am not sure. HideGeneric.filter is called every time the New Item page is displayed, but it is probably too late to add a descriptor to the list while that list is being filtered.

          [JENKINS-33106] CustomOrganizationFolderDescriptor does not work after a dynamic installation

          Jesse Glick created issue -
          Jesse Glick made changes -
          Labels New: 2.0
          Jesse Glick made changes -
          Epic Link New: JENKINS-31152 [ 165808 ]

          Manuel Recena Soto added a comment - - edited

          stephenconnolly Any problem if I work on this issue? /cc jglick

          Manuel Recena Soto added a comment - - edited stephenconnolly Any problem if I work on this issue? /cc jglick
          Jesse Glick made changes -
          Assignee Original: Stephen Connolly [ stephenconnolly ]

          Jesse Glick added a comment -

          By “the right way” I mean for DescriptorVisibilityFilter to retain its current filter method as an option for the simpler cases, but to add a more general API along the lines of what ViewJobFilter does: a filter would get the chance to not just delete a single item, but to be given the entire list of proposed descriptors (along with their supertype) and make arbitrary modifications to it, including adding descriptors which are not declaratively registered as extensions.

          Jesse Glick added a comment - By “the right way” I mean for DescriptorVisibilityFilter to retain its current filter method as an option for the simpler cases, but to add a more general API along the lines of what ViewJobFilter does: a filter would get the chance to not just delete a single item, but to be given the entire list of proposed descriptors (along with their supertype) and make arbitrary modifications to it, including adding descriptors which are not declaratively registered as extensions.

          Jesse Glick added a comment -

          Using ExtensionListListener might be a little tricky, since this is designed to be a read-only callback, whereas for this use case we want to modify the extension list of one type (TopLevelItemDescriptor) in response to changes in the extension lists of other types (SCMNavigatorDescriptor, MultiBranchProjectFactoryDescriptor), so extra care needs to be taken that this does not result in some kind of concurrent modification error, or loop, etc.

          Jesse Glick added a comment - Using ExtensionListListener might be a little tricky, since this is designed to be a read-only callback, whereas for this use case we want to modify the extension list of one type ( TopLevelItemDescriptor ) in response to changes in the extension lists of other types ( SCMNavigatorDescriptor , MultiBranchProjectFactoryDescriptor ), so extra care needs to be taken that this does not result in some kind of concurrent modification error, or loop, etc.
          Patrick Wolf made changes -
          Assignee New: Manuel Recena Soto [ recena ]
          Jesse Glick made changes -
          Assignee Original: Manuel Recena Soto [ recena ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: