Skip to content

Latest commit

 

History

History
224 lines (187 loc) · 11.2 KB

CONTRIBUTING.md

File metadata and controls

224 lines (187 loc) · 11.2 KB

Contributing to Zeebe

Build Zeebe from source

Zeebe is a multi-module maven project. To build all components, run the command: mvn clean install -DskipTests in the root folder.

NOTE: All Java modules in Zeebe are built and tested with JDK 11, except the Java client, which is built and tested with JDK 8.

NOTE: The Go client and zbctl are built and tested with Go 1.15

The resulting Zeebe distribution can be found in the folder dist/target, i.e.

dist/target/zeebe-distribution-X.Y.Z-SNAPSHOT.tar.gz
dist/target/zeebe-distribution-X.Y.Z-SNAPSHOT.zip

This is a small overview of the contents of the different modules:

  • util contains custom implementations of building blocks like an actor scheduler, buffer allocations, metrics. Its parts are used in most of the other modules
  • protocol contains the SBE definition of the main message protocol
  • bpmn-model is a Java API for BPMN process definitions used for parsing etc.
  • msgpack-* is custom msgpack implementation with extensions to evaluate json-path expressions on msgpack objects
  • dispatcher is a custom implementation of message passing between threads
  • service-container is a custom implementation to manage dependencies between different services
  • logstreams is an implementation of a append only log backed by the filesystem
  • transport is our abstraction over network transports
  • gateway is the implementation of the gRPC gateway, using our SBE-based protocol to communicate with brokers
  • gateway-protocol is the gRPC definitions for the Zeebe client-to-gateway protocol
  • zb-db is our RocksDB wrapper for state management
  • engine is the implementation of the event stream processor
  • broker contains the Zeebe broker which is the server side of Zeebe
  • client-java contains the Java Zeebe client
  • atomix contains transport, membership, and consensus algorithms
  • benchmark contains utilities the team uses to run load tests
  • exporters/elasticsearch-exporter contains the official Elasticsearch exporter for Zeebe
  • journal contains the append-only log used by the consensus algorithm
  • snapshots module abstracting how state snapshots (i.e. zb-db) are handled

Report issues or contact developers

Zeebe uses GitHub issues to organize the development process. If you want to report a bug or request a new feature feel free to open a new issue on GitHub.

If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible. Ideally, that would include a small sample project that reproduces the problem.

If you have a general usage question please ask on the forum or slack channel.

GitHub Issue Guidelines

Every issue should have a meaningful name and a description which either describes:

  • a new feature with details about the use case the feature would solve or improve
  • a problem, how we can reproduce it and what would be the expected behavior
  • a change and the intention how this would improve the system

Create a Pull Request

Zeebe follows a gitflow workflow. The develop branch contains the current in-development state of the project. The master branch contains the latest stable release.

To work on an issue, follow the following steps:

  1. Check that a GitHub issue exists for the task you want to work on. If one does not, create one. Refer to the issue guidelines.
  2. Checkout the develop branch and pull the latest changes.
    git checkout develop
    git pull
    
  3. Create a new branch with the naming scheme issueId-description.
    git checkout -b 123-adding-bpel-support`
    
  4. Follow the Google Java Format and Zeebe Code Style while coding.
  5. Implement the required changes on your branch and regularly push your changes to the origin so that the CI can run. Git commit will run a pre-commit hook which will check the formatting, style and license headers before committing. If these checks fail please fix the issues. Code format and license headers can be fixed automatically by running maven. Checkstyle violations have to be fixed manually.
    git commit -am 'feat(broker): bpel support'
    git push -u origin 123-adding-bpel-support
    
  6. If you think you finished the issue please prepare the branch for reviewing. In general the commits should be squashed into meaningful commits with a helpful message. This means cleanup/fix etc commits should be squashed into the related commit. If you made refactorings or similar which are not directly necessary for the task it would be best if they are split up into another commit. Rule of thumb is that you should think about how a reviewer can best understand your changes. Please follow the commit message guidelines.
  7. After finishing up the squashing force push your changes to your branch.
    git push --force-with-lease
    
  8. To start the review process create a new pull request on GitHub from your branch to the develop branch. Give it a meaningful name and describe your changes in the body of the pull request. Lastly add a link to the issue this pull request closes, i.e. by writing in the description closes #123
  9. Assign the pull request to one developer to review, if you are not sure who should review the issue skip this step. Someone will assign a reviewer for you.
  10. The reviewer will look at the pull request in the following days and give you either feedback or accept the changes.
    1. If there are changes requested address them in a new commit. Notify the reviewer in a comment if the pull request is ready for review again. If the changes are accepted squash them again in the related commit and force push. Then initiate a merge by writing a comment with the contet bors r+.
    2. If no changes are requested the reviewer will initiate a merge by adding a comment with the content bors r+.
  11. When a merge is initiated, a bot will merge your branch with the latest develop and run the CI on it.
    1. If everything goes well the branch is merged and deleted and the issue and pull request are cloesed.
    2. If there are merge conflicts the author of the pull request has to manually rebase develop into the issue branch and retrigger a merge attempt.
    3. If there are CI errors the author of the pull request has to check if they are caused by its changes and address them. If they are flaky tests a merge can be retried with a comment with the content bors retry.

Commit Message Guidelines

Commit messages use Conventional Commits format with scope.

Examples:

  • docs(reference): add start event to bpmn symbol support matrix
  • fix(broker): reduce latency in backpressure
  • feat(clients/go): allow more than 9000 jobs in a single call

The commit message should match the following pattern:

%{type}(%{scope}): %{description}
  • type and scope should be chosen as follows
    • feat: For user facing features or improvements. scope should be either broker, clients/java or clients/go.
    • fix: For user facing bug fixes. scope should be either broker, clients/java or clients/go.
    • chore: For code changes which are not user facing, scope should be the folder name of the component which contains the main part of the change, e.g. broker or exporters.
    • docs: For changes on the documentation. scope should be the sub folder name in the docs/src/ directory which contains the main change, e.g. introduction or reference.
  • description: short description of the change to a max length of the whole subject line of 120 characters

Zeebe uses a bot which will check your commit messages when a pull request is submitted. Please make sure to address any hints from the bot.

Contributor License Agreement

You will be asked to sign our Contributor License Agreement when you open a Pull Request. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.

Licenses

Zeebe source files are made available under the Zeebe Community License Version 1.0 except for the parts listed below, which are made available under the Apache License, Version 2.0. See individual source files for details.

Available under the Apache License, Version 2.0:

If you would like to contribute something, or simply want to hack on the code this document should help you get started.

Code of Conduct

This project adheres to the Camunda Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior as soon as possible.