adoroszlai commented on code in PR #9684:
URL: https://github.com/apache/ozone/pull/9684#discussion_r2797127960
##########
dev-support/ci/selective_ci_checks.sh:
##########
@@ -441,6 +442,23 @@ function check_needs_pmd() {
start_end::group_end
}
+function check_needs_ui_lint() {
+ start_end::group_start "Check if UI lint is needed"
+ local pattern_array=(
+ "^hadoop-ozone/dev-support/checks/lint.sh"
+ "^ozone-ui"
+ "\\.tsx?$"
+ "\\.jsx?$"
+ )
+ filter_changed_files
Review Comment:
```suggestion
filter_changed_files true
```
`true` is required so that `calculate_test_types_to_run` does not trigger
all real tests (acceptance, integration, kubernetes).
Also, we need to add `ozone-ui` here, otherwise it will be completely
ignored:
https://github.com/apache/ozone/blob/b14ea65e381ca6e5b8d473359f34387e990867f9/dev-support/ci/selective_ci_checks.sh#L166-L172
You can verify locally by adding a test case *temporarily* (because the
commit is from this PR and will be squashed, no longer valid on `master`):
```diff
--- dev-support/ci/selective_ci_checks.bats
+++ dev-support/ci/selective_ci_checks.bats
@@ -33,6 +33,18 @@
load bats-support/load.bash
load bats-assert/load.bash
+@test "UI code" {
+ run dev-support/ci/selective_ci_checks.sh
b14ea65e381ca6e5b8d473359f34387e990867f9
+
+ assert_output -p 'basic-checks=["rat"]'
+ assert_output -p needs-build=false
+ assert_output -p needs-compile=false
+ assert_output -p needs-compose-tests=false
+ assert_output -p needs-integration-tests=false
+ assert_output -p needs-kubernetes-tests=false
+ assert_output -p needs-ui-lint=true
+}
+
@test "checkstyle and bats" {
run dev-support/ci/selective_ci_checks.sh 11b098430
```
--
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]