The Trino project succeeds with your help and contributions. Find details on how to contribute, how maintainers assist, and more related information in the following sections:
This is the process we suggest for contributions. This process is designed to reduce the burden on project reviewers, impact on other contributors, and to keep the amount of rework from the contributor to a minimum.
Sign the contributor license agreement, and proceed with the next steps while the CLA is processed.
Start a discussion by creating a GitHub issue, or asking on Slack (unless the change is trivial, for example a spelling fix in the documentation).
Implement the change
[WIP]
, and share with collaborators.Create a GitHub pull request (PR).
[WIP]
or draft PR, change it to ready for review.There are some tests that use external services, like Google BigQuery, and require additional credentials. The Trino project cannot share these credentials with contributors, so it runs these tests in its CI workflows only on branches in the Trino repository, not in contributor forks. Maintainers trigger these test runs for other pull requests as part of their review.
Review is performed by one or more reviewers.
Address concerns and update the pull request.
fixup!
commit
placed after each commit. This is to make it easier for the reviewer to
see what was updated.Maintainer merges the pull request after final changes are accepted.
Maintainers organize a release to ship the next Trino version with your improvements.
Contributions to Trino projects are managed as collaboration with pull requests.
Pull requests are usually merged into master
or main
using the rebase and
merge
strategy to preserve the commits from the contributor and avoid adding empty
merge commits.
Reviews allow feedback from one or more maintainer and other community members, all helping the project as volunteers in addition to their own contributions. It is important to make these reviews as fast and efficient as possible, while at the same time enabling feedback and discussion about the technical approach and relevant details. Reviews are time consuming and it is in the best interest for the contributor to keep reviews as simple as possible. The following guidelines are designed to help contributors.
A typical pull request should strive to contain a single logical change, but not necessarily a single commit. Unrelated changes should generally be extracted into their own PRs.
If a pull request contains a stack of commits, then popping any number of commits from the top of the stack, should not break the PR, meaning that every commit should build and pass all tests.
Commit messages and history are important as well, because they are used by other developers to keep track of the motivation behind changes. Keep logical changes together and order commits in a way that explains the evolution of the change by itself. Rewriting and reordering commits is a natural part of the review process.
Mechanical changes like refactoring, renaming, removing duplication, extracting helper methods, static imports should be kept separated from logical and functional changes and also be broken up into separate commits. This makes reviewing the code much easier and reduces the chance of introducing unintended changes in behavior.
Whenever in doubt on splitting a change into a separate commit, ask yourself the following question: if all other work in the PR needs to be reverted after merging to master for some objective reason, such as a bug has been discovered, is it worth keeping that commit still in master.
When writing a commit message, follow the seven rules of a great commit message:
Read the full commit message guide for more details and examples.
The rapid evolution of the project and therefore the content of the default branch also means that contributors must rebase their pull request branch regularly and ensure no conflicts prevent merging.
Release notes should communicate the user-facing aspects of all change with a specific version. As a results internal refactoring or improvements, such as build fixes or new tests, are not included. New features, new configuration, performance changes, bug fixes and other aspects relevant for users and administrators must be included.
Release note entries should be suggested by the contributor. Correct content and wording is part of the pull request review and merge process. If necessary the contributor and merging maintainer can work with the maintainer assembling the release notes PR.
Some release notes are broken up into separate section for different components. For example, Trino release are ordered following the template
In each section different release notes entries are sorted:
Add
or Add support for
or similar wordingImprove
or Improve performance
or similar wordingFix
or Prevent
or similar wordingUse imperative present tense, as used in a command or
request to describe the change.
For example, use Add
or Fix
or Improve
, not Added
or Fixed
or
Improved
.
When a change adds configuration, include the configuration details after the description of the functionality. Detail the property names and their types. Consider linking to new documentation.
View older release notes for example and strive for consistency with other release notes and release notes entries.
Link to specific sections in the documentation to avoid overly long entries, especially if more information is needed.
Release notes entries that prevent application start up with old configuration or otherwise change application behavior significantly must be marked as breaking changes.
The specific syntax for the release notes, breaking changes, links and other aspects, is dependent on the used documentation system for each project. For example, Trino uses markdown files with Sphinx, while Trino Gateway uses markdown files with mkdocs. Other projects use plain markdown files in the repository without a documentation system.
Follow the guidelines for the documentation system in terms of formatting code, links, or keywords. Details are typically available in a README file or as part of the documentation itself.
Release notes should also follow the documentation style guide used for all Trino documentation - the Google developer documentation style guide.
Maintainers support the contributions from the community and other maintainers by participating in the contribution process. The following additional processes and steps apply for their work.
The following aspects apply for reviewing pull requests.
Maintainers can schedule additional workflow runs with tests that use external services when reviewing a PR by adding a comment:
/test-with-secrets sha=<all-40-characters>
The SHA value should be the full 40 character git SHA of a commit of the feature branch, usually the head commit. This allows runs with the full test suite, including third party integrations and infrastructure for branches that are not in the core repository. Maintainers must review the pull request to understand and assess the security implications of running the test suite on the external service and ensure that no malicious code is run.
The following criteria and aspects apply for merging pull requests.
Reviews and assistance for the contributor on a pull request can proceed as soon as a PR is filed and set as ready for review. A signed CLA is required for merging a PR. Submitted CLAs are managed by the BDFLs.
Maintainers can trigger a CLA verification on a PR by adding a comment with the
command @cla-bot check
.