Thank you for your interest in contributing to Gravitino! You are welcome to contribute in any way you can to enhance the project. Gravitino appreciates your assistance in making it better, whether through code contributions, documentation, tests, best practices, graphic design, or any other means that have a positive impact.
Before you get started, please read and follow these guidelines to ensure a smooth and productive collaboration.
- Getting Started
- Project Overview and Policies
- Contribution Guidelines
- Testing
- Coding Standards
- Community and Communication
- License
Either click the "Fork" button at the top right of the repository's page on GitHub OR create a fork on your local machine using git clone
.
git clone https://github.com/datastrato/gravitino.git
cd gravitino
Once you have cloned the GitHub repository, see how to build for instructions on how to build, or you can use the provided docker images at Datastrato's DockerHub repository.
To stop and start a local Gravitino server via bin/gravitino.sh start
and bin/gravitino.sh stop
in a Gravitino distribution, see how to build for more instructions.
On Windows:
-
Open the Gravitino project that was just downloaded.
-
Go to
File > Project Structure > Project
and change to the SDK you downloaded in WSL. -
If the SDK does not appear, manually add the SDK.
-
To find the SDK location, run this command in WSL:
On Ubuntu (WSL):
which java
IntelliJ IDEA is an integrated development environment (IDE) for Java development. Setting the project SDK ensures that IntelliJ uses the correct Java version for building and running the project.
You can open up WSL in the IntelliJ terminal. Find the down arrow and select ubuntu.
On Windows:
-
Open VSCode extension marketplace, search for and install WSL.
-
On Windows, press
Ctrl+Shift+P
to open the command palette, and runShell Command: Install 'code' command in PATH
.
Installing the WSL extension in VSCode allows you to open and edit files in your WSL environment directly from VSCode. Adding the code
command to your PATH enables you to open VSCode from the WSL terminal.
On Windows:
-
Add VSCode path to the environment variables. The default installation path for VSCode is usually:
C:\Users\<Your-Username>\AppData\Local\Programs\Microsoft VS Code\bin
Replace
<Your-Username>
with your actual Windows username.Example:
C:\Users\epic\AppData\Local\Programs\Microsoft VS Code\bin
Adding VSCode to the environment variables ensures that you can open VSCode from any command prompt or terminal window.
On Ubuntu (WSL):
code --version
cd gravitino
code .
Running code --version
verifies that the code
command is available. Using code .
opens the current directory in VSCode.
On Ubuntu (WSL):
-
Navigate to Your Project Directory
Use the terminal to navigate to the directory of your project. For example:
cd gravitino
-
Open the Project in VSCode
In the WSL terminal, type the following command to open the current directory in VSCode:
code .
This command will open the current WSL directory in VSCode on Windows. If you haven't added code
to your path, follow these steps:
-
Open VSCode on Windows.
-
Press
Ctrl+Shift+P
to open the command palette. -
Type and select
Shell Command: Install 'code' command in PATH
.
-
Ensure Remote - WSL is Active
When VSCode opens, you should see a green bottom-left corner indicating that VSCode is connected to WSL. If it isn't, click on the green area and select
Remote-WSL: New Window
orRemote-WSL: Reopen Folder in WSL
. -
Edit and Develop Your Project
You can now edit and develop your project files in VSCode as if they were local files. The Remote - WSL extension seamlessly bridges the file system between Windows and WSL.
If you ran into a memory issue when using WSL, here are some solutions to resolve it.
-
Shut down WSL
If your WSL is open, you can shut it down in Windows PowerShell using the following command:wsl --shutdown
-
Navigate to user folder
Open up File Explorer and navigate to
C:\Users\<your-username>
. -
Create the
.wslconfig
fileOpen up Notepad or another text editor and input the following:
[wsl2] memory=4GB # Limits VM memory in WSL 2 up to 4GB processors=4 # Makes the WSL 2 VM use four virtual processors
The memory and processor usage can be changed depending on your system's hardware.
-
Save the file
Save the file as
".wslconfig"
. Be sure to include the quotes to let Windows know that this isn't a text file.
For an overview of the project, see README.md.
For project management policies, refer to GOVERNANCE.md.
For future development directions, refer to the ROADMAP.md document.
Please read and follow the Code of Conduct. Gravitino provides a welcoming and inclusive environment for all contributors.
If you find a bug in Gravitino, please open an issue on GitHub. Be sure to include as much detail as possible, such as a clear description, steps to reproduce, and your environment. Please follow the template provided. If you encounter a security issue, please refer to SECURITY.md.
If you have ideas for enhancements or new features, feel free to create an issue to discuss them. Gravitino welcomes suggestions and provides prompt feedback on their feasibility and relevance.
If you are new to open source or can't find something to work on, check out the Good First Issues list.
Check out the list of open issues and find one that interests you. You can also comment on an issue to indicate that you're working on it. Please keep the issue updated with your progress.
Create a new branch from main
for your changes:
git checkout -b your-branch-name
Make your changes and commit them. Be sure to write clear and concise commit messages.
git commit -m "Your commit message"
Push your changes to your fork on GitHub:
git push your-branch-name
After you have pushed your changes, create a pull request (PR) in the Gravitino repository. Be sure to provide a detailed description of your changes, reference any related issues, and please follow the template provided. Gravitino's maintainers evaluate pull requests, offer feedback, and assist in merging project changes.
For details on the review process, please refer to MAINTAINERS.md.
The CI infrastructure runs unit and integration tests on each pull request, please make sure these tests pass before making a pull request.
The unit tests run on every build and integration tests run as needed. See how to test for more information.
When adding new code or fixing a bug be sure to add unit tests to provide coverage.
Spotless checks code formatting. If your code isn't correctly formatted, the build fails. To correctly format your code please use Spotless.
./gradlew spotlessApply
All files must have a license header and the build fails if any files are missing license headers. If you are adding third-party code be sure to understand how to add the third-party license to Gravitino LICENSE and NOTICE files.
For any bugs or new code please add unit tests to provide coverage of the code. The project may not accept code without unit tests.
All text files should use macOS/unix style line endings (LF) not windows style line endings (CRLF).
Join the community discourse group to discuss ideas and seek help. You are also encouraged to use GitHub discussions and follow Datastrato on social media to stay updated on project news.
When contributing to this project, you agree that your contributions use the Apache License version 2. Please ensure you have permission to do this if required by your employer.
Thank you for your contributions to Gravitino! The project appreciates your help in making it a success.