adoroszlai commented on PR #3620:
URL: https://github.com/apache/ozone/pull/3620#issuecomment-1198943210

   @kerneltime @smengcl Thanks for taking a look.  Let me try to give some 
background for the change.
   
   1. We have different Github Actions workflows under `.github/workflows`:
       * regular build/test CI is defined in `post-commit.yml`, triggered by 
pushes, PRs and on schedule
       * PR titles are checked by `pull-request.yml`
       * special PR comments 
([example](https://github.com/apache/ozone/pull/3058#issuecomment-1193734431)) 
are handled by `comments.yaml`
       * pending PRs are closed by `close-pending.yaml` on schedule
   2. Regular CI (`post-commit.yml`) has some logic to decide whether to 
execute or skip specific checks (e.g. checkstyle, unit, acceptance, etc.) 
depending on which files were changed.  This is implemented in 
`selective_ci_checks.sh`, which is run as the first job.  It defines include 
and exclude regex patterns for each kind of check.  These patterns are matched 
against the list of changed files.  The script outputs true/false for each 
check, which is then picked up by the rest of the `post-commit.yml` workflow to 
skip/run other jobs.
   3. There is also a "must run all checks" case, triggered by either of two 
conditions:
      * if the change affects CI files, e.g. the workflow definition itself
      * if some changed files are not handled by any of the check-specific 
patterns
   4. We also run all checks for pushes and schedule, in other words, selective 
checks only applies to pull requests.  (Example: compare workflow runs for the 
same 
[change](https://github.com/dombizita/ozone/commit/e6d9c06e6ca40c0b2b95f091a56299440d3426b4)
 when [pushed to developer's 
fork](https://github.com/dombizita/ozone/actions/runs/2669593534), [pull 
request is created](https://github.com/apache/ozone/actions/runs/2669631613), 
and finally [merged to 
`master`](https://github.com/apache/ozone/actions/runs/2671240589).)
   
   Consider the case that I would like to change one of the other 
(non-`post-commit.yml`) workflow files, e.g. `pull-request.yml`.  When I open a 
PR, this kind of change currently triggers all checks in the `post-commit.yml` 
CI workflow.  Yet, most of the checks in `post-commit.yml` have nothing to do 
with `pull-request.yml`.  None of the unit, integration or acceptance tests are 
affected.  Checkstyle and findbugs (Java-specific checks) are not applicable.
   
   So this PR tweaks some of the include/exclude patterns to be more specific.


-- 
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