@@ -389,21 +389,29 @@ def validate(self):
389
389
#Generate the validator for the current template.
390
390
#needs to be manually updated
391
391
def make_default_validator (body , debug = False ):
392
- changelogs = ParseSectionData ("CHANGELOGS " ,
392
+ changelogs = ParseSectionData ("CHANGE_LOGS " ,
393
393
"### Change Logs" ,
394
394
{"_Describe context and summary for this change. Highlight if any code was copied._" })
395
395
impact = ParseSectionData ("IMPACT" ,
396
396
"### Impact" ,
397
397
{"_Describe any public API or user-facing feature change or any performance impact._" })
398
- risklevel = RiskLevelData ("RISKLEVEL " ,
398
+ risklevel = RiskLevelData ("RISK_LEVEL " ,
399
399
"### Risk level" ,
400
400
{"_If medium or high, explain what verification was done to mitigate the risks._" })
401
+ docsUpdate = ParseSectionData ("DOCUMENTATION_UPDATE" ,
402
+ "### Documentation Update" ,
403
+ {"_Describe any necessary documentation update if there is any new feature, config, or user-facing change_" ,
404
+ "" ,
405
+ "- _The config description must be updated if new configs are added or the default value of the configs are changed_" ,
406
+ "- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the" ,
407
+ " ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make" ,
408
+ " changes to the website._" })
401
409
checklist = ParseSectionData ("CHECKLIST" ,
402
410
"### Contributor's checklist" ,
403
411
{})
404
- parseSections = ParseSections ([changelogs , impact , risklevel , checklist ])
412
+ parseSections = ParseSections ([changelogs , impact , risklevel , docsUpdate , checklist ])
405
413
406
- return ValidateBody (body , "CHANGELOGS " , parseSections , debug )
414
+ return ValidateBody (body , "CHANGE_LOGS " , parseSections , debug )
407
415
408
416
409
417
#takes a list of strings and returns a string of those lines separated by \n
@@ -466,6 +474,21 @@ def test_body():
466
474
good_risklevel = template_risklevel .copy ()
467
475
good_risklevel [1 ] = "none"
468
476
477
+ template_docs_update = [
478
+ "### Documentation Update" ,
479
+ "" ,
480
+ "_Describe any necessary documentation update if there is any new feature, config, or user-facing change_" ,
481
+ "" ,
482
+ "- _The config description must be updated if new configs are added or the default value of the configs are changed_" ,
483
+ "- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the" ,
484
+ " ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make" ,
485
+ " changes to the website._" ,
486
+ ""
487
+ ]
488
+
489
+ good_docs_update = template_docs_update .copy ()
490
+ good_docs_update [1 ] = "update docs"
491
+
469
492
template_checklist = [
470
493
"### Contributor's checklist" ,
471
494
"" ,
@@ -476,10 +499,10 @@ def test_body():
476
499
]
477
500
478
501
#list of sections that when combined form a valid body
479
- good_sections = [good_changelogs , good_impact , good_risklevel , template_checklist ]
502
+ good_sections = [good_changelogs , good_impact , good_risklevel , good_docs_update , template_checklist ]
480
503
481
504
#list of sections that when combined form the template
482
- template_sections = [template_changelogs , template_impact , template_risklevel , template_checklist ]
505
+ template_sections = [template_changelogs , template_impact , template_risklevel , template_docs_update , template_checklist ]
483
506
484
507
tests_passed = True
485
508
#Test section not filled out
@@ -532,9 +555,6 @@ def test_body():
532
555
return tests_passed
533
556
534
557
535
-
536
-
537
-
538
558
if __name__ == '__main__' :
539
559
if len (sys .argv ) > 1 :
540
560
title_tests = test_title ()
0 commit comments