virajjasani opened a new pull request, #2675:
URL: https://github.com/apache/phoenix/pull/2675
JIRA: PHOENIX-8069
### Why
Phoenix PR precommit (`Jenkinsfile.github`) and branch builds
(`Jenkinsfile`) run on ci-hadoop.apache.org, which has not been reachable for
about a week. This PR moves both builds to GitHub Actions. The Jenkins limits
and test grouping are kept, and some limits are made stricter.
### What
* `.github/workflows/phoenix-precommit.yml` replaces `Jenkinsfile.github`.
It runs on `pull_request` (not `pull_request_target`, which ASF disables from
November 2026). It runs Yetus 0.13.0, the same release Jenkins used, as 12 jobs:
* one general check (all Yetus plugins except `unit`)
* 10 unit checks, one per test group or slice
* one test coverage check, after the unit checks
* `.github/workflows/phoenix-branch-build.yml` replaces `Jenkinsfile`. It
runs on every push to `master` and `5.*`, and can be started by hand. It builds
the HBase 2.5 and 2.6 profiles, 10 jobs per profile, and rebuilds HBase first
as `dev/rebuild_hbase.sh` does today.
* `dev/phoenix-test-group-args.sh` (new) prints the Maven arguments that
limit a build to one test group.
* `dev/jenkins_precommit_github_yetus.sh` and `dev/phoenix-personality.sh`
still work on Jenkins and now also run under GitHub Actions. They pass the test
group and the fork counts to Maven.
* `dev/yetus_console_to_md.py` is copied from HBase, with pylint fixes, and
failed tests are taken from the per-test lines of the Maven output. It writes
the Yetus result to the job summary.
* `dev/phoenix-list-tests.sh`, `dev/phoenix-test-progress.sh` and
`dev/phoenix_check_tests.py` (new) list the tests run, show the test progress,
and check the test coverage.
* `.github/dependabot.yml` keeps the actions up to date, as the [ASF GitHub
Actions policy](https://infra.apache.org/github-actions-policy.html) requires.
### Test split
A GitHub-hosted job can run for at most 6 hours. Jenkins ran every test in
one job with an 11 hour timeout. The tests are split by the existing groups in
the root `pom.xml`, and the two large groups are split again by the first
letter of the test class name:
| Group | Jobs |
|---|---|
| unit tests (surefire) | 1 |
| `ParallelStatsEnabledTest` | 1 |
| `ParallelStatsDisabledTest` | 4 (A-C, D-I, J-R, S-Z) |
| `NeedsOwnMiniClusterTest` | 4 (A-C, D-K, L-P, Q-Z) |
Together the jobs run the same tests as the single Jenkins job, with no test
left out or run twice.
### Limits
| Limit | Jenkins | GitHub Actions |
|---|---|---|
| Artifact retention | PR: 3 days, branch: 5 days | 2 days |
| Concurrent jobs per workflow | 'Hadoop' executors | at most 6 (ASF
recommended limit: 15) |
| Concurrent builds per PR | 1 | 1 |
| PR builds per 24 hours | 2, manual builds not counted | 2, manual re-runs
not counted |
| Concurrent builds per branch | not limited | 1 |
| HBase rebuild timeout | 30 minutes | 30 minutes |
| Job timeout | 11 hours | 6 hours (GitHub-hosted runner maximum) |
### Differences from Jenkins
* **Third PR build in 24 hours:** Jenkins queued it. GitHub Actions cannot
queue a run, so the run fails with a message to re-run it from the GitHub UI.
It fails rather than passes so that the PR never shows a passing check for a
commit that was not built.
* **Test forks:** GitHub-hosted runners have 4 CPUs and 16 GB of memory. The
jobs use 4 unit test forks and 3 integration test forks (`pom.xml` defaults: 8
and 7). The Yetus docker memory limit is 14g (Jenkins: 20g).
* **Yetus commit statuses:** not written. Fork PRs get a read-only token,
and 12 jobs would overwrite each other's statuses. Each job's check shows its
result, and the Yetus report is in the job summary and the uploaded artifact.
* **Build emails:** Jenkins emailed each branch build result to commits@.
That is not replaced in this PR.
### Test checks and reporting
* **Test class names:** General check fails if an IT class in a test group
cannot be picked up by any unit check job, because its name does not end in
`IT` or does not start with a letter A-Z.
* **Test coverage:** a job after the unit checks collects the classes each
job ran, and fails if a test class that Maven should run ran in no job or in
more than one job.
* **Console output:** each unit check prints the start and result of every
test class while the tests run, and the list of test classes run when they
finish.
* **Job summary:** each unit check shows the exact Maven command Yetus ran,
and lists every failed test by its full name.
### Test fixes
* `SaltedTableWithParallelStatsEnabledIT` had the wrong test category, so no
execution ran it.
* `PreMatureTimelyAbortScanIt` was renamed to `PreMatureTimelyAbortScanIT`.
Failsafe only picks up classes ending in `IT`.
### IT classes that are never run
These IT classes have no test group `@Category` on the class or a parent
class, so Maven has never run them, on Jenkins or here. This PR leaves them as
they are. The test class name check lists them as a warning.
* `org.apache.phoenix.end2end.DynamicColumnWildcardIT`
* `org.apache.phoenix.end2end.GlobalConnectionTenantTableIT`
* `org.apache.phoenix.end2end.IndexScrutinyWithMaxLookbackIT`
* `org.apache.phoenix.end2end.MixedCaseInnerJoinAliasesIT`
* `org.apache.phoenix.end2end.NonParameterizedIndexScrutinyToolIT`
* `org.apache.phoenix.end2end.SyncUpdateCacheFreqIT`
* `org.apache.phoenix.end2end.SystemTablesUpgradeIT`
* `org.apache.phoenix.end2end.UpgradeIndexToolTablesIT`
*
`org.apache.phoenix.end2end.UpgradeIndexToolTablesNameSpaceMappingDisabledIT`
* `org.apache.phoenix.end2end.index.IndexTwoPhaseCreateIT`
* `org.apache.phoenix.end2end.index.LocalIndexIT`
* `org.apache.phoenix.end2end.transform.TransformIT`
* `org.apache.phoenix.end2end.transform.TransformMonitorIT`
* `org.apache.phoenix.end2end.transform.TransformToolIT`
### Test runs on a fork
The workflows were run on a fork before this PR. The unit tests and the
`ParallelStatsEnabledTest` and `ParallelStatsDisabledTest` slices took 7 to 36
minutes each on GitHub-hosted runners. One `ParallelStatsDisabledTest` slice
failed on a flaky `UpsertSelectIT.testParallelUpsertSelect` connection leak
assertion, which is not related to this PR. The `NeedsOwnMiniClusterTest`
slices were cancelled before they finished.
### Not yet measured
* How long the `NeedsOwnMiniClusterTest` slices take, and the total build
time with at most 6 jobs at the same time. The slices may need adjusting after
the first runs.
* Total runner minutes against the ASF budget.
### Out of scope
* Removing the Jenkinsfiles. They stay until the GitHub Actions results
match Jenkins.
* `Jenkinsfile.yetus` (patches attached to JIRA).
* Backporting the workflows to the 5.x branches.
--
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]