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
2 changes: 1 addition & 1 deletion .github/workflows/agent_build_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
jobs:
build:
name: Build Agent
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apply-issue-labels-to-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
label_on_pr:
if: github.event.pull_request.draft == false
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
permissions:
contents: none
issues: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/autofix.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
jobs:
autofix:
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
lint_docs:
name: Docs
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint main docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
jobs:
build:
name: Build
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run containers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_quotas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
quota-check:
environment: operations
name: Check quota usage
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ jobs:
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
mintlify_deployment:
runs-on: ubuntu-latest
needs:
- api_production_deployment
runs-on: blacksmith-4vcpu-ubuntu-2404
name: Deploy docs
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
jobs:
deploy_trigger:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node (minimal for pnpx)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ghcr_retention_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
clean:
environment: operations
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
name: Delete old test images
steps:
- uses: snok/container-retention-policy@v3.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_build_agent_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
jobs:
build:
name: Build Agent
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_deploy_api_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
deploy:
environment: Canary
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/job_deploy_api_enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ on:
description: "Cloudflare API Token"
jobs:
deploy:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
environment: Enterprise
strategy:
fail-fast: true
matrix:
workers: [{name: "enterprise-default", domain: "enterprise.unkey.dev"}, {name: "enterprise-fireworks", domain: "fireworks.unkey.dev"}]
workers:
[
{ name: "enterprise-default", domain: "enterprise.unkey.dev" },
{ name: "enterprise-fireworks", domain: "fireworks.unkey.dev" },
]
name: Deploy ${{ matrix.workers.domain }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_deploy_api_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
contents: read
deployments: write
environment: Production
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_deploy_api_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
deploy:
environment: Preview
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_deploy_logdrain_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
contents: read
deployments: write
environment: Production
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_deploy_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
deploy:
environment: Production
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_detect_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ permissions:
jobs:
build:
name: Detect Changes
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
outputs:
api: ${{ steps.changes.outputs.api }}
dashboard: ${{ steps.changes.outputs.dashboard }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_test_api_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
environment: Canary
name: API Test Canary
timeout-minutes: 60
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/job_test_api_local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ permissions:
jobs:
test:
name: API Test Local
timeout-minutes: 60
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 25
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Run containers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_test_api_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: API Test Staging
environment: Preview
timeout-minutes: 60
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/job_test_go_api_local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ permissions:
jobs:
tests:
name: Test
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 15
runs-on: blacksmith-16vcpu-ubuntu-2404
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- name: Setup Go
Expand All @@ -18,6 +18,8 @@ jobs:
run: |
go install github.com/mfridman/tparse@v0.14.0
working-directory: go
- name: Set up Docker Buildx
uses: useblacksmith/setup-docker-builder@v1
- name: Test
run: make test-full
working-directory: go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_test_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
jobs:
test:
name: Test
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
concurrency: release
jobs:
goreleaser:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -20,7 +20,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
install: 'false'
install: "false"
- name: Setup Go
uses: ./.github/actions/setup-go
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/runbook-freshness-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ permissions:
on:
schedule:
# Run daily at 9 AM UTC
- cron: '0 9 * * *'
- cron: "0 9 * * *"
workflow_dispatch: # Allow manual trigger
jobs:
check-runbook-freshness:
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
# Security: Set timeout to prevent runaway workflows
timeout-minutes: 10
# Security: Restrict environment access
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
validate-pr:
name: PR title
if: github.event.pull_request.draft == false
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
Expand Down
37 changes: 14 additions & 23 deletions deployment/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ services:

planetscale:
container_name: planetscale
build:
context: https://github.com/mattrobenolt/ps-http-sim.git
target: local
image: ghcr.io/mattrobenolt/ps-http-sim:v0.0.12
command:
[
"-listen-port=3900",
Expand Down Expand Up @@ -118,25 +116,6 @@ services:
VAULT_MASTER_KEYS: "Ch9rZWtfMmdqMFBJdVhac1NSa0ZhNE5mOWlLSnBHenFPENTt7an5MRogENt9Si6wms4pQ2XIvqNSIgNpaBenJmXgcInhu6Nfv2U="
CLICKHOUSE_URL: "clickhouse://default:password@clickhouse:9000"

chproxy:
container_name: chproxy
build:
context: ../apps/chproxy
dockerfile: Dockerfile
deploy:
resources:
limits:
cpus: "1"
memory: 1024M
depends_on:
- clickhouse
environment:
PORT: 7123
CLICKHOUSE_URL: http://default:password@clickhouse:8123
BASIC_AUTH: proxy:password
ports:
- "7123:7123"

clickhouse:
image: bitnami/clickhouse:latest
container_name: clickhouse
Expand All @@ -149,7 +128,19 @@ services:
volumes:
- clickhouse:/bitnami/clickhouse
healthcheck:
test: ["CMD", "clickhouse-client", "--host", "localhost", "--user", "default", "--password", "password", "--query", "SELECT 1"]
test:
[
"CMD",
"clickhouse-client",
"--host",
"localhost",
"--user",
"default",
"--password",
"password",
"--query",
"SELECT 1",
]
timeout: 10s
retries: 10
start_period: 30s
Expand Down
4 changes: 2 additions & 2 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pull:
@docker compose -f ../deployment/docker-compose.yaml pull

up:
@docker compose -f ../deployment/docker-compose.yaml up --force-recreate -d mysql redis clickhouse s3 otel
@docker compose -f ../deployment/docker-compose.yaml up --force-recreate -d mysql planetscale redis clickhouse s3 otel
@echo "Starting ClickHouse migrations (will retry if ClickHouse isn't ready)..."
@for i in {1..10}; do \
echo "Migration attempt $$i..."; \
Expand All @@ -43,7 +43,7 @@ down:
test-full: export INTEGRATION_TEST=true
test-full: export SIMULATION_TEST=false
test-full: up
@echo "Running full tests... this can take more than 30min... run 'make test-unit' for faster tests"
@echo "Running full tests..."
@echo "Using $(PARALLEL_PROCS) parallel test processes"
@go test -json -failfast -timeout=15m -parallel=$(PARALLEL_PROCS) ./... | tparse -all -progress -smallscreen

Expand Down