jiangzho opened a new pull request, #422:
URL: https://github.com/apache/spark-kubernetes-operator/pull/422

   ### What changes were proposed in this pull request?
   
   Enhance existing task `generateConfPropsDoc` and add new task 
`validateConfPropsDocUpToDate`
   
   * Task `generateConfPropsDoc` would no liner automatically overwrite 
existing doc file. It would generate file for validation purpose only, and 
would perform overwrite only if property flag is enabled.
   * Also fixed the file output location to use project rootDir instead of 
property value of `user.dir` as the latter may not point to project root in 
various cases.
   * Added new task `validateConfPropsDocUpToDate` to compare the staged docs 
vs desired (generated) docs, and prompts developer to update docs if needed.
   
   ### Why are the changes needed?
   
   Although we have `generateConfPropsDoc` chained in the build task, it's not 
mandatory and hence docs can become out of date. By adding this patch, 
developers can be more mindful for doc updates corresponding to code change.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Building tasks update only.
   
   ### How was this patch tested?
   
   Self-contained upon success & manually tested failure scenario when docs 
become out of date:
   
   ```
   FAILURE: Build failed with an exception.
   
   * Where:
   Build file 
'/Users/zhou_jiang/work/bench/apache/ipr/apache-spark-kubernetes-operator/build-tools/docs-utils/build.gradle'
 line: 59
   
   * What went wrong:
   Execution failed for task 
':build-tools-docs-utils:validateConfPropsDocUpToDate'.
   > Doc 
/Users/zhou_jiang/work/bench/apache/ipr/apache-spark-kubernetes-operator/docs/config_properties.md
 out of date: if operator conf properties has been updated, please re-generate 
properties docs by running ./gradlew 
build-tools-docs-utils:generateConfPropsDoc -Poverwrite
   
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to