from docutils import nodes
from docutils.parsers.rst import directives, Directive
from jira import JIRA
+from urllib.parse import quote
import re
import sphinx
__copyright__ = "Copyright(c) 2021 PANTHEON.tech, s.r.o."
__license__ = "Eclipse Public License v1.0"
+def jira_prj_versions(project, version_range):
+ jira = JIRA(server="https://jira.opendaylight.org")
+ prj = jira.project(project)
+ (from_ver, to_ver) = version_range.split('-', 1)
+
+ versions = set()
+ for ver in jira.project_versions(prj):
+ if ver.name >= from_ver and ver.name <= to_ver:
+ versions.add(ver.name)
+ versions = list(versions)
+ versions.sort()
+ versions = ", ".join(versions)
+
+ return (jira, prj, from_ver, to_ver, versions)
+
+def format_versions(versions):
+ result = set()
+ for version in versions:
+ result.add(version.name)
+ result = list(result)
+ result.sort()
+ return ", ".join(result)
+
class JiraFixedIssuesDirective(Directive):
"""
JIRA Fixed Issues directive
}
def run(self):
- jira = JIRA(server="https://jira.opendaylight.org")
- prj = jira.project(self.options.get('project'))
- (from_ver, to_ver) = self.options.get('versions').split('-', 1)
+ (jira, prj, from_ver, to_ver, versions) = jira_prj_versions(self.options.get('project'), self.options.get('versions'))
- versions = set()
- for ver in jira.project_versions(prj):
- if ver.name >= from_ver and ver.name <= to_ver:
- versions.add(ver.name)
- versions = ", ".join(versions)
+ query = 'project = %s AND resolution is not EMPTY AND fixVersion in (%s) ORDER BY type ASC' % (prj, versions)
+ issues = jira.search_issues(query)
# FIXME: this is not quite nice: can we emit the table markup directly
table = [
- '.. list-table:: Issues resolved in versions %s through %s' % (from_ver, to_ver),
- # FIXME: bind to https://datatables.net/
+ '.. list-table:: Issues resolved in versions %s through %s (`JIRA <https://jira.opendaylight.org/issues/?jql=%s>`__)' % (from_ver, to_ver, quote(query)),
' :class: datatable',
' :header-rows: 1',
' :widths: auto',
' - Fix Version(s)',
]
- issues = jira.search_issues('project = %s AND resolution is not EMPTY AND fixVersion in (%s) ORDER BY type ASC' % (prj, versions))
- for issue in issues:
- # Groom fixVersions
- fixVersions = set()
- for version in issue.fields.fixVersions:
- fixVersions.add(version.name)
- fixVersions = list(fixVersions)
- fixVersions.sort()
-
- table.append(' * - .. image:: %s' % issue.fields.issuetype.iconUrl)
- table.append(' :align: center')
- table.append(' :alt: %s' % issue.fields.issuetype.name)
- table.append(' - `%s <https://jira.opendaylight.org/browse/%s>`_' % (issue.key, issue.key))
- table.append(' - %s' % issue.fields.summary)
- table.append(' - %s' % issue.fields.resolution)
- table.append(' - %s' % ", ".join(fixVersions))
-
- table.append('')
-
- for idx, line in enumerate(table):
- self.content.data.insert(idx, line)
- self.content.items.insert(idx, (None, idx))
+ if issues:
+ for issue in issues:
+ table.append(' * - .. image:: %s' % issue.fields.issuetype.iconUrl)
+ table.append(' :align: center')
+ table.append(' :alt: %s' % issue.fields.issuetype.name)
+ table.append(' - `%s <https://jira.opendaylight.org/browse/%s>`_' % (issue.key, issue.key))
+ table.append(' - %s' % issue.fields.summary)
+ table.append(' - %s' % issue.fields.resolution)
+ table.append(' - %s' % format_versions(issue.fields.fixVersions))
+
+ table.append('')
+
+ for idx, line in enumerate(table):
+ self.content.data.insert(idx, line)
+ self.content.items.insert(idx, (None, idx))
node = nodes.container()
self.state.nested_parse(self.content, self.content_offset, node)
}
def run(self):
- jira = JIRA(server="https://jira.opendaylight.org")
- prj = jira.project(self.options.get('project'))
- (from_ver, to_ver) = self.options.get('versions').split('-', 1)
+ (jira, prj, from_ver, to_ver, versions) = jira_prj_versions(self.options.get('project'), self.options.get('versions'))
- versions = set()
- for ver in jira.project_versions(prj):
- if ver.name >= from_ver and ver.name <= to_ver:
- versions.add(ver.name)
- versions = ", ".join(versions)
+ query = 'project = %s AND affectedVersion in (%s) AND fixVersion NOT in (%s) ORDER BY type ASC' % (prj, versions, versions)
+ issues = jira.search_issues(query)
# FIXME: this is not quite nice: can we emit the table markup directly
table = [
- '.. list-table:: Issues affecting versions %s through %s' % (from_ver, to_ver),
- # FIXME: bind to https://datatables.net/
+ '.. list-table:: Issues affecting versions %s through %s (`JIRA <https://jira.opendaylight.org/issues/?jql=%s>`__)' % (from_ver, to_ver, quote(query)),
' :class: datatable',
' :header-rows: 1',
' :widths: auto',
' - Fix Version(s)',
]
- issues = jira.search_issues('project = %s AND affectedVersion in (%s) AND fixVersion NOT in (%s) ORDER BY type ASC' % (prj, versions, versions))
- for issue in issues:
- # Groom fixVersions
- fixVersions = set()
- for version in issue.fields.fixVersions:
- fixVersions.add(version.name)
- fixVersions = list(fixVersions)
- fixVersions.sort()
-
- # Groom affectedVersions
- affectedVersions = set()
- for version in issue.fields.versions:
- affectedVersions.add(version.name)
- affectedVersions = list(affectedVersions)
- affectedVersions.sort()
-
- table.append(' * - .. image:: %s' % issue.fields.issuetype.iconUrl)
- table.append(' :align: center')
- table.append(' :alt: %s' % issue.fields.issuetype.name)
- table.append(' - `%s <https://jira.opendaylight.org/browse/%s>`_' % (issue.key, issue.key))
- table.append(' - %s' % issue.fields.summary)
- table.append(' - %s' % issue.fields.status)
- table.append(' - %s' % ", ".join(affectedVersions))
- table.append(' - %s' % ", ".join(fixVersions))
-
- table.append('')
-
- for idx, line in enumerate(table):
- self.content.data.insert(idx, line)
- self.content.items.insert(idx, (None, idx))
+ if issues:
+ for issue in issues:
+ fixVersions = format_versions(issue.fields.fixVersions)
+ affectvedVersions = format_versions(issue.fields.versions)
+ table.append(' * - .. image:: %s' % issue.fields.issuetype.iconUrl)
+ table.append(' :align: center')
+ table.append(' :alt: %s' % issue.fields.issuetype.name)
+ table.append(' - `%s <https://jira.opendaylight.org/browse/%s>`_' % (issue.key, issue.key))
+ table.append(' - %s' % issue.fields.summary)
+ table.append(' - %s' % issue.fields.status)
+ table.append(' - %s' % fixVersions)
+ table.append(' - %s' % affectvedVersions)
+
+ table.append('')
+
+ for idx, line in enumerate(table):
+ self.content.data.insert(idx, line)
+ self.content.items.insert(idx, (None, idx))
node = nodes.container()
self.state.nested_parse(self.content, self.content_offset, node)
app.add_directive('jira_fixed_issues', JiraFixedIssuesDirective)
app.add_directive('jira_known_issues', JiraKnownIssuesDirective)
+ # https://datatables.net/ improvements to tables
+ app.add_css_file("https://cdn.datatables.net/1.11.2/css/jquery.dataTables.min.css")
+ app.add_js_file("https://cdn.datatables.net/1.11.2/js/jquery.dataTables.min.js")
+ app.add_js_file(None, **{"body": "$(document).ready( function () { $('table.datatable').DataTable(); } );", "type": "text/javascript", "class": "init"})
+
return {
'version': '0.1',
'parallel_read_safe': True,
* @Inject DI
* ``Utils`` incl. ``org.opendaylight.infrautils.utils.concurrent``
* Test Utilities
-* Job Coordinator
* Ready Service
* Integration Test Utilities (``itestutils``)
* Caches
Behavior/Feature Changes
========================
-
-Here is the link to the features improved in this release:
-
-`OpenDaylight JIRA Tickets - Improvement <https://jira.opendaylight.org/issues/?jql=project+%3D+INFRAUTILS+AND+issuetype+%3D+Improvement+AND+status+in+%28Resolved%2C+Done%2C+Closed%29+AND+fixVersion+in+%28Silicon%2C+%22Silicon+GA%22%2C+1.9.5%29+ORDER+BY+issuetype+DESC%2C+key+ASC>`_
+Error Prone execution for pom.xmls inherited from ``org.opendaylight.infrautils:parent`` is now enabled
+on JDKs 11 through 17. This was previously disabled on JDK 16 and JDK 17 due to compatibility issues.
New Features
============
+There are no new features.
-Here is the link to the new features introduced in this release:
-
-`OpenDaylight JIRA Tickets - New Feature <https://jira.opendaylight.org/issues/?jql=project+%3D+infrautils+AND+type+%3D+%22New+Feature%22+AND+status+in+%28Resolved%2C+Done%2C+Closed%29+AND+fixVersion+in+%28%22Silicon+GA%22%2C+Silicon%2C+silicon%2C+1.9.5%29++ORDER+BY+issuetype+DESC%2C+key+ASC>`_
-
-Deprecated Features
-===================
+Deprecated and Removed Features
+===============================
+Job Coordinator was a rather troublesome attempt at coordinating datastore updates, but in that it made
+reasoning about updates and recovery from failures nigh impossible. It is not used by any active projects
+and has been removed without a replacement.
-Here is the link to the features removed in this release:
-
-`OpenDaylight JIRA Tickets - Deprecated Feature <https://jira.opendaylight.org/issues/?jql=project+%3D+infrautils+AND+type+%3D+Deprecate+AND+status+in+%28Resolved%2C+Done%2C+Closed%29+AND+fixVersion+in+%28%22Silicon+GA%22%2C+Silicon%2C+silicon%2C+1.9.5%29++ORDER+BY+issuetype+DESC%2C+key+ASC>`_
+The ``shell`` artifact has been removed, as it has no users and provided no meaningful functionality.
Resolved Issues
===============
-Here is the link to the resolved issues fixed in this release:
-
-`OpenDaylight JIRA Tickets - Resolved Issue <https://jira.opendaylight.org/issues/?jql=project+%3D+infrautils+AND+type+%3D+Bug+AND+status+in+%28Resolved%2C+Done%2C+Closed%29+AND+fixVersion+in+%28%22Silicon+GA%22%2C+Silicon%2C+silicon%2C+1.9.5%29++ORDER+BY+issuetype+DESC%2C+key+ASC>`_
+The following table lists the issues resolved in this release.
+.. jira_fixed_issues::
+ :project: INFRAUTILS
+ :versions: 2.0.0-2.0.5
Known Issues
============
-Here is the link to the known issues exist in this release:
+The following table lists the known issues that exist in this release.
+
+.. jira_known_issues::
+ :project: INFRAUTILS
+ :versions: 2.0.0-2.0.5
-`OpenDaylight JIRA Tickets - Known Issue <https://jira.opendaylight.org/issues/?jql=project+%3D+infrautils+AND+type+%3D+Bug+AND+status+not+in+%28Resolved%2C+Done%2C+Closed%29+ORDER+BY+issuetype+DESC%2C+key+ASC>`_