adoroszlai opened a new pull request, #12023:
URL: https://github.com/apache/ozone/pull/12023
## What changes were proposed in this pull request?
Create a reusable action for setting up Java and restoring the Maven cache
that contains Ozone's dependencies (but not Ozone). These two should almost
always be performed together. Any workflow that needs Java without this cache
(e.g. `build-ratis`) can keep using `actions/setup-java`.
The action encapsulates:
- the type of cache used (`actions/cache` currently)
- cache key composition (`maven-repo-${{ hashFiles(...) }}`)
Use the new action in existing workflows, keeping current behavior:
- `populate-cache` restores only if "exact key" matches
- other workflows may fallback to other existing caches
Add `.mvn/extensions.xml` to the cache key, since it uses versioned Maven
artifacts, cache may need to be updated if it changes.
Update `asf-allowlist-check` and `zizmor` workflows to also apply checks to
`.github/actions`.
https://issues.apache.org/jira/browse/HDDS-17790
## How was this patch tested?
`CI` check (before `populate-cache`):
- fallback to other existing cache:
https://github.com/adoroszlai/ozone/actions/runs/43039579591/job/130587691129#step:7:197
`populate-cache`:
- exact cache not found:
https://github.com/adoroszlai/ozone/actions/runs/43048303637/job/130618158348#step:3:100
- no fallback to other cache, build from scratch
- saved with same key:
https://github.com/adoroszlai/ozone/actions/runs/43048303637/job/130618158348#step:16:24
`flaky-test-check` after `populate-cache`:
- cache with exact key:
https://github.com/adoroszlai/ozone/actions/runs/43050169951/job/130624950055#step:3:142
`repeat-acceptance` after `populate-cache`:
-
https://github.com/adoroszlai/ozone/actions/runs/43050240448/job/130625146873#step:4:117
`populate-cache` re-run:
- exact cache hit:
https://github.com/adoroszlai/ozone/actions/runs/43050621577/job/130626424223#step:3:107
- skipped `Fetch dependencies` and `Save cache for Maven dependencies`
`zizmor`:
https://github.com/adoroszlai/ozone/actions/runs/43039579095/job/130587459621#step:3:34
`asf-allowlist-check`:
https://github.com/adoroszlai/ozone/actions/runs/43039579538/job/130587461473#step:3:110
Full CI:
https://github.com/adoroszlai/ozone/actions/runs/43039579591
--
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]