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

Item Categories should not be shipped from /categories

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It is the follow-up to our discussion with Manuel Recena Soto and Jesse Glick.

      The current Item categorization uses JENKINS_URL/categories endpoint to provide the list of categories.

      It causes several concerns:

      • Categories apply to items only, but the "/categories" endpoint does not mention it in paths. Once we want to implement slave categories, it may become a problem
      • The endpoint may conflict with existing closed-source plugins. E.g. I had the Categorization plugin at one of my previous companies, which used the similar endpoint. Update to 2.0 will cause regressions in such plugins
      • The implementation is not pluggable. E.g. Views and Items cannot filter the categories somehow

      Proposed solution:

      • Ship categories via VIEW_URL/itemCategories
      • Allow overriding of the method in views. Just for the future pluggability

        Attachments

          Issue Links

            Activity

            oleg_nenashev Oleg Nenashev created issue -
            Hide
            recena Manuel Recena Soto added a comment - - edited

            I disagree because:

            1. It is not a bug
            2. it is not a regression at all
            Show
            recena Manuel Recena Soto added a comment - - edited I disagree because: It is not a bug it is not a regression at all
            Hide
            recena Manuel Recena Soto added a comment -

            Categories apply to items only, but the "/categories" endpoint does not mention it in paths.

            This endpoint is not valid, the right endpoint is: JENKINS_ROOT/PATH_VIEW/categories where PATH_VIEW can be:

            1. empty: JENKINS_ROOT/categories
            2. or for example: JENKINS_ROOT/view/custom/categories

            The meaning is Please, give me the item categories and its items availables in this view.

            The endpoint may conflict with existing closed-source plugins. E.g. I had the Categorization plugin at one of my previous companies, which used the similar endpoint. Update to 2.0 will cause regressions in such plugins

            Is this really an argument? As contributor of Jenkins core I have to thing about possible proprietary developments. This is crazy! Why something like itemCategories is a valid option?

            The implementation is not pluggable. E.g. Views and Items cannot filter the categories somehow

            This is a new requirement we can implement in the future. By the way, Items are being filtered.

            Show
            recena Manuel Recena Soto added a comment - Categories apply to items only, but the "/categories" endpoint does not mention it in paths. This endpoint is not valid, the right endpoint is: JENKINS_ROOT/PATH_VIEW/categories where PATH_VIEW can be: empty: JENKINS_ROOT/categories or for example: JENKINS_ROOT/view/custom/categories The meaning is Please, give me the item categories and its items availables in this view . The endpoint may conflict with existing closed-source plugins. E.g. I had the Categorization plugin at one of my previous companies, which used the similar endpoint. Update to 2.0 will cause regressions in such plugins Is this really an argument? As contributor of Jenkins core I have to thing about possible proprietary developments. This is crazy! Why something like itemCategories is a valid option? The implementation is not pluggable. E.g. Views and Items cannot filter the categories somehow This is a new requirement we can implement in the future. By the way, Items are being filtered.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            > empty: JENKINS_ROOT/categories

            So in such case it overlaps with the corner-case I've provided

            > Is this really an argument? As contributor of Jenkins core I have to thing about possible proprietary developments. This is crazy!

            You are not supposed to think about them. That's why we have Jenkins 2.0 beta testing, because it allows users to notify us about such issues. It does not mean that we must fix such issues, but at least it worths some discussion

            Show
            oleg_nenashev Oleg Nenashev added a comment - > empty: JENKINS_ROOT/categories So in such case it overlaps with the corner-case I've provided > Is this really an argument? As contributor of Jenkins core I have to thing about possible proprietary developments. This is crazy! You are not supposed to think about them. That's why we have Jenkins 2.0 beta testing, because it allows users to notify us about such issues. It does not mean that we must fix such issues, but at least it worths some discussion
            Hide
            recena Manuel Recena Soto added a comment -

            Daniel Beck your PoV here would be great!

            Show
            recena Manuel Recena Soto added a comment - Daniel Beck your PoV here would be great!
            Hide
            danielbeck Daniel Beck added a comment -

            Closed-source plugins are not an argument to me. I'm not even sure open-source plugins would be a major argument to impede core development, depending on exactly what the problem is. They would just be fixed. Otherwise, no detaching JUnit plugin from core in 1.577, or ever.

            However, Oleg does have a point with the confusion regarding what the categories are for. So a rename to itemCategories to support e.g. viewCategories besides it, seems straightforward enough. FWIW I was a big proponent for generic categorization from the beginning, Jenkins users typically have more view types than item types.

            Show
            danielbeck Daniel Beck added a comment - Closed-source plugins are not an argument to me. I'm not even sure open-source plugins would be a major argument to impede core development, depending on exactly what the problem is. They would just be fixed. Otherwise, no detaching JUnit plugin from core in 1.577, or ever. However, Oleg does have a point with the confusion regarding what the categories are for. So a rename to itemCategories to support e.g. viewCategories besides it, seems straightforward enough. FWIW I was a big proponent for generic categorization from the beginning, Jenkins users typically have more view types than item types.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            > Closed-source plugins are not an argument to me. I'm not even sure open-source plugins would be a major argument to impede core development, depending on exactly what the problem is. They would just be fixed.

            IMHO it does not well comply with the "this guy is fully compatible, no reason not to upgrade" statement we declare for 2.0. I'm OK if we don't fix in this case, but there maybe corner cases. Maybe we should explicitly recommend testing before upgrading.

            Show
            oleg_nenashev Oleg Nenashev added a comment - > Closed-source plugins are not an argument to me. I'm not even sure open-source plugins would be a major argument to impede core development, depending on exactly what the problem is. They would just be fixed. IMHO it does not well comply with the "this guy is fully compatible, no reason not to upgrade" statement we declare for 2.0. I'm OK if we don't fix in this case, but there maybe corner cases. Maybe we should explicitly recommend testing before upgrading.
            Hide
            recena Manuel Recena Soto added a comment -

            Oleg Nenashev By the way, the renaming involves to send a new PR to cloudbees-folder-plugin ref.

            Show
            recena Manuel Recena Soto added a comment - Oleg Nenashev By the way, the renaming involves to send a new PR to cloudbees-folder-plugin ref .
            Hide
            recena Manuel Recena Soto added a comment -

            Jesse Glick Do you agree with the change proposed? Remember that this change involves to change this again.

            Show
            recena Manuel Recena Soto added a comment - Jesse Glick Do you agree with the change proposed? Remember that this change involves to change this again.
            Hide
            jglick Jesse Glick added a comment -

            Yes go ahead and change categories to itemCategories. I was holding off on a cloudbees-folder release until you did so, so that I can make the matching change.

            Show
            jglick Jesse Glick added a comment - Yes go ahead and change categories to itemCategories . I was holding off on a cloudbees-folder release until you did so, so that I can make the matching change.
            recena Manuel Recena Soto made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            recena Manuel Recena Soto made changes -
            Labels 2.0 api regression 2.0 2.0-planned api
            recena Manuel Recena Soto made changes -
            Issue Type Bug [ 1 ] Task [ 3 ]
            Hide
            recena Manuel Recena Soto added a comment -

            Oleg Nenashev working in progress....

            Show
            recena Manuel Recena Soto added a comment - Oleg Nenashev working in progress....
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Manuel Recena Soto Thanks a lot!

            Show
            oleg_nenashev Oleg Nenashev added a comment - Manuel Recena Soto Thanks a lot!
            recena Manuel Recena Soto made changes -
            Remote Link This issue links to "PR (Web Link)" [ 14154 ]
            recena Manuel Recena Soto made changes -
            Status In Progress [ 3 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Hide
            recena Manuel Recena Soto added a comment -
            Show
            recena Manuel Recena Soto added a comment - Oleg Nenashev Done.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: recena
            Path:
            core/src/main/java/hudson/model/View.java
            war/src/main/js/add-item.js
            http://jenkins-ci.org/commit/jenkins/4a5b825b479d56beb0717bfb1cbcb659c51557fb
            Log:
            JENKINS-33972 The REST API URL has been removed to [..]/itemCategories

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: recena Path: core/src/main/java/hudson/model/View.java war/src/main/js/add-item.js http://jenkins-ci.org/commit/jenkins/4a5b825b479d56beb0717bfb1cbcb659c51557fb Log: JENKINS-33972 The REST API URL has been removed to [..] /itemCategories
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/View.java
            war/src/main/js/add-item.js
            http://jenkins-ci.org/commit/jenkins/4649e04cbe58f5af0e583da04084b2ebc442a320
            Log:
            Merge pull request #2208 from recena/JENKINS-33972

            JENKINS-33972 The REST API URL has been removed to [..]/itemCategories

            Compare: https://github.com/jenkinsci/jenkins/compare/0db4bc2a6327...4649e04cbe58

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/View.java war/src/main/js/add-item.js http://jenkins-ci.org/commit/jenkins/4649e04cbe58f5af0e583da04084b2ebc442a320 Log: Merge pull request #2208 from recena/ JENKINS-33972 JENKINS-33972 The REST API URL has been removed to [..] /itemCategories Compare: https://github.com/jenkinsci/jenkins/compare/0db4bc2a6327...4649e04cbe58
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/dab943292bcc6121c62701cb62307edce09c6d31
            Log:
            JENKINS-33972 View.doCategories renamed to doItemCategories.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/dab943292bcc6121c62701cb62307edce09c6d31 Log: JENKINS-33972 View.doCategories renamed to doItemCategories.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/526694d36b9d2e0685ceac9c168204a209969b3d
            Log:
            Merge pull request #54 from jglick/itemCategories-JENKINS-33972

            JENKINS-33972 View.doCategories renamed to doItemCategories

            #55 is identical, just merging the lower-numbered one.

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/6f2daf46be91...526694d36b9d

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/526694d36b9d2e0685ceac9c168204a209969b3d Log: Merge pull request #54 from jglick/itemCategories- JENKINS-33972 JENKINS-33972 View.doCategories renamed to doItemCategories #55 is identical, just merging the lower-numbered one. Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/6f2daf46be91...526694d36b9d
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: recena
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/c3ba1ab0efab2552003752af46d659504b69c3e5
            Log:
            JENKINS-33972 View.doCategories was renamed to View.doItemCategories

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: recena Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/c3ba1ab0efab2552003752af46d659504b69c3e5 Log: JENKINS-33972 View.doCategories was renamed to View.doItemCategories
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/ac521be9372a056a799c354e75f5ce33d516b7ff
            Log:
            Merge pull request #55 from recena/JENKINS-33972

            JENKINS-33972 View.doCategories was renamed to View.doItemCategories

            Heck, merge them both, see if GitHub can handle it!

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/526694d36b9d...ac521be9372a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: http://jenkins-ci.org/commit/cloudbees-folder-plugin/ac521be9372a056a799c354e75f5ce33d516b7ff Log: Merge pull request #55 from recena/ JENKINS-33972 JENKINS-33972 View.doCategories was renamed to View.doItemCategories Heck, merge them both, see if GitHub can handle it! Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/526694d36b9d...ac521be9372a
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169983 ] JNJira + In-Review [ 209904 ]

              People

              • Assignee:
                recena Manuel Recena Soto
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: