smengcl commented on a change in pull request #3061:
URL: https://github.com/apache/ozone/pull/3061#discussion_r804082817
##########
File path: dev-support/ci/selective_ci_checks.bats
##########
@@ -99,6 +99,39 @@ load bats-assert/load.bash
assert_output -p needs-kubernetes-tests=false
}
+@test "integration and unit: script change" {
+ run dev-support/ci/selective_ci_checks.sh c6850484f
Review comment:
Yup. From my limited understanding of the script, it looks like the SHA
argument for `selective_ci_checks.sh` is first read here:
https://github.com/apache/ozone/blob/5843ab95c4f4a5c3eba3111b86da258f0f0ad499/dev-support/ci/selective_ci_checks.sh#L512-L526
after that it is seemingly only used here in `get_changed_files()`:
https://github.com/apache/ozone/blob/5843ab95c4f4a5c3eba3111b86da258f0f0ad499/dev-support/ci/selective_ci_checks.sh#L62-L70
where the script generate the diff list of changed files from the given
commit by running `git diff-tree --no-commit-id --name-only -r SHA~1 SHA`
command.
So in the case of c6850484f,
`CHANGED_FILES=hadoop-ozone/dev-support/checks/_mvn_unit_report.sh` (or in the
case of multiple file change commits like 86a771dfe, the command gives relative
file paths to the root separated by **line feeds**).
Therefore, wouldn't that be more straight forward to feed the file paths
(a.k.a. `CHANGED_FILES`) directly to the `get_changed_files()` function rather
than feeding a SHA? I'm guessing there was a historical reason for it? Some
other functions are/were using the SHA for different purposes? But even then it
is questionable if it is worth it to address this. This is more of a simple
thought/question from me rather than a suggestion here.
--
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]