Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
cli:
- 'services/cli/**'
- 'lib/**'
- 'services/api/openapi.json'
docker:
- 'services/api/Dockerfile'
- 'services/console/Dockerfile'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ env:
CLI_BIN_NAME: bencher

jobs:
pr_noop:
name: CLI PR No-op
if: ${{ github.event_name == 'pull_request' && !inputs.check-cli && !inputs.build-cli }}
runs-on: ubuntu-22.04
steps:
- name: No-op
run: "true"

action_main:
name: Action `main`
if: github.ref == 'refs/heads/devel' || github.ref == 'refs/heads/cloud'
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ jobs:
docker load < ${{ env.API_DOCKER_IMAGE }}.tar.gz
docker tag ${{ env.API_DOCKER_IMAGE }} ${{ env.FLY_REGISTRY }}/bencher-api-dev
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Scale up Dev Machines
working-directory: ./services/api
run: flyctl scale vm performance-8x --app bencher-api-dev
- name: Deploy Local API to Fly.io
working-directory: ./services/api
run: flyctl deploy --local-only --config fly/fly.dev.toml --wait-timeout 300
Expand All @@ -68,18 +65,12 @@ jobs:
cache-key: cli
mold-version: ${{ inputs.mold-version }}
- name: Run Smoke Test
id: smoke-test
continue-on-error: true
env:
RUST_BACKTRACE: full
run: cargo test-api smoke dev
- name: Scale down Dev Machines
if: always()
working-directory: ./services/api
run: flyctl scale vm shared-cpu-1x --app bencher-api-dev
- name: Check Smoke Test Result
if: steps.smoke-test.outcome == 'failure'
run: exit 1
- name: Run OCI Conformance Test
continue-on-error: true
run: cargo test-api oci --admin

deploy_console_netlify_dev:
name: Deploy Console UI to Netlify Dev
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/track_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
--project bencher \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch ${{ github.ref_name }} \
--hash '${{ github.sha }}' \
--testbed ubuntu-22.04 \
--threshold-measure latency \
--threshold-test t_test \
Expand Down
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ cargo test-api seed # Seed the database with sample data
cd services/console && npm test # Run frontend tests (vitest)
```

Running the seed tests:

1. Stop the API server if it's running.
2. Delete the existing database at `services/api/data/bencher.db` if it exists.
3. Run the API server.
4. In another terminal:
- Bencher Cloud: `cargo test-api seed --is-bencher-cloud`
- Bencher Self-Hosted: `cargo test-api seed`

### Linting & Formatting

```bash
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ tokio-rustls = {version = "0.26", default-features = false, features = ["loggin
tokio-util = { version = "0.7", features = ["io"] }
typeshare = "1.0"
url = "2.5"
urlencoding = "2.1"
uuid = "1.19"
wasm-bindgen = "0.2"
wasm-bindgen-test = "0.3"
Expand Down
4 changes: 1 addition & 3 deletions lib/bencher_schema/src/context/rate_limiting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ impl RateLimiting {
}
},
(false, None) => {
// todo(epompeii): Add the ability to completely disable rate limiting for Bencher Self-Hosted
// Keeping this as `default()` instead of `max()` is a bit of a hack to make it easier to test rate limiting locally.
slog::info!(log, "No rate limits applied for Bencher Self-Hosted");
Self::default()
Self::max()
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions plus/api_oci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ plus = [
"dep:serde",
"dep:serde_json",
"dep:slog",
"dep:urlencoding",
]
sentry = []
otel = ["dep:bencher_otel"]
Expand All @@ -48,6 +49,7 @@ schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
slog = { workspace = true, optional = true }
urlencoding = { workspace = true, optional = true }

[dev-dependencies]
bencher_api_tests.workspace = true
Expand Down
Loading
Loading