chore: add github templates

pull/24376/head
Edd Robinson 2020-11-23 17:21:28 +00:00
parent 05870a9d5c
commit 736f1c4b03
4 changed files with 126 additions and 45 deletions

46
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve
---
<!--
Thank you for reporting a bug in InfluxDB IOx.
* Please ask usage questions in the Influx Slack (there is an #influxdb-iox channel).
* https://influxdata.com/slack
* Please don't open duplicate issues; use the search. If there is an existing issue do not add "+1" or "me too" comments. Only add comments with new information.
* Please check whether the bug can be reproduced with tip of main.
* The fastest way to fix a bug is to open a Pull Request.
* https://github.com/influxdata/influxdb/pulls
-->
__Steps to reproduce:__
List the minimal actions needed to reproduce the behaviour.
1. ...
2. ...
3. ...
__Expected behaviour:__
Describe what you expected to happen.
__Actual behaviour:__
Describe What actually happened.
__Environment info:__
`
* Please provide the command you used to build the project, including any `RUSTFLAGS`.
* System info: Run `uname -srm` or similar and copy the output here (we want to know your OS, architecture etc).
* If you're running IOx in a containerised environment then details about that would be helpful.
* Other relevant environment details: disk info, hardware setup etc.
__Config:__
Copy any non-default config values here or attach the full config as a gist or file.
<!-- The following sections are only required if relevant. -->
__Logs:__
Include snippet of errors in logs or stack traces here.
Sometimes you can get useful information by running the program with the `RUST_BACKTRACE=full` environment variable.

View File

@ -0,0 +1,29 @@
---
name: Feature request
about: Opening a feature request kicks off a discussion
---
<!--
Thank you for suggesting an idea to improve InfluxDB IOx.
* Please ask usage questions in the Influx Slack (there is an #influxdb-iox channel).
* https://influxdata.com/slack
* If the feature you're interested in already has an open *or* closed ticket associated with it (please search) please don't add "+1" or "me too" comments. The Github reaction emojis are a way to indicate your support for something and will contribute to prioritisation.
-->
__Proposal:__
Short summary of the feature.
__Current behaviour:__
Describe what currently happens.
__Desired behaviour:__
Describe what you want.
__Alternatives considered:__
Describe other solutions or features you considered.
__Use case:__
Why is this important (helps with prioritizing requests)?

5
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,5 @@
Closes #
Describe your proposed changes here.
- [ ] Signed [CLA](https://influxdata.com/community/cla/) (if not already signed)

View File

@ -36,14 +36,14 @@ compiler.
Using `git`, check out the code by cloning this repository. If you use the `git` command line, this
looks like:
```
$ git clone git@github.com:influxdata/influxdb_iox.git
```shell
git clone git@github.com:influxdata/influxdb_iox.git
```
Then change into the directory containing the code:
```
$ cd influxdb_iox
```shell
cd influxdb_iox
```
The rest of the instructions assume you are in this directory.
@ -61,8 +61,8 @@ exact nightly version is specified in the `rust-toolchain` file. When you're in
containing this repository's code, `rustup` will look in the `rust-toolchain` file and
automatically install and use the correct Rust version for you. Test this out with:
```
$ rustc --version
```shell
rustc --version
```
and you should see a nightly version of Rust!
@ -74,15 +74,15 @@ compiler] reads the schema in `generated_types/wal.fbs` and generates the corres
Install `flatc` >= 1.12.0 with one of these methods as appropriate to your operating system:
- Using a [Windows binary release]
- Using the [`flatbuffers` package for conda]
- Using the [`flatbuffers` package for Arch Linux]
- Using the [`flatbuffers` package for Homebrew]
* Using a [Windows binary release]
* Using the [`flatbuffers` package for conda]
* Using the [`flatbuffers` package for Arch Linux]
* Using the [`flatbuffers` package for Homebrew]
Once you have installed the packages, you should be able to run:
```
$ flatc --version
```shell
flatc --version
```
and see the version displayed.
@ -103,7 +103,7 @@ compilation process by calling `flatc` for you.
specifying values for environment variables in a `.env` file. To get an example file to start from,
run:
```
```shell
cp docs/env.example .env
```
@ -114,7 +114,7 @@ For development purposes, the most relevant environment variables are the `INFLU
values are shown in the comments in the example file; to change them, uncomment the relevant lines
and change the values to the directories in which you'd like to store the files instead:
```
```shell
INFLUXDB_IOX_DB_DIR=/some/place/else
TEST_INFLUXDB_IOX_DB_DIR=/another/place
```
@ -125,38 +125,38 @@ InfluxDB IOx is built using Cargo, Rust's package manager and build tool.
To compile for development, run:
```
$ cargo build
```shell
cargo build
```
which will create a binary in `target/debug` that you can run with:
```
$ ./target/debug/influxdb_iox
```shell
./target/debug/influxdb_iox
```
You can compile and run with one command by using:
```
$ cargo run
```shell
cargo run
```
When compiling for performance testing, build in release mode by using:
```
$ cargo build --release
```shell
cargo build --release
```
which will create the corresponding binary in `target/release`:
```
$ ./target/release/influxdb_iox
```shell
./target/release/influxdb_iox
```
Similarly, you can do this in one step with:
```
$ cargo run --release
```shell
cargo run --release
```
The server will, by default, start an HTTP API server on port `8080` and a gRPC server on port
@ -170,7 +170,7 @@ the organization name `company` and the bucket name `sensors` that will send the
`tests/fixtures/lineproto/metrics.lp` file in this repository, assuming that you're running the
server on the default port:
```
```shell
curl -v "http://127.0.0.1:8080/api/v2/write?org=company&bucket=sensors" --data-binary @tests/fixtures/lineproto/metrics.lp
```
@ -180,7 +180,7 @@ curl -v "http://127.0.0.1:8080/api/v2/write?org=company&bucket=sensors" --data-b
To query stored data, use the `/api/v2/read` endpoint with a SQL query. This example will return
all data in the `company` organization's `sensors` bucket for the `processes` measurement:
```
```shell
curl -v -G -d 'org=company' -d 'bucket=sensors' --data-urlencode 'sql_query=select * from processes' "http://127.0.0.1:8080/api/v2/read"
```
@ -217,6 +217,7 @@ For features we don't plan to support we will close the feature request ticket (
[issue]: https://github.com/influxdata/influxdb_iox/issues/new
[New Issue]: https://github.com/influxdata/influxdb_iox/issues/new
[How to Report Bugs Effectively]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
### Contributing Changes
InfluxDB IOx is written mostly in idiomatic Rust—please see the [Style Guide] for more details.
@ -277,8 +278,8 @@ There are some tips on verifying the above in the [next section](#running-tests)
The `cargo` build tool runs tests as well. Run:
```
$ cargo test --workspace
```shell
cargo test --workspace
```
### Running `rustfmt` and `clippy`
@ -287,26 +288,26 @@ CI will check the code formatting with [`rustfmt`] and Rust best practices with
To automatically format your code according to `rustfmt` style, first make sure `rustfmt` is installed using `rustup`:
```
$ rustup component add rustfmt
```shell
rustup component add rustfmt
```
Then, whenever you make a change and want to reformat, run:
```
$ cargo fmt --all
```shell
cargo fmt --all
```
Similarly with `clippy`, install with:
```
$ rustup component add clippy
```shell
rustup component add clippy
```
And run with:
```
$ cargo clippy --all-targets --workspace
```shell
cargo clippy --all-targets --workspace
```
[`rustfmt`]: https://github.com/rust-lang/rustfmt