Skip to content

Latest commit

 

History

History
130 lines (86 loc) · 10.3 KB

CONTRIBUTING.md

File metadata and controls

130 lines (86 loc) · 10.3 KB

Table of contents

Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature 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, suggest features, or documentation improvements.

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.

Contributing via Pull Requests

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. You are working on a fork. Fork the repository.
  2. You are working against the latest source on the main branch.
  3. You've checked existing open, and recently merged pull requests to make sure someone else hasn't addressed the problem already.
  4. You've opened an issue before you begin any implementation. We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Dev setup

We recommend using IntelliJ IDEA from JetBrains. A community version is available and largely enough for our purpose.

Code Formatting

We strongly recommend installing the CheckStyle-IDEA plugin and apply the provided checkstyle.xml in order to comply with our formatting rules:

  1. Install the CheckStyle-IDEA plugin and restart IntelliJ.

  2. After installing the plugin, open the preferences (⌘, on macOS, or Ctrl+Alt+S on Windows/Linux) and search for Code Style. Click on the gear icon near the scheme and import checkstyle configuration. Click on "Apply" and "OK".

  3. Select the code you've created (module, package, class) and reformat code: ⌘⌥L (macOS), or Ctrl+Alt+L (Windows/Linux).

  4. Apply the reformat, optimize imports, rearrange and cleanup to your code and only to java files:

License headers

All the java files should contain the licence/copyright header. You can copy paste it from the license-header file.

Creating the pull request

To send us a pull request, please follow these steps:

  1. Create a new branch to focus on the specific change you are contributing e.g. improv/logger-debug-sampling
  2. Run all tests, and code baseline checks: mvn clean verify -P build-with-spotbugs
  3. Commit to your fork using clear commit messages.
  4. Send us a pull request with a conventional semantic title, and answering any default questions in the pull request interface.
  5. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on forking a repository and creating a pull request.

Local documentation

If you work on the documentation, you may find useful to display it locally while editing, using the following command:

  • Docs website: make docs-local-docker

Conventions

General terminology and practices

Category Convention
Style guide We use Checkstyle and Sonar to enforce beyond good practices.
Exceptions Specific exceptions live within the utilities themselves and use Exception suffix e.g. IdempotencyKeyException.
Git commits We follow conventional commits. We do not enforce conventional commits on contributors to lower the entry bar. Instead, we enforce a conventional PR title so our label automation and changelog are generated correctly.
API documentation API reference docs are generated from Javadoc which should have examples to allow developers to have what they need within their own IDE. Documentation website covers the wider usage, tips, and strive to be concise.
Documentation We treat it like a product. We sub-divide content aimed at getting started (80% of customers) vs advanced usage (20%). We also ensure customers know how to unit test their code when using our features.

Testing definition

We group tests in different categories

Test When to write Notes Speed
Unit tests Verify the smallest possible unit works. Networking access is prohibited. Prefer Functional tests given our complexity. Lightning fast (nsec to ms)
End-to-end tests Gain confidence that a Lambda function with our code operates as expected. It simulates how customers configure, deploy, and run their Lambda function - Event Source configuration, IAM permissions, etc. Slow (minutes)

NOTE: Unit tests are mandatory. End-to-end tests should be created for new modules. We apply the principle of the test pyramid, having a majority of unit tests to cover most cases (standard, edge, errors, ...) and generally one end-to-end test to verify the standard case in the target environment.

Finding contributions to work on

Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/help wanted/invalid/question/documentation), looking at any 'good first issue' issues is a great place to start.

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 [email protected] 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.

Troubleshooting

Licensing

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

We may ask you to sign a Contributor License Agreement (CLA) for larger changes.