[
https://issues.apache.org/jira/browse/HADOOP-11731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14382660#comment-14382660
]
Colin Patrick McCabe commented on HADOOP-11731:
-----------------------------------------------
Thank you for tackling this, Allen. It looks good.
{code}
1 #!/usr/bin/python
{code}
Should be {{#!/usr/bin/env python}}?
{code}
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
{code}
I realize that you are just copying this from the previous {{relnotes.py}}, but
we should fix this to match our other license headers. If you look at
{{determine-flaky-tests-hadoop.py}}, you can see its header is:
{code}
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{code}
The text about the {{NOTICE}} file is missing from {{releasedocmaker.py}}.
{code}
296 def main():
297 parser = OptionParser(usage="usage: %prog --version VERSION
[--version VERSION2 ...]")
298 parser.add_option("-v", "--version", dest="versions",
299 action="append", type="string",
300 help="versions in JIRA to include in releasenotes",
metavar="VERSION")
301 parser.add_option("-m","--master", dest="master", action="store_true",
302 help="only create the master files")
303 parser.add_option("-i","--index", dest="index", action="store_true",
304 help="build an index file")
{code}
Can you add a note to the usage message about which files are generated by this
script, and what their names will be? Also where the files will be generated
{code}
80 found = re.match('^((\d+)(\.\d+)*).*$', data)
81 if (found):
82 self.parts = [ int(p) for p in found.group(1).split('.') ]
83 else:
84 self.parts = []
{code}
Should we throw an exception if we can't parse the version?
{code}
28 def clean(str):
29 return clean(re.sub(namePattern, "", str))
30
31 def formatComponents(str):
32 str = re.sub(namePattern, '', str).replace("'", "")
33 if str != "":
34 ret = str
35 else:
36 # some markdown parsers don't like empty tables
37 ret = "."
38 return clean(ret)
39
40 def lessclean(str):
41 str=str.encode('utf-8')
42 str=str.replace("_","\_")
43 str=str.replace("\r","")
44 str=str.rstrip()
45 return str
46
47 def clean(str):
48 str=lessclean(str)
49 str=str.replace("|","\|")
50 str=str.rstrip()
{code}
I find this a bit confusing. Can we call the first function something other
than "clean", to avoid having two different functions named "clean" that do
different things? When would I use {{lessclean}} rather than {{clean}}? It
seems like only the release notes get the lessclean treatment. It would be
helpful to have a comments before the lessclean function explaining when it is
useful.
> Rework the changelog and releasenotes
> -------------------------------------
>
> Key: HADOOP-11731
> URL: https://issues.apache.org/jira/browse/HADOOP-11731
> Project: Hadoop Common
> Issue Type: New Feature
> Components: documentation
> Affects Versions: 3.0.0
> Reporter: Allen Wittenauer
> Attachments: HADOOP-11731-00.patch, HADOOP-11731-01.patch,
> HADOOP-11731-03.patch, HADOOP-11731-04.patch
>
>
> The current way we generate these build artifacts is awful. Plus they are
> ugly and, in the case of release notes, very hard to pick out what is
> important.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)