Clone your fork, create a new branch, push commits to the branch (review the Kafka Coding Guidelines, if you haven't already).
Consider whether documentation or tests need to be added or updated as part of the change, and add them as needed (doc changes should be submitted along with code change in the same PR).
Run all tests as described in the project's README.
Open a pull request against the trunk branch of apache/kafka. (Only in special cases would the PR be opened against other branches.)
The PR title should usually be of the form
KAFKA-xxxx: Title, where
KAFKA-xxxxis the relevant JIRA id and
Titlemay be the JIRA's title or a more specific title describing the PR itself. For trivial cases where a JIRA is not required (see JIRA section for more details)
HOTFIX:can be used as the PR title prefix.
If the pull request is still a work in progress, and so is not ready to be merged, but needs to be pushed to Github to facilitate review, then add
[WIP]after the JIRA id.
Consider identifying committers or other contributors who have worked on the code being changed. The easiest way is easiest is to simply follow GitHub's automatic suggestions. You can add
@usernamein the PR description to ping them immediately.
Please state that the contribution is your original work and that you license the work to the project under the project's open source license.
A comment with information about the pull request will be added to the JIRA ticket.
- Change the status of the JIRA to "Patch Available" if it's ready for review.
The Jenkins automatic pull request builder will run unit and integration tests on your branch (after merging it to the target branch, typically
Once ready, the PR `checks` box will be updated with the test results along with links to the full results on Jenkins (we have separate builds in order to test multiple Java and Scala versions).
Investigate and fix failures caused by the pull the request
Fixes can simply be pushed to the same branch from which you opened your pull request.
Please address feedback via additional commits instead of amending existing commits. This makes it easier for the reviewers to know what has changed since the last review. All commits will be squashed into a single one by the committer via GitHub's squash button or by a script as part of the merge process.
Jenkins will automatically re-test when new commits are pushed.
Despite our efforts, Kafka may have flaky tests at any given point, which may cause a build to fail. You can trigger a new build by adding the following comment: "retest this please". If the failure is unrelated to your pull request and you have been able to run the tests locally successfully, please mention it in the pull request.
In addition to unit and integration tests, we also have a set of system tests that run on a nightly basis. For large, impactful or risky changes, it is preferable to run the system tests before merging the pull request. Currently that can be done via a manually triggered job in a Jenkins instance provided by Confluent (ask for access in the pull request). In the near future, we will also be able to run the system tests in Travis (progress can be tracked via
JIRA server ASF JIRA serverId 5aa69414-a9e9-3523-82ec-879b028fb15b key KAFKA-4463