Skip to content

Commit 2c97f42

Browse files
committed
v0
0 parents  commit 2c97f42

338 files changed

Lines changed: 68687 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bleep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b09897ca70e33ddb55974baea67384be7c95f4c2

.cargo/audit.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[advisories]
2+
ignore = [
3+
# This came from the prometheus crate's protobuf encoder.
4+
# We don't use the protobuf encoder, only the text one.
5+
# https://rustsec.org/advisories/RUSTSEC-2024-0437
6+
"RUSTSEC-2024-0437",
7+
]

.github/CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contributing
2+
3+
Welcome to Pingora! Before you make a contribution, be it a bug report, documentation improvement,
4+
pull request (PR), etc., please read and follow these guidelines.
5+
6+
## Start with filing an issue
7+
8+
More often than not, **start by filing an issue on GitHub**. If you have a bug report or feature
9+
request, open a GitHub issue. Non-trivial PRs will also require a GitHub issue. The issue provides
10+
us with a space to discuss proposed changes with you and the community.
11+
12+
Having a discussion via GitHub issue upfront is the best way to ensure your contribution lands in
13+
Pingora. We don't want you to spend your time making a PR, only to find that we won't accept it on
14+
a design basis. For example, we may find that your proposed feature works better as a third-party
15+
module built on top of or for use with Pingora and encourage you to pursue that direction instead.
16+
17+
**You do not need to file an issue for small fixes.** What counts as a "small" or trivial fix is a
18+
judgment call, so here's a few examples to clarify:
19+
- fixing a typo
20+
- refactoring a bit of code
21+
- most documentation or comment edits
22+
23+
Still, _sometimes_ we may review your PR and ask you to file an issue if we expect there are larger
24+
design decisions to be made.
25+
26+
## Making a PR
27+
28+
After you've filed an issue, you can make your PR referencing that issue number. Once you open your
29+
PR, it will be labelled _Needs Review_. A maintainer will review your PR as soon as they can. The
30+
reviewer may ask for changes - they will mark the PR as _Changes Requested_ and will give you
31+
details about the requested changes. Feel free to ask lots of questions! The maintainers are there
32+
to help you.
33+
34+
Once we (the maintainers) decide to accept your change, we will label your PR as _Accepted_.
35+
Later (usually within a week or two), we will rebase your commits onto the `main` branch in a
36+
separate PR, batched alongside other _Accepted_ commits and any internal changes. (This process
37+
allows us to sync the state of our internal repository with the public repository.) Once your
38+
change lands in `main`, we will close your PR.
39+
40+
### Caveats
41+
42+
Currently, internal contributions will take priority. Today Pingora is being maintained by
43+
Cloudflare's Content Delivery team, and internal Cloudflare proxy services are a primary user of
44+
Pingora. We value the community's work on Pingora, but the reality is that our team has a limited
45+
amount of resources and time. We can't promise we will review or address all PRs or issues in a
46+
timely manner.
47+
48+
## Conduct
49+
50+
Pingora and Cloudflare OpenSource generally follows the [Contributor Covenant Code of Conduct].
51+
Violating the CoC could result in a warning or a ban to Pingora or any and all repositories in the Cloudflare organization.
52+
53+
[Contributor Covenant Code of Conduct]: https://github.com/cloudflare/.github/blob/26b37ca2ba7ab3d91050ead9f2c0e30674d3b91e/CODE_OF_CONDUCT.md
54+
55+
## Contact
56+
57+
If you have any questions, please reach out to [opensource@cloudflare.com](mailto:opensource@cloudflare.com).
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug Report
3+
about: Report an issue to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Pingora info
14+
15+
Please include the following information about your environment:
16+
17+
**Pingora version**: release number of commit hash
18+
**Rust version**: i.e. `cargo --version`
19+
**Operating system version**: e.g. Ubuntu 22.04, Debian 12.4
20+
21+
## Steps to reproduce
22+
23+
Please provide step-by-step instructions to reproduce the issue. Include any relevant code
24+
snippets.
25+
26+
## Expected results
27+
28+
What were you expecting to happen?
29+
30+
## Observed results
31+
32+
What actually happened?
33+
34+
## Additional context
35+
36+
What other information would you like to provide? e.g. screenshots, how you're working around the
37+
issue, or other clues you think could be helpful to identify the root cause.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## What is the problem your feature solves, or the need it fulfills?
10+
11+
A clear and concise description of why this feature should be added. What is the problem? Who is
12+
this for?
13+
14+
## Describe the solution you'd like
15+
16+
What do you propose to resolve the problem or fulfill the need above? How would you like it to
17+
work?
18+
19+
## Describe alternatives you've considered
20+
21+
What other solutions, features, or workarounds have you considered that might also solve the issue?
22+
What are the tradeoffs for these alternatives compared to what you're proposing?
23+
24+
## Additional context
25+
26+
This could include references to documentation or papers, prior art, screenshots, or benchmark
27+
results.

