Repository: yetus Updated Branches: refs/heads/master e26a6bd04 -> b76e6b5f9
YETUS-428 Provide fallback option to mark issues as incompatible Signed-off-by: Allen Wittenauer <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/b76e6b5f Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/b76e6b5f Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/b76e6b5f Branch: refs/heads/master Commit: b76e6b5f993ed0f51211a60e89d7805403964464 Parents: e26a6bd Author: Ajay Yadava <[email protected]> Authored: Thu Jul 14 11:58:42 2016 +0530 Committer: Allen Wittenauer <[email protected]> Committed: Wed Jul 20 09:26:31 2016 -0700 ---------------------------------------------------------------------- .../in-progress/releasedocmaker.md | 16 +++++++++++++++ release-doc-maker/releasedocmaker.py | 21 ++++++++++++++++++++ 2 files changed, 37 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/b76e6b5f/asf-site-src/source/documentation/in-progress/releasedocmaker.md ---------------------------------------------------------------------- diff --git a/asf-site-src/source/documentation/in-progress/releasedocmaker.md b/asf-site-src/source/documentation/in-progress/releasedocmaker.md index b8121dc..be364c3 100644 --- a/asf-site-src/source/documentation/in-progress/releasedocmaker.md +++ b/asf-site-src/source/documentation/in-progress/releasedocmaker.md @@ -159,6 +159,22 @@ $ releasedocmaker --sorttype=issueid --sortorder=desc In the case of multiple projects given on the command line, the projects will be grouped and then sorted by issue id. +# Backward Incompatible Changes + +To check if an issue is backward-incompatible the releasedocmaker script first checks the "Hadoop Flags" field in the +issue. If this field is found to be blank then it searches for the 'backward-incompatible' label. You can override the +default value for this label by using -L option e.g. + +```bash +$ releasedocmaker --project=falcon --version 0.6 --incompatiblelabel not-compatible +``` + +or equivalently using the shorter -X option + +```bash +$ releasedocmaker --project=falcon --version 0.6 -X not-compatible +``` + # Lint Mode In order to ensure proper formatting while using mvn site, releasedocmaker puts in periods (.) for fields that are empty or unassigned. This can be unsightly and not proper for any given project. There are also other things, such as missing release notes for incompatible changes, that are less than desirable. http://git-wip-us.apache.org/repos/asf/yetus/blob/b76e6b5f/release-doc-maker/releasedocmaker.py ---------------------------------------------------------------------- diff --git a/release-doc-maker/releasedocmaker.py b/release-doc-maker/releasedocmaker.py index 00c8d00..72a2091 100755 --- a/release-doc-maker/releasedocmaker.py +++ b/release-doc-maker/releasedocmaker.py @@ -50,6 +50,9 @@ JIRA_BASE_URL = "https://issues.apache.org/jira" SORTTYPE = 'resolutiondate' SORTORDER = 'older' NUM_RETRIES = 5 + +# label to be used to mark an issue as Incompatible change. +BACKWARD_INCOMPATIBLE_LABEL = 'backward-incompatible' CHANGEHDR1 = "| JIRA | Summary | Priority | " + \ "Component | Reporter | Contributor |\n" CHANGEHDR2 = "|:---- |:---- | :--- |:---- |:---- |:---- |\n" @@ -326,6 +329,14 @@ class Jira(object): self.incompat = True if flag['value'] == "Reviewed": self.reviewed = True + else: + # Custom field 'Hadoop Flags' is not defined, + # search for 'backward-incompatible' label + field = self.parent.field_id_map['Labels'] + if field in self.fields and self.fields[field]: + if BACKWARD_INCOMPATIBLE_LABEL in self.fields[field]: + self.incompat = True + self.reviewed = True return self.incompat def get_important(self): @@ -725,6 +736,12 @@ def parse_args(): action="append", type="int", help="Specify how many times to retry connection for each URL.") + parser.add_option("-X", + "--incompatiblelabel", + dest="incompatible_label", + default="backward-incompatible", + type="string", + help="Specify the label to indicate backward incompatibility.") Linter.add_parser_options(parser) @@ -778,6 +795,10 @@ def main(): global JIRA_BASE_URL JIRA_BASE_URL = options.base_url + if options.incompatible_label is not None: + global BACKWARD_INCOMPATIBLE_LABEL + BACKWARD_INCOMPATIBLE_LABEL = options.incompatible_label + proxy = urllib2.ProxyHandler() opener = urllib2.build_opener(proxy) urllib2.install_opener(opener)
