adoroszlai opened a new pull request, #9806:
URL: https://github.com/apache/ozone/pull/9806
## What changes were proposed in this pull request?
Update selective checks for the files introduced in HDDS-11072.
1. Trigger `build` (and thus `generate-config-doc`) if changes are made in
files that affect config generation:
- `.github/workflows/generate-config-doc.yml`
- `dev-support/ci/xml_to_md.py`
2. Skip most checks for changes made in files that only affect the PR
targeting `ozone-site`:
- `.github/workflows/update-ozone-site-config-doc.yml`
- `dev-support/ci/pr_body_config_doc.sh`
https://issues.apache.org/jira/browse/HDDS-14694
## How was this patch tested?
Created a dummy commit for each of the 4 files, then added test cases in
`dev-support/ci/selective_ci_checks.bats`:
```bash
for f in .github/workflows/generate-config-doc.yml
.github/workflows/update-ozone-site-config-doc.yml
dev-support/ci/pr_body_config_doc.sh dev-support/ci/xml_to_md.py; do
echo >> "$f"
git commit -m "$f" $f
done
```
```
@test "dev-support/ci/pr_body_config_doc.sh" {
run dev-support/ci/selective_ci_checks.sh b796886904
assert_output -p 'basic-checks=["rat","bats"]'
assert_output -p needs-build=false
# same for all 4 files:
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
}
@test ".github/workflows/update-ozone-site-config-doc.yml" {
run dev-support/ci/selective_ci_checks.sh 82c4e2aa62
assert_output -p 'basic-checks=["rat"]'
assert_output -p needs-build=false
...
}
@test ".github/workflows/generate-config-doc.yml" {
run dev-support/ci/selective_ci_checks.sh fc9eb8b651
assert_output -p 'basic-checks=["rat"]'
assert_output -p needs-build=true
...
}
@test "dev-support/ci/xml_to_md.py" {
run dev-support/ci/selective_ci_checks.sh 8c9fa3dcbb
assert_output -p 'basic-checks=["rat"]'
assert_output -p needs-build=true
...
}
```
```bash
$ ./hadoop-ozone/dev-support/checks/bats.sh
...
ok 1 dev-support/ci/pr_body_config_doc.sh
ok 2 .github/workflows/update-ozone-site-config-doc.yml
ok 3 .github/workflows/generate-config-doc.yml
ok 4 dev-support/ci/xml_to_md.py
...
```
--
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]