.github/workflows/audit.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Security Audit
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- "**/Cargo.toml"
9+
schedule:
10+
- cron: "0 2 * * *" # run at 2 AM UTC
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
security-audit:
17+
permissions:
18+
checks: write # for rustsec/audit-check to create check
19+
contents: read # for actions/checkout to fetch code
20+
issues: write # for rustsec/audit-check to create issues
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Generate Cargo.lock
26+
# https://github.com/rustsec/audit-check/issues/27
27+
run: cargo generate-lockfile
28+
29+
- name: Audit Check
30+
# https://github.com/rustsec/audit-check/issues/2
31+
uses: rustsec/audit-check@master
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
on: [push, pull_request]
2+
3+
name: build
4+
5+
jobs:
6+
pingora:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
# nightly, msrv, and latest stable
11+
toolchain: [nightly, 1.82.0, 1.87.0]
12+
runs-on: ubuntu-latest
13+
# Only run on "pull_request" event for external PRs. This is to avoid
14+
# duplicate builds for PRs created from internal branches.
15+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: "recursive"
21+
22+
- name: Install build dependencies
23+
run: |
24+
sudo apt update
25+
sudo apt install -y cmake libclang-dev wget gnupg ca-certificates lsb-release --no-install-recommends
26+
# openresty is used for convenience in tests as a server.
27+
wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg
28+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null
29+
sudo apt update
30+
sudo apt install -y openresty --no-install-recommends
31+
32+
- name: Install toolchain
33+
uses: dtolnay/rust-toolchain@master
34+
with:
35+
toolchain: ${{ matrix.toolchain }}
36+
components: rustfmt, clippy
37+
38+
- name: Run cargo fmt
39+
run: cargo fmt --all -- --check
40+
41+
- name: Run cargo test
42+
run: cargo test --verbose --lib --bins --tests --no-fail-fast
43+
44+
# Need to run doc tests separately.
45+
# (https://github.com/rust-lang/cargo/issues/6669)
46+
- name: Run cargo doc test
47+
run: cargo test --verbose --doc
48+
49+
- name: Run cargo clippy
50+
run: |
51+
[[ ${{ matrix.toolchain }} != 1.87.0 ]] || cargo clippy --all-targets --all -- --allow=unknown-lints --deny=warnings
52+
53+
- name: Run cargo audit
54+
run: |
55+
[[ ${{ matrix.toolchain }} != 1.87.0 ]] || (cargo install cargo-audit && cargo audit)
56+
57+
- name: Run cargo machete
58+
run: |
59+
[[ ${{ matrix.toolchain }} != 1.87.0 ]] || (cargo install cargo-machete --version 0.7.0 && cargo machete)

.github/workflows/docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: Docs
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v4
14+
with:
15+
submodules: "recursive"
16+
17+
- name: Install build dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt install -y cmake libclang-dev
21+
22+
- name: Install stable toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
25+
- name: Run cargo doc
26+
run: cargo doc --no-deps --all-features

.github/workflows/mark-stale.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Close stale questions'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
workflow_dispatch:
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v9
16+
with:
17+
stale-issue-message: 'This question has been stale for a week. It will be closed in an additional day if not updated.'
18+
close-issue-message: 'This issue has been closed because it has been stalled with no activity.'
19+
days-before-stale: -1
20+
days-before-issue-stale: 7
21+
days-before-issue-close: 1
22+
stale-issue-label: 'stale'
23+
only-issue-labels: 'question'

.github/workflows/semgrep.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
pull_request: {}
3+
workflow_dispatch: {}
4+
push:
5+
branches:
6+
- main
7+
- master
8+
schedule:
9+
- cron: '0 0 * * *'
10+
name: Semgrep config
11+
jobs:
12+
semgrep:
13+
name: semgrep/ci
14+
runs-on: ubuntu-latest
15+
env:
16+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
17+
SEMGREP_URL: https://cloudflare.semgrep.dev
18+
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
19+
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
20+
container:
21+
image: returntocorp/semgrep
22+
steps:
23+
- uses: actions/checkout@v4
24+
- run: semgrep ci

0 commit comments

Comments
 (0)