Skip to content

Contribute your code

dbeaver-devops edited this page Nov 14, 2024 · 1 revision

Table of contents

Overview

This document provides guidelines for contributing to the CloudBeaver repository. It outlines the procedures for creating pull requests, fixing bugs, and maintaining consistency in code style within our codebase.

What types of new features are acceptable

Generally, you can suggest any feature you think is useful for the database management tool. However, we usually do not implement features that are too specific to your development process or specific to your internal company processes.

Good options include:

  • Adding new database or driver support.
  • Extending database metadata read/modify capabilities (e.g., adding trigger reading for a specific database).
  • Adding a new data export format.
  • Localizing the CloudBeaver interface (extend existing localization or add a new language).
  • Adding a new database-specific tool (e.g., table analysis for a specific database).

You can find code examples of all these features in our codebase.

Important: When suggesting new features, be aware that if a feature already exists in the Enterprise, AWS, or Team Editions, we may not merge it into the Community Edition.

Can I fix a bug by myself

If you identify a bug on our board that needs fixing and it is not scheduled for the nearest milestone, you are welcome to attempt fixing it yourself. It is a good idea to ask in the ticket because some issues may not be resolved for specific reasons.

If you decide to fix the bug and submit a pull request (refer to the guidelines), the team will review it and provide feedback if necessary. If the PR is merged, the fix will be included in the next release of the CloudBeaver Community Edition.

Create pull request

Before creating a pull request, you should first create a ticket in our issue tracker. Leave a comment indicating that you intend to implement the feature or fix the bug yourself. Once the CloudBeaver development or QA team has responded to your comment, you may begin your work.

You can follow the standard GitHub instructions for this process. Generally, you will need to:

  • Create a fork of the dbeaver/cloudbeaver repository.
  • Create a new branch in your fork.
  • Commit your changes to this branch.
  • Create a pull request to the upstream repository.

Important: When committing changes in your branch, include the ticket number in the commit message like this: dbeaver/cloudbeaver#issue-number Initial commit for my super-duper feature. You may make any number of commits. We typically perform a squash merge before integrating changes into the main repository.

Pull request guidelines

  • Please avoid creating multiple pull requests for a single issue.
  • Provide a detailed description of the affected functionality.
  • Avoid force-pushing commits in the PR branch, as this makes reading the commit history more difficult.
  • If the UI is affected, it is recommended to provide screenshots or a video demonstrating the changes made.

Code guidelines

The main rule is to use the same code style already applied in a particular source file.

  • Do not reformat code or optimize imports in a file you are changing, as it makes it very difficult to review your commits due to the volume of changes.
  • Use our automatic code style checks for pull requests. Every PR you submit to the dbeaver/cloudbeaver repository will be checked, and you will be able to see the report of the checklist.

IntelliJ IDEA code style can be found at: https://github.com/dbeaver/idea-rcp-launch-config-generator.

Related articles Description
Code of conduct Project rules and guidelines.
Code structure Overview of the plugin-based architecture.
Frontend development guidelines Guidelines for frontend development.
Build and deploy Guide on building and deploying the application.
Frontend technical overview Detailed overview of the frontend architecture.
Server architecture Explanation of the server architecture.
Server API explorer Tool to explore the server API.
CloudBeaver styling components Guidelines for styling components.
Adding new database drivers Instructions for adding new database drivers.
Develop in IDEA Instructions for working in IntelliJ IDEA.
Develop in Eclipse Instructions for working in Eclipse.
Develop in VS Code Instructions for working in Visual Studio Code.
Copyright notice

Every file you add or modify must include the following copyright header at the top:

/*
 * DBeaver - Universal Database Manager
 * Copyright (C) 2010-2024 DBeaver Corp and others
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

Tip: Ensure the copyright header is present and up to date for each file in your pull request.

Contribution rewards

We appreciate your contributions and offer rewards for accepted pull requests. Keep contributing to improve the project and receive a reward from the team! For more details, visit Help the Beaver.

CloudBeaver Documentation

User Guide

Installation

Configuration

CloudBeaver AWS

CloudBeaver Enterprise Edition

Team Edition

Deployment

Clone this wiki locally