-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
247 additions
and
0 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,51 @@ | ||
# Contributing | ||
|
||
Welcome to Pingora! Before you make a contribution, be it a bug report, documentation improvement, | ||
pull request (PR), etc., please read and follow these guidelines. | ||
|
||
## Start with filing an issue | ||
|
||
More often than not, **start by filing an issue on GitHub**. If you have a bug report or feature | ||
request, open a GitHub issue. Non-trivial PRs will also require a GitHub issue. The issue provides | ||
us with a space to discuss proposed changes with you and the community. | ||
|
||
Having a discussion via GitHub issue upfront is the best way to ensure your contribution lands in | ||
Pingora. We don't want you to spend your time making a PR, only to find that we won't accept it on | ||
a design basis. For example, we may find that your proposed feature works better as a third-party | ||
module built on top of or for use with Pingora and encourage you to pursue that direction instead. | ||
|
||
**You do not need to file an issue for small fixes.** What counts as a "small" or trivial fix is a | ||
judgment call, so here's a few examples to clarify: | ||
- fixing a typo | ||
- refactoring a bit of code | ||
- most documentation or comment edits | ||
|
||
Still, _sometimes_ we may review your PR and ask you to file an issue if we expect there are larger | ||
design decisions to be made. | ||
|
||
## Making a PR | ||
|
||
After you've filed an issue, you can make your PR referencing that issue number. Once you open your | ||
PR, it will be labelled _needs review_. A maintainer will review your PR as soon as they can. The | ||
reviewer may ask for changes - they will mark the PR as _changes requested_ and _work in progress_ | ||
and will give you details about the requested changes. Feel free to ask lots of questions! The | ||
maintainers are there to help you. | ||
|
||
### Caveats | ||
|
||
Currently, internal contributions will take priority. Today Pingora is being maintained by | ||
Cloudflare's Content Delivery team, and internal Cloudflare proxy services are a primary user of | ||
Pingora. We value the community's work on Pingora, but the reality is that our team has a limited | ||
amount of resources and time. We can't promise we will review or address all PRs or issues in a | ||
timely manner. | ||
|
||
## Conduct | ||
|
||
Pingora and Cloudflare OpenSource generally follows the [Contributor Covenant Code of Conduct]. | ||
Violating the CoC could result in a warning or a ban to Pingora or any and all repositories in the Cloudflare organization. | ||
|
||
[Contributor Covenant Code of Conduct]: https://github.com/cloudflare/.github/blob/26b37ca2ba7ab3d91050ead9f2c0e30674d3b91e/CODE_OF_CONDUCT.md | ||
|
||
## Contact | ||
|
||
If you have any questions, please reach out to [[email protected]](mailto:[email protected]). |
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,37 @@ | ||
--- | ||
name: Bug Report | ||
about: Report an issue to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
## Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
## Pingora info | ||
|
||
Please include the following information about your environment: | ||
|
||
**Pingora version**: release number of commit hash | ||
**Rust version**: i.e. `cargo --version` | ||
**Operating system version**: e.g. Ubuntu 22.04, Debian 12.4 | ||
|
||
## Steps to reproduce | ||
|
||
Please provide step-by-step instructions to reproduce the issue. Include any relevant code | ||
snippets. | ||
|
||
## Expected results | ||
|
||
What were you expecting to happen? | ||
|
||
## Observed results | ||
|
||
What actually happened? | ||
|
||
## Additional context | ||
|
||
What other information would you like to provide? e.g. screenshots, how you're working around the | ||
issue, or other clues you think could be helpful to identify the root cause. |
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,27 @@ | ||
--- | ||
name: Feature request | ||
about: Propose a new feature | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
## What is the problem your feature solves, or the need it fulfills? | ||
|
||
A clear and concise description of why this feature should be added. What is the problem? Who is | ||
this for? | ||
|
||
## Describe the solution you'd like | ||
|
||
What do you propose to resolve the problem or fulfill the need above? How would you like it to | ||
work? | ||
|
||
## Describe alternatives you've considered | ||
|
||
What other solutions, features, or workarounds have you considered that might also solve the issue? | ||
What are the tradeoffs for these alternatives compared to what you're proposing? | ||
|
||
## Additional context | ||
|
||
This could include references to documentation or papers, prior art, screenshots, or benchmark | ||
results. |
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "13:00" | ||
open-pull-requests-limit: 10 |
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,27 @@ | ||
name: "Audit Dependencies" | ||
on: | ||
push: | ||
paths: | ||
# Run if workflow changes | ||
- '.github/workflows/audit.yml' | ||
# Run on changed dependencies | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
# Run if the configuration file changes | ||
- '**/audit.toml' | ||
# Rerun periodicly to pick up new advisories | ||
schedule: | ||
- cron: '0 0 * * *' | ||
# Run manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/audit@v1 | ||
name: Audit Rust Dependencies |
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,34 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: Docs | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y cmake libclang-dev | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
default: true | ||
|
||
- name: Run cargo doc | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --no-deps --all-features |
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,63 @@ | ||
on: [push, pull_request] | ||
|
||
name: Stable | ||
|
||
jobs: | ||
pingora: | ||
runs-on: ubuntu-latest | ||
# Only run on "pull_request" event for external PRs. This is to avoid | ||
# duplicate builds for PRs created from internal branches. | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y cmake libclang-dev | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: rustfmt, clippy, | ||
override: true | ||
default: true | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check | ||
|
||
- name: Run cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --verbose --lib --bins --tests --no-fail-fast | ||
|
||
# Need to run doc tests separately. | ||
# (https://github.com/rust-lang/cargo/issues/6669) | ||
- name: Run cargo doc test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --verbose --doc | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --all-targets --all -- --deny=warnings | ||
|
||
- name: Run cargo audit | ||
uses: actions-rust-lang/audit@v1 | ||
|
||
- name: Run cargo doc | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --no-deps --all-features --document-private-items |