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

RSS entry IDs are not unique for nested items (folders, multibranch projects, etc)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      Original reporter https://github.com/mrcarlosrendon

      Consider the following two entries found in the rssAll feed

      <entry>
      <title>nctnhbaseworker/trunk #19 (stable)</title>
      <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
      <id>tag:hudson.dev.java.net,2015:trunk:19</id>
      <published>2015-12-22T00:02:26Z</published>
      <updated>2015-12-22T00:02:26Z</updated>
      </entry>
      
      <entry>
      <title>psclient/trunk #19 (1 test is still failing)</title>
      <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
      <id>tag:hudson.dev.java.net,2015:trunk:19</id>
      <published>2015-12-22T00:04:24Z</published>
      <updated>2015-12-22T00:04:24Z</updated>
      </entry>
      

      They are for two different projects, but the <id> tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

      I think adding the project name in addition to the branch name in the id field would solve the issue.

          [JENKINS-32232] RSS entry IDs are not unique for nested items (folders, multibranch projects, etc)

          Matthew DeTullio created issue -
          Matthew DeTullio made changes -
          Description Original: Consider the following two entries found in the rssAll feed

          ```xml
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          ```

          ```xml
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          ```

          They are for two different projects, but the ```<id>``` tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.
          New: Original reporter https://github.com/mrcarlosrendon

          Consider the following two entries found in the rssAll feed

          ```xml
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          ```

          ```xml
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          ```

          They are for two different projects, but the ```<id>``` tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.
          Matthew DeTullio made changes -
          Description Original: Original reporter https://github.com/mrcarlosrendon

          Consider the following two entries found in the rssAll feed

          ```xml
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          ```

          ```xml
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          ```

          They are for two different projects, but the ```<id>``` tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.
          New: Original reporter https://github.com/mrcarlosrendon

          Consider the following two entries found in the rssAll feed

          {code:xml}
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          {code}

          {code:xml}
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          {code}

          They are for two different projects, but the ```<id>``` tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.
          Matthew DeTullio made changes -
          Component/s New: cloudbees-folder-plugin [ 18137 ]
          Component/s New: core [ 15593 ]
          Matthew DeTullio made changes -
          Labels New: multibranch nested
          Matthew DeTullio made changes -
          Description Original: Original reporter https://github.com/mrcarlosrendon

          Consider the following two entries found in the rssAll feed

          {code:xml}
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          {code}

          {code:xml}
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          {code}

          They are for two different projects, but the ```<id>``` tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.
          New: Original reporter https://github.com/mrcarlosrendon

          Consider the following two entries found in the rssAll feed

          {code:xml}
          <entry>
          <title>nctnhbaseworker/trunk #19 (stable)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/nctnhbaseworker/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:02:26Z</published>
          <updated>2015-12-22T00:02:26Z</updated>
          </entry>
          {code}

          {code:xml}
          <entry>
          <title>psclient/trunk #19 (1 test is still failing)</title>
          <link type="text/html" href="http://irv-dev-pibld1:8080/job/psclient/branch/trunk/19/" rel="alternate"/>
          <id>tag:hudson.dev.java.net,2015:trunk:19</id>
          <published>2015-12-22T00:04:24Z</published>
          <updated>2015-12-22T00:04:24Z</updated>
          </entry>
          {code}

          They are for two different projects, but the {{<id>}} tag for them is identical which breaks RSS feed readers that are expecting each entry to have a unique id as is required by the ATOM specification (http://tools.ietf.org/html/rfc4287#section-4.2.6) that Jenkins uses.

          I think adding the project name in addition to the branch name in the id field would solve the issue.

          Daniel Beck added a comment -

          Would something like tag:hudson.dev.java.net,2015:foo/bar/trunk:19 be a valid ID? That would be trivial to do, but RFC 3987 is a bit more than I'd like to deal with right now.

          Daniel Beck added a comment - Would something like tag:hudson.dev.java.net,2015:foo/bar/trunk:19 be a valid ID? That would be trivial to do, but RFC 3987 is a bit more than I'd like to deal with right now.

          Daniel Beck added a comment -

          Daniel Beck added a comment - Reference: https://github.com/jenkinsci/jenkins/blob/9ab3f1d6aa15a242d226b45664bbb1a8dd0c9818/core/src/main/java/hudson/model/Run.java#L2397 probably just needs a getFullName() instead.

          Daniel Beck added a comment -

          Probably also an issue in e.g. Maven projects.

          Daniel Beck added a comment - Probably also an issue in e.g. Maven projects.
          Daniel Beck made changes -
          Component/s Original: cloudbees-folder-plugin [ 18137 ]
          Component/s Original: multi-branch-project-plugin [ 21127 ]
          Labels Original: multibranch nested

            Unassigned Unassigned
            mjdetullio Matthew DeTullio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: