-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into issue-1774
- Loading branch information
Showing
101 changed files
with
2,736 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you 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. | ||
|
||
notifications: | ||
commits: [email protected] | ||
issues: [email protected] | ||
pullrequests: [email protected] | ||
|
||
github: | ||
description: "GoCQL Driver for Apache Cassandra®" | ||
homepage: https://cassandra.apache.org/ | ||
enabled_merge_buttons: | ||
squash: false | ||
merge: false | ||
rebase: true | ||
features: | ||
wiki: false | ||
issues: true | ||
projects: false | ||
|
||
notifications: | ||
jira_options: link worklog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,62 @@ | ||
# Contributing to gocql | ||
# Contributing to the Apache Cassandra GoCQL Driver | ||
|
||
**TL;DR** - this manifesto sets out the bare minimum requirements for submitting a patch to gocql. | ||
|
||
This guide outlines the process of landing patches in gocql and the general approach to maintaining the code base. | ||
|
||
## Background | ||
|
||
The goal of the gocql project is to provide a stable and robust CQL driver for Go. gocql is a community driven project that is coordinated by a small team of core developers. | ||
The goal of the gocql project is to provide a stable and robust CQL driver for Go. This is a community driven project that is coordinated by a small team of developers in and around the Apache Cassandra project. For security, governance and administration issues please refer to the Cassandra Project Management Committee. | ||
|
||
## Minimum Requirement Checklist | ||
|
||
The following is a check list of requirements that need to be satisfied in order for us to merge your patch: | ||
|
||
* You should raise a pull request to gocql/gocql on Github | ||
* You should raise a pull request to apache/cassandra-gocql-driver on Github | ||
* The pull request has a title that clearly summarizes the purpose of the patch | ||
* The motivation behind the patch is clearly defined in the pull request summary | ||
* Your name and email have been added to the `AUTHORS` file (for copyright purposes) | ||
* You agree that your contribution is donated to the Apache Software Foundation (appropriate copyright is on all new files) | ||
* The patch will merge cleanly | ||
* The test coverage does not fall below the critical threshold (currently 64%) | ||
* The merge commit passes the regression test suite on Travis | ||
* The test coverage does not fall | ||
* The merge commit passes the regression test suite on GitHub Actions | ||
* `go fmt` has been applied to the submitted code | ||
* Notable changes (i.e. new features or changed behavior, bugfixes) are appropriately documented in CHANGELOG.md, functional changes also in godoc | ||
* A correctly formatted commit message, see below | ||
|
||
If there are any requirements that can't be reasonably satisfied, please state this either on the pull request or as part of discussion on the mailing list. Where appropriate, the core team may apply discretion and make an exception to these requirements. | ||
|
||
## Commit Message | ||
|
||
The Apache Cassandra project has a commit message precendence like | ||
``` | ||
<One sentence description, usually Jira title or CHANGES.txt summary> | ||
patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-##### | ||
``` | ||
|
||
The 'patch by …; reviewed by' line is important. It permits our review-than-commit procedure, allowing commits from non-git-branch patches. It is also parsed to build the project contribulyse statistics found [here](https://nightlies.apache.org/cassandra/devbranch/misc/contribulyze/html/). | ||
|
||
|
||
Background: https://cassandra.apache.org/_/development/how_to_commit.html#tips | ||
|
||
## Beyond The Checklist | ||
|
||
In addition to stating the hard requirements, there are a bunch of things that we consider when assessing changes to the library. These soft requirements are helpful pointers of how to get a patch landed quicker and with less fuss. | ||
|
||
### General QA Approach | ||
|
||
The gocql team needs to consider the ongoing maintainability of the library at all times. Patches that look like they will introduce maintenance issues for the team will not be accepted. | ||
The Cassandra project needs to consider the ongoing maintainability of the library at all times. Patches that look like they will introduce maintenance issues for the team will not be accepted. | ||
|
||
Your patch will get merged quicker if you have decent test cases that provide test coverage for the new behavior you wish to introduce. | ||
|
||
Unit tests are good, integration tests are even better. An example of a unit test is `marshal_test.go` - this tests the serialization code in isolation. `cassandra_test.go` is an integration test suite that is executed against every version of Cassandra that gocql supports as part of the CI process on Travis. | ||
|
||
That said, the point of writing tests is to provide a safety net to catch regressions, so there is no need to go overboard with tests. Remember that the more tests you write, the more code we will have to maintain. So there's a balance to strike there. | ||
|
||
### When It's Too Difficult To Automate Testing | ||
|
||
There are legitimate examples of where it is infeasible to write a regression test for a change. Never fear, we will still consider the patch and quite possibly accept the change without a test. The gocql team takes a pragmatic approach to testing. At the end of the day, you could be addressing an issue that is too difficult to reproduce in a test suite, but still occurs in a real production app. In this case, your production app is the test case, and we will have to trust that your change is good. | ||
|
||
Examples of pull requests that have been accepted without tests include: | ||
|
||
* https://github.com/gocql/gocql/pull/181 - this patch would otherwise require a multi-node cluster to be booted as part of the CI build | ||
* https://github.com/gocql/gocql/pull/179 - this bug can only be reproduced under heavy load in certain circumstances | ||
|
||
### Sign Off Procedure | ||
|
||
Generally speaking, a pull request can get merged by any one of the core gocql team. If your change is minor, chances are that one team member will just go ahead and merge it there and then. As stated earlier, suitable test coverage will increase the likelihood that a single reviewer will assess and merge your change. If your change has no test coverage, or looks like it may have wider implications for the health and stability of the library, the reviewer may elect to refer the change to another team member to achieve consensus before proceeding. Therefore, the tighter and cleaner your patch is, the quicker it will go through the review process. | ||
Generally speaking, a pull request can get merged by any one of the project's committers. If your change is minor, chances are that one team member will just go ahead and merge it there and then. As stated earlier, suitable test coverage will increase the likelihood that a single reviewer will assess and merge your change. If your change has no test coverage, or looks like it may have wider implications for the health and stability of the library, the reviewer may elect to refer the change to another team member to achieve consensus before proceeding. Therefore, the tighter and cleaner your patch is, the quicker it will go through the review process. | ||
|
||
### Supported Features | ||
|
||
gocql is a low level wire driver for Cassandra CQL. By and large, we would like to keep the functional scope of the library as narrow as possible. We think that gocql should be tight and focused, and we will be naturally skeptical of things that could just as easily be implemented in a higher layer. Inevitably you will come across something that could be implemented in a higher layer, save for a minor change to the core API. In this instance, please strike up a conversation with the gocql team. Chances are we will understand what you are trying to achieve and will try to accommodate this in a maintainable way. | ||
|
||
### Longer Term Evolution | ||
|
||
There are some long term plans for gocql that have to be taken into account when assessing changes. That said, gocql is ultimately a community driven project and we don't have a massive development budget, so sometimes the long term view might need to be de-prioritized ahead of short term changes. | ||
|
||
## Officially Supported Server Versions | ||
|
||
Currently, the officially supported versions of the Cassandra server include: | ||
|
||
* 1.2.18 | ||
* 2.0.9 | ||
|
||
Chances are that gocql will work with many other versions. If you would like us to support a particular version of Cassandra, please start a conversation about what version you'd like us to consider. We are more likely to accept a new version if you help out by extending the regression suite to cover the new version to be supported. | ||
|
||
## The Core Dev Team | ||
|
||
The core development team includes: | ||
|
||
* tux21b | ||
* phillipCouto | ||
* Zariel | ||
* 0x6e6562 | ||
gocql is a low level wire driver for Cassandra CQL. By and large, we would like to keep the functional scope of the library as narrow as possible. We think that gocql should be tight and focused, and we will be naturally skeptical of things that could just as easily be implemented in a higher layer. Inevitably you will come across something that could be implemented in a higher layer, save for a minor change to the core API. In this instance, please strike up a conversation in the Cassandra community. Chances are we will understand what you are trying to achieve and will try to accommodate this in a maintainable way. |
Oops, something went wrong.