Skip to content

Latest commit

 

History

History
129 lines (78 loc) · 5.66 KB

CONTRIBUTING.md

File metadata and controls

129 lines (78 loc) · 5.66 KB

Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.

Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

  • A reproducible test case or series of steps
  • The version of our code being used
  • Any modifications you've made relevant to the bug
  • Anything unusual about your environment or deployment

Contributing via Pull Requests

Contributions via pull requests are not accepted. Please open an issue or feature request so that we can follow up.

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opensource-codeofconduct@amazon.com with any additional questions or comments.

Security issue notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public github issue.

Licensing

See the LICENSE file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Contributing Guidelines from Original Benchbase

Contributing

We welcome all contributions! Please open a pull request. Common contributions may include:

  • Adding support for a new DBMS.
  • Adding more tests of existing benchmarks.
  • Fixing any bugs or known issues.

Contents

IDE

Although you can use any IDE you prefer, there are some configurations for VSCode that you may find useful included in the repository, including Github Codespaces and VSCode devcontainer support to automatically handle dependencies, environment setup, code formatting, and more.

Ensure security before each commit

Configure git-secrets and run it before every commit. Make sure that secrets are not committed to Git version control. Follow this guide before making a commit and push to your branch.

Adding a new DBMS

Please see the existing MySQL and PostgreSQL code for an example.

Java Development Notes

Code Style

To allow reviewers to focus more on code content and not style nits, PR #416 added support for auto formatting code at compile time according to Google Java Style using google-java-format and fmt-maven-plugin Maven plugins.

Be sure to commit and include these changes in your PRs when submitting them so that the CI pipeline passes.

Additionally, this formatting style is included in the VSCode settings files for this repo.

Compiler Warnings

In an effort to enforce clean, safe, maintainable code, PR #413 enabled the -Werror and -Xlint:all options for the javac compiler.

This means that any compiler warnings will cause the build to fail.

If you are seeing a build failure due to a compiler warning, please fix the warning or (on rare occassions) add an exception to the line causing the issue.

Avoid var keyword

In general, we prefer to avoid the var keyword in favor of explicit types.

Alternatives to arrays of generics

Per the Java Language Specification, arrays of generic types are not allowed and will cause compiler warnings (e.g., unchecked cast)

In some cases, you can extend a generic type to create a non-generic type that can be used in an array.

For instance,

// Simple generic class overload to avoid some cast warnings.
class SomeTypeList extends LinkedList<SomeType> {}

SomeTypeList[] someTypeLists = new SomeTypeList[] {
    new SomeTypeList(),
    new SomeTypeList(),
    new SomeTypeList(),
};

this-escape warnings

possible 'this' escape before subclass is fully initialized

The this-escape warning above is caused by passing using this.someOverridableMethod() in a constructor. This could in theory cause problems with a subclass not being fully initialized when the method is called.

Since many of our classes are not designed to be subclassed, we can safely ignore this warning by marking the class as final rather than completely rewrite the class initialization.