Commit Graph

115 Commits

Author SHA1 Message Date
David Arthur 8be216b24f
KAFKA-18792 Add workflow to check PR format (#18985)
Adds two new workflows to help us enforce some uniform PR structure. The
first workflow runs in an unprivileged context and simply captures the
PR number into a text file and archives it. This is then used by another
workflow that runs in a privileged context using the code in `trunk` to
actually do the validation.

The validation is done using a new Python script. This script fetches a
PR using the GitHub CLI and validates its structure. For now this just
includes the title and body, but could perform other non-code related
checks in the future.

This validation is needed for the up-coming merge queue functionality.

Reviewers: Justine Olshan <jolshan@confluent.io>
2025-02-25 15:33:52 -05:00
David Arthur cb33e98dfc
KAFKA-18748 Run new tests separately in PRs (#18770)
Split the JUnit tests into "new", "flaky", and the remainder. 

On PR builds, "new" tests are anything that do not exist on trunk. They are run with zero tolerance for flakiness. 

On trunk builds, "new" tests are anything added in the last 7 days. They are run with some tolerance for flakiness.

Another change included here is that we will not update the test catalog if any test job fails on a trunk build. We have had difficulty determining if all the tests had or not (due to timeout or failures in upstream Gradle tasks). By requiring green ":test" jobs, we can be sure that the resulting catalog will be valid.

---

The purpose of this change is to discourage contributors from adding flaky tests, but give some leeway for trunk so we have successful builds.

The "quarantinedTest" Gradle target has been consolidated into the regular "test" target. There are now some
runtime properties to control what tests are run.

* kafka.test.catalog.file: path to test catalog
* kafka.test.run.new: include new tests. this selection depends on the age of the loaded test catalog
* kafka.test.run.flaky: include tests marked as `@Flaky` (replaces the `excludeTags 'flaky'` directive)
* kafka.test.verbose: include additional logging from new JUnit classes (enabled by default if re-running GitHub workflow with debug logging enabled)
* maxTestRetries: how many retries to allow via Develocity retry plugin (default 0)
* maxTestRetryFailures: how many failures to allow before stopping retries (default 0)


Thanks to Jun Rao for inspiring the idea.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>
2025-02-24 17:08:15 -05:00
David Arthur e330f0bf25
MINOR Always keep thread dumps after build timeouts
Reviewers: Matthias J. Sax <matthias@confluent.io>
2025-02-14 20:36:01 -05:00
David Arthur d08e6a8e58
MINOR bump setup-gradle (#18879)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-13 09:56:55 -05:00
David Arthur 9b793dc1f9
MINOR increase max flaky tests allowed (#18792)
Increase the maximum number of flaky tests we tolerate for the main test suite from 3 to 10. This will result in fewer failed builds.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-04 10:35:41 -05:00
David Arthur 617196c68e
KAFKA-18636 Fix how we handle Gradle exits in CI (#18681)
This patch removes the explicit failure of test tasks in Gradle when there is a flaky test. This also fixes a fall-through case in junit.py where we did not recognize an error prior to running the tests (such as the javadoc task).

Additionally, this patch removes usages of ignoreFailures in our CI and changes the XML copy task to a finalizer task instead of doLast closure.

Reviewers: Jun Rao <junrao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-29 18:42:39 -05:00
David Arthur 8c0a0e07ce
KAFKA-17587 Refactor test infrastructure (#18602)
This patch reorganizes our test infrastructure into three Gradle modules:

":test-common:test-common-internal-api" is now a minimal dependency which exposes interfaces and annotations only. It has one project dependency on server-common to expose commonly used data classes (MetadataVersion, Feature, etc). Since this pulls in server-common, this module is Java 17+. It cannot be used by ":clients" or other Java 11 modules.

":test-common:test-common-util" includes the auto-quarantined JUnit extension. The @Flaky annotation has been moved here. Since this module has no project dependencies, we can add it to the Java 11 list so that ":clients" and others can utilize the @Flaky annotation

":test-common:test-common-runtime" now includes all of the test infrastructure code (TestKitNodes, etc). This module carries heavy dependencies (core, etc) and so it should not normally be included as a compile-time dependency.

In addition to this reorganization, this patch leverages JUnit SPI service discovery so that modules can utilize the integration test framework without depending on ":core". This will allow us to start moving integration tests out of core and into the appropriate sub-module. This is done by adding ":test-common:test-common-runtime" as a testRuntimeOnly dependency rather than as a testImplementation dependency. A trivial example was added to QuorumControllerTest to illustrate this.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 09:03:43 -05:00
David Arthur 967a19732a
MINOR Fix condition in flaky test report workflow (#18599)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2025-01-21 13:38:14 -05:00
Clay Johnson e9e03faf87
KAFKA-18454 Publish build scans to develocity.apache.org (#18539)
This patch includes some maintenance updates for Develocity.

* Publish build scans to develocity.apache.org
* Update Develocity Gradle plugin to to 3.19
* Use `DEVELOCITY_ACCESS_KEY` to authenticate to `develocity.apache.org`

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>
2025-01-21 13:37:27 -05:00
Vadym Zhytkevych b52150dd0d
KAFKA-18391 Skip running "Flaky Test Report" job on forks (#18376)
Reviewers: David Arthur <mumrah@gmail.com>
2025-01-16 16:14:59 -05:00
santhoshct 0727f9be63
KAFKA-18416 - added a new report section to catch persistent flaky tests (#18434)
Reviewers: David Arthur <mumrah@gmail.com>
2025-01-16 14:10:32 -05:00
David Arthur a6a1c6dd20
MINOR Remove needs-attention label after review (#18366)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-08 19:35:45 -05:00
santhoshct e546b0225b
KAFKA-18307: Don't report on disabled/removed tests (#18318)
This patch ensures we only analyze trunk builds for the Develocity report. Some other minor fixes are also included

Reviewers: David Arthur <mumrah@gmail.com>
2025-01-06 10:54:51 -05:00
David Arthur 649cd6b42c
MINOR Fix conditional in Update Test Catalog workflow (#18289)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 09:05:37 -05:00
Logan Zhu e0f35e025a
KAFKA-18278: Correct name and description for run-gradle step (#18223)
Reviewers: David Arthur <mumrah@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-23 09:50:08 -05:00
David Arthur af5d6c2578
MINOR Fix some test-catalog issues (#18272)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-20 08:42:57 -05:00
Ken Huang 08efe735a4
KAFKA-18241: add docs check to CI (#18183)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>
2024-12-18 13:20:29 -05:00
santhoshct 8150e7bf79
KAFKA-18223 Improve flaky test report (#18212)
Add tables for all sections of the report and add links to Develocity.

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-18 13:18:57 -05:00
David Arthur 5e9605a27d
MINOR Remove triage label in nightly job (#18147)
For PRs that have been reviewed (by anyone, not just a committer), remove the "triage" label. This job runs once per night.

Reviewers: Justine Olshan <jolshan@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-18 13:13:15 -05:00
David Arthur 7697d3b826
MINOR Use new Develocity API key secret (#18229)
Instead of parsing the GE_ACCESS_TOKEN, the patch uses the newly minted DV_API_ACCESS secret for Develocity API access.

Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-17 13:22:56 -05:00
David Jacot 86f7fdecf3
MINOR: Add 4.0 branch to CI (#18215)
Reviewers: David Arthur <mumrah@gmail.com>
2024-12-16 13:13:18 -05:00
Nick Guo 2582d36291
KAFKA-18244: Fix empty SHA on "Pull Request Labeled" workflow (#18190)
Reviewers: David Arthur <mumrah@gmail.com>
2024-12-16 11:14:37 -05:00
David Arthur 9b5588151b
MINOR: Only look for the CI workflow pending approval (#18200)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-16 13:49:58 +08:00
David Arthur f3f975ea67
MINOR: Add badge for flaky test report (#18179)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 12:14:50 +08:00
David Arthur 369b8b5607
KAFKA-18223 Add GHA to run report [2/n] (#18170)
Run the flaky test report daily at 6am UTC.

Reviewers: Jun Rao <junrao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-13 20:59:04 -05:00
Matthias J. Sax d7c80a7257 MINOR: update Kafka version for docker scan 2024-12-12 16:30:24 -08:00
santhoshct 5bb1ea403c
KAFKA-18223 Flaky test report script (#17938)
Adds a python script to generate a detailed flaky test report using the Develocity API

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-12 16:50:17 -05:00
David Arthur 4e7e351fb4
MINOR Ignore missing "triage" label in pr-reviewed workflow (#18133)
Reviewers: Greg Harris <greg.harris@aiven.io>
2024-12-11 08:07:57 -05:00
David Arthur d9a71e083b
MINOR add note about GitHub org visibility (#18128)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-10 15:33:37 -05:00
David Arthur b8dadb741c
MINOR Add PR triage workflow (#17881)
Automatically adds a "triage" label to PRs from the community. After 7 days, if no review has been made and the "triage" label is still present, a "needs-attention" label is added.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Mickael Maison <mickael.maison@gmail.com>
2024-12-10 12:34:09 -05:00
Divij Vaidya 3a04990308
MINOR: Add tiered-storage label automatically to PRs (#18059)
Reviewers: TaiJuWu <tjwu1217@gmail.com>, Kamal Chandraprakash <kamal.chandraprakash@gmail.com>
2024-12-06 07:59:25 +05:30
Josep Prat 2ad111ff3e
MINOR: Add dependencies label automatically to PRs (#18052)
Signed-off-by: Josep Prat <josep.prat@aiven.io>

Reviewers: Divij Vaidya <diviv@amazon.com>
2024-12-05 13:42:13 +01:00
Vedarth Sharma 6a43a6bddf
MINOR: Fix error in installing docker-compose on docker-builds workflows (#18042)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-04 23:59:55 +05:30
Vedarth Sharma f80e726e9b
MINOR: Install docker-compose on docker-build workflows (#18037)
Docker tests rely on docker compose. In recent runs it has been observed that github actions does not provide support for docker compose, so we are installing it explicitly in the workflow.
2024-12-04 22:01:05 +05:30
TengYao Chi 056a76e2b9
KAFKA-17811 Separate modules to use different JDKs (#17522)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 23:30:41 +08:00
David Arthur e9fd0437d5
MINOR: Increase operations for stale PR workflow (#17854)
The Stale PRs workflow is only able to act on a relatively small number of PRs due to the API operations limit. This patch increases the limit from 100 to 500.

Reviewers: Josep Prat <josep.prat@aiven.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-20 19:50:19 +08:00
David Arthur 441a6d0b79
MINOR fix test-catalog generation (#17866)
Fixes another issue introduced in #17725 where the streaming XML parser would skip over tests that followed a SKIPPED test. This caused a large number of tests to be removed from the test catalog e4a5eb8

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-19 15:37:41 -05:00
David Arthur a334b1b6fd
MINOR Fix build scan artifact name in ci-complete (#17863)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-19 09:48:37 -05:00
David Arthur 5f4cbd4aa4
KAFKA-17767 Automatically quarantine new tests [5/n] (#17725)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-19 09:56:36 +08:00
Colin Patrick McCabe e0f75a1e50
Update docker_scan.yml for 3.9.0 (#17708)
Reviewers: Justine Olshan <jolshan@confluent.io>
2024-11-06 16:40:16 -08:00
David Arthur cbf440dfd0
KAFKA-17767 Parse quarantined tests and display them [4/n] (#17661)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 23:33:55 +08:00
David Arthur 2696a6d7a1
KAFKA-17767 Load test catalog data [3/n] (#17654)
Add a new "load-catalog" job to the workflow. This job will checkout the test-catalog branch at 7 days prior and generate a text file of all the tests that were known at that time. This file is then passed down to the two parallel "test" jobs to be used as a source of data for the quarantined test behavior.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 10:38:47 -04:00
David Arthur dd432c0ca1
MINOR: Add links test catalog commits (#17650)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 00:53:02 +08:00
David Arthur 835f256f70
MINOR: Don't run update-test-catalog on PRs (#17640)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-30 16:57:49 -04:00
David Arthur 68c6c6da86
KAFKA-17767 Store the test catalog in Git [2/n] (2nd attempt) (#17627)
This patch adds a CI job to store our test catalog in an orphaned branch named "test-catalog" within this repo. 
This data will be used to help determine which tests should be quarantined.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-30 13:50:42 -04:00
Josep Prat 4419677e06
Update docker_scan.yml for 3.8.1 (#17623)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-29 16:06:01 +01:00
David Arthur 8c071b02e9
MINOR: Fix JDK versions in CI (#17621)
Our "validate" job was running on JDK 21 while the "test" job was running 11 and 23. This patch updates the validate job to 23 and fixes the test catalog step to only run on JDK 23 (instead of 21)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-29 13:58:38 +08:00
TengYao Chi 553e6b4c6d
KAFKA-17860 Remove log4j-appender module (#17588)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-24 18:13:30 +08:00
Ken Huang 76a9df47ca
KAFKA-17639 Add Java 23 to CI build matrix (#17409)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-20 23:55:19 +08:00
David Arthur ef6c950b88
KAFKA-17767 Extract test catalog from JUnit output [1/n] (#17397)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-17 14:09:22 +08:00