- Issues for new contributors
- Contribution Workflow
- Development Environment Setup
- Contributing documentation
- Debugging
- Testing
- Code conventions
We happily welcome contributions to the Databricks Java SDK. We use GitHub Issues to track community reported issues and GitHub Pull Requests for accepting changes.
New contributors should look for the following tags when searching for a first contribution to the Databricks Java SDK code base. We strongly recommend that new contributors tackle “good first issue” projects first; this helps the contributor become familiar with the contribution workflow, and for the core devs to become acquainted with the contributor.
To contribute to this repository, you must sign off your commits to certify that you have the right to contribute the code and that it complies with the open source license. You can easily do this by adding a "Signed-off-by" line to your commit message to certify your compliance. Please use use your real name as pseudonymous/anonymous contributions are not accepted.
Signed-off-by: Joe Smith <joe.smith@email.com>
If you set your user.name
and user.email
git configs, you can sign your commit automatically with git commit -s:
git commit -s -m "Your commit message"
Code contributions—bug fixes, new development, test improvement—all follow a GitHub-centered workflow. To participate in Databricks Java SDK development, set up a GitHub account. Then:
-
Fork the repo you plan to work on. Go to the project repo page and use the Fork button. This will create a copy of the repo, under your username. (For more details on how to fork a repository see this guide.)
-
Clone down the repo to your local system.
git clone git@github.com:YOUR_USER_NAME/databricks-sdk-java.git
-
Create a new branch to hold your work.
git checkout -b new-branch-name
-
Work on your new code. Write and run tests.
-
Commit your changes.
git add -A git commit -s -m "commit message here"
-
Push your changes to your GitHub repo.
git push origin branch-name
-
Open a Pull Request (PR). Go to the original project repo on GitHub. There will be a message about your recently pushed branch, asking if you would like to open a pull request. Follow the prompts, compare across repositories, and submit the PR. This will send an email to the committers. You may want to consider sending an email to the mailing list for more visibility. (For more details, see the GitHub guide on PRs.)
Maintainers and other contributors will review your PR. Please participate in the conversation, and try to make any requested changes. Once the PR is approved, the code will be merged.
Additional git and GitHub resources:
Git documentation Git development workflow Resolving merge conflicts
We recommend using IntelliJ to develop the Java SDK. You can download the community edition here. Once you have IntelliJ installed, open the SDK project by selecting File -> Open
and selecting the databricks-sdk-java
folder. Ensure that you have the Maven plugin loaded.
We welcome any contributions to improving documentation of the Databricks Java SDK. All documentation contributions should be as detailed as possible. Please note that many files of the SDK are autogenerated, including all files in the databricks-sdk-java/src/main/java/com/databricks/sdk/service
directory, so manual edits to those files will be overwritten.
After adding any documentation, make sure to run the Spotless code formatting plugin, either from the Maven plugin in IntelliJ or from the command line: mvn spotless:apply
.
The Databricks Java SDK uses the SLF4J logging framework. To enable debug logging, add the following line to your log4j.properties
file:
log4j.logger.com.databricks.sdk=DEBUG
- All changes to the SDK should be covered by unit tests.
- When applicable, new features should be covered by integration tests. Integration tests are automatically run against Databricks workspaces and accounts in AWS, Azure and GCP.
- Integration tests should clean up after themselves. If an integration test creates a resource like a file or cluster, it should delete that resource after the test is complete.
- Integration tests should reuse compute resources where possible.
- Files should not be larger than 600 lines
- Single function should fit to be seen on 13" screen: no more than 40 lines of code. Only exception to this rule is in
*Test.java
or*IT.java
test suites. - There should be no unnecessary exports. Classes and functions should be private by default unless they are of value outside the package.