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

descriptorRadioList does not honor DescriptorVisibilityFilter

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Jenkins 2.224 (reverted in 2.225)

      descriptorRadioList does not honor DescriptorVisibilityFilter extensions.

      The workaround for this has been to pass an already filtered list of descriptors to descriptorRadioList (ie here):

      f.descriptorRadioList([...], descriptors: h.filterDescriptors(app, MyExtensionPoint.all()))
      

      However this has a side effect as descriptorRadioList is using an index to match frontend selected descriptor with a backend instance, so when a descriptor is hidden (by the visibility filter) in the frontend then backend indexes do not match.

      So, I believe descriptorRadioList should be fixed to either a) Generate correct indexes when there a visibility filter or b) stop using indexes to match things (which seems quite awkward).

          [JENKINS-51495] descriptorRadioList does not honor DescriptorVisibilityFilter

          Sho Matsumoto added a comment -

          > So, I believe descriptorRadioList should be fixed to either a) Generate correct indexes when there a visibility filter or b) stop using indexes to match things (which seems quite awkward).

          I followed b) plan and stop using indexes and begin using id instead.

          Sho Matsumoto added a comment - > So, I believe  descriptorRadioList  should be fixed to either a) Generate correct indexes when there a visibility filter or b) stop using indexes to match things (which seems quite awkward). I followed b) plan and stop using indexes and begin using id instead.

          Oleg Nenashev added a comment -

          I am not sure it should be ported to LTS, definitely not to 2.222.1 taking the merge date

          Oleg Nenashev added a comment - I am not sure it should be ported to LTS, definitely not to 2.222.1 taking the merge date

          Tim Jacomb added a comment - This seems to have caused: https://issues.jenkins-ci.org/browse/JENKINS-61398?focusedCommentId=386921&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-386921

          Oleg Nenashev added a comment -

          We rolled back the fix in 2.225 to fix the regression.

          https://github.com/jenkinsci/jenkins/pull/4562 was created for a new implementation

          Oleg Nenashev added a comment - We rolled back the fix in 2.225 to fix the regression. https://github.com/jenkinsci/jenkins/pull/4562  was created for a new implementation

          I am reopening the issue to reflect that

          Oliver Gondža added a comment - I am reopening the issue to reflect that

          Basil Crow added a comment - - edited

          To summarize:

          I am closing #4562 as the PR is not feasible and no activity has taken place for 2 years.

          If anyone is interested in working on this ticket, I suggest picking up where #4562 left off. That PR has several ideas regarding next steps.

          Basil Crow added a comment - - edited To summarize: https://github.com/jenkinsci/jenkins/pull/3969 was merged and released That PR was later reverted in https://github.com/jenkinsci/jenkins/pull/4559 because it caused a regression https://github.com/jenkinsci/jenkins/pull/4562 was proposed to reintroduce the original PR, as-is, which is not feasible because it would reintroduce the original regression There has been no activity on #4562 in 2 years I am closing #4562 as the PR is not feasible and no activity has taken place for 2 years. If anyone is interested in working on this ticket, I suggest picking up where #4562 left off. That PR has several ideas regarding next steps.

            Unassigned Unassigned
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: