HADOOP-12202. releasedocmaker drops missing component and assignee entries (aw)

(cherry picked from commit adbacf7010)
(cherry picked from commit d7697831e3)
This commit is contained in:
Allen Wittenauer 2015-07-07 14:30:32 -07:00 committed by Andrew Wang
parent a6cad7d856
commit f54862ff15
1 changed files with 12 additions and 12 deletions

View File

@ -420,6 +420,8 @@ def main():
else: else:
title=options.title title=options.title
haderrors=False
for v in versions: for v in versions:
vstr=str(v) vstr=str(v)
jlist = JiraIter(vstr,projects) jlist = JiraIter(vstr,projects)
@ -468,14 +470,6 @@ def main():
for jira in sorted(jlist): for jira in sorted(jlist):
if jira.getIncompatibleChange(): if jira.getIncompatibleChange():
incompatlist.append(jira) incompatlist.append(jira)
if (len(jira.getReleaseNote())==0):
warningCount+=1
if jira.checkVersionString():
warningCount+=1
if jira.checkMissingComponent() or jira.checkMissingAssignee():
errorCount+=1
elif jira.getType() == "Bug": elif jira.getType() == "Bug":
buglist.append(jira) buglist.append(jira)
elif jira.getType() == "Improvement": elif jira.getType() == "Improvement":
@ -496,6 +490,7 @@ def main():
notableclean(jira.getSummary())) notableclean(jira.getSummary()))
if (jira.getIncompatibleChange()) and (len(jira.getReleaseNote())==0): if (jira.getIncompatibleChange()) and (len(jira.getReleaseNote())==0):
warningCount+=1
reloutputs.writeKeyRaw(jira.getProject(),"\n---\n\n") reloutputs.writeKeyRaw(jira.getProject(),"\n---\n\n")
reloutputs.writeKeyRaw(jira.getProject(), line) reloutputs.writeKeyRaw(jira.getProject(), line)
line ='\n**WARNING: No release note provided for this incompatible change.**\n\n' line ='\n**WARNING: No release note provided for this incompatible change.**\n\n'
@ -503,9 +498,11 @@ def main():
reloutputs.writeKeyRaw(jira.getProject(), line) reloutputs.writeKeyRaw(jira.getProject(), line)
if jira.checkVersionString(): if jira.checkVersionString():
warningCount+=1
lintMessage += "\nWARNING: Version string problem for %s " % jira.getId() lintMessage += "\nWARNING: Version string problem for %s " % jira.getId()
if (jira.checkMissingComponent() or jira.checkMissingAssignee()): if (jira.checkMissingComponent() or jira.checkMissingAssignee()):
errorCount+=1
errorMessage=[] errorMessage=[]
jira.checkMissingComponent() and errorMessage.append("component") jira.checkMissingComponent() and errorMessage.append("component")
jira.checkMissingAssignee() and errorMessage.append("assignee") jira.checkMissingAssignee() and errorMessage.append("assignee")
@ -520,11 +517,11 @@ def main():
if (options.lint is True): if (options.lint is True):
print lintMessage print lintMessage
print "=======================================" print "======================================="
print "Error:%d, Warning:%d \n" % (errorCount, warningCount) print "%s: Error:%d, Warning:%d \n" % (vstr, errorCount, warningCount)
if (errorCount>0): if (errorCount>0):
cleanOutputDir(version) haderrors=True
sys.exit(1) cleanOutputDir(vstr)
continue
reloutputs.writeAll("\n\n") reloutputs.writeAll("\n\n")
reloutputs.close() reloutputs.close()
@ -571,5 +568,8 @@ def main():
if options.index: if options.index:
buildindex(title,options.license) buildindex(title,options.license)
if haderrors is True:
sys.exit(1)
if __name__ == "__main__": if __name__ == "__main__":
main() main()