Skip to content

Commit

Permalink
Merge branch 'main' into auto-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
perkinsjr authored Aug 12, 2024
2 parents 6d3ddc6 + 327ad79 commit 8cbc47e
Show file tree
Hide file tree
Showing 108 changed files with 2,973 additions and 1,171 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/job_test_api_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ on:
UNKEY_BASE_URL:
type: string
required: true
secrets:
DATABASE_HOST:
secrets:
DATABASE_HOST:
required: true
DATABASE_USERNAME:
required: true
DATABASE_PASSWORD:
required: true

jobs:
jobs:
test:
environment: Canary
name: API Test Canary
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/4", "2/4", "3/4", "4/4"]
shard: ["1/8", "2/8", "3/8", "4/8", "5/8", "6/8","7/8", "8/8"]

steps:
- uses: actions/checkout@v4
Expand All @@ -41,4 +41,4 @@ jobs:
UNKEY_BASE_URL: ${{ inputs.UNKEY_BASE_URL }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
1 change: 0 additions & 1 deletion .github/workflows/job_test_api_local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
DATABASE_HOST: localhost:3900
DATABASE_USERNAME: unkey
DATABASE_PASSWORD: password
TEST_LOCAL: true

- name: Dump logs
if: always()
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/job_test_api_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ on:
UNKEY_BASE_URL:
type: string
required: true
secrets:
DATABASE_HOST:
secrets:
DATABASE_HOST:
required: true
DATABASE_USERNAME:
required: true
DATABASE_PASSWORD:
required: true

jobs:
jobs:
test:
name: API Test Staging
environment: Preview
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/4", "2/4", "3/4", "4/4"]
shard: ["1/8", "2/8", "3/8", "4/8", "5/8", "6/8","7/8", "8/8"]

steps:
- uses: actions/checkout@v4
Expand All @@ -41,4 +41,4 @@ jobs:
UNKEY_BASE_URL: ${{ inputs.UNKEY_BASE_URL }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
2 changes: 2 additions & 0 deletions apps/agent/cmd/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/Southclaws/fault/fmsg"
"github.com/unkeyed/unkey/apps/agent/pkg/api"
v1Liveness "github.com/unkeyed/unkey/apps/agent/pkg/api/routes/v1_liveness"
v1RatelimitCommitLease "github.com/unkeyed/unkey/apps/agent/pkg/api/routes/v1_ratelimit_commitLease"
v1RatelimitMultiRatelimit "github.com/unkeyed/unkey/apps/agent/pkg/api/routes/v1_ratelimit_multiRatelimit"
v1RatelimitRatelimit "github.com/unkeyed/unkey/apps/agent/pkg/api/routes/v1_ratelimit_ratelimit"
v1VaultDecrypt "github.com/unkeyed/unkey/apps/agent/pkg/api/routes/v1_vault_decrypt"
Expand Down Expand Up @@ -276,6 +277,7 @@ func run(c *cli.Context) error {

v1RatelimitRatelimit.Register(srv.HumaAPI(), srv.Services(), srv.BearerAuthFromSecret(cfg.Services.Ratelimit.AuthToken))
v1RatelimitMultiRatelimit.Register(srv.HumaAPI(), srv.Services(), srv.BearerAuthFromSecret(cfg.Services.Ratelimit.AuthToken))
v1RatelimitCommitLease.Register(srv.HumaAPI(), srv.Services(), srv.BearerAuthFromSecret(cfg.Services.Ratelimit.AuthToken))

err = connectSrv.AddService(connect.NewRatelimitServer(rl, logger, cfg.Services.Ratelimit.AuthToken))
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions apps/agent/fly.production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ cmd = ["/usr/local/bin/unkey", "agent", "--config=./config.production.json"]

[http_service]
internal_port = 8080
# auto_stop_machines = true
# auto_start_machines = true
min_machines_running = 3
auto_stop_machines = false
auto_start_machines = false
min_machines_running = 7
processes = ['app']

[http_service.concurrency]
Expand Down Expand Up @@ -49,13 +49,13 @@ port = 9095


[[vm]]
memory = '1gb'
memory = '2gb'
cpu_kind = 'shared'
cpus = 2

[deploy]
strategy = "canary"
max_unavailable = 5
max_unavailable = 2

[[restart]]
policy = "always"
Expand Down
6 changes: 3 additions & 3 deletions apps/agent/fly.staging.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

app = 'unkey-agent-dev'
primary_region = 'ams'
primary_region = 'iad'

[build]
dockerfile = "Dockerfile"
Expand All @@ -9,8 +9,8 @@ cmd = ["/usr/local/bin/unkey", "agent", "--config=./config.staging.json"]

[http_service]
internal_port = 8080
auto_start_machines = true
auto_stop_machines = true
auto_start_machines = false
auto_stop_machines = false
min_machines_running = 3
processes = ['app']

Expand Down

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

Loading

0 comments on commit 8cbc47e

Please sign in to comment.