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
6 changes: 3 additions & 3 deletions .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ runs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: ./apps/agent/go.mod
cache-dependency-path: ./apps/agent/go.sum
go-version-file: ./go/go.mod
cache-dependency-path: ./go/go.sum

- run: go mod download
if: ${{ inputs.go == 'true' }}
shell: bash
working-directory: ./apps/agent
working-directory: ./go

- name: Install tparse
run: go install github.com/mfridman/tparse@latest
Expand Down
4 changes: 2 additions & 2 deletions go/apps/api/integration/multi_node_ratelimiting/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func RunRateLimitTest(
// Maximum theoretical allowed requests across all windows
maxAllowed := math.Min(numWindows*float64(limit), float64(totalRequests))

// Set acceptance thresholds with 5% tolerance
upperLimit := int(maxAllowed * 1.1)
// Set acceptance thresholds with 20% tolerance
upperLimit := int(maxAllowed * 1.2)
lowerLimit := int(maxAllowed * 0.95)

// Special case: When request rate is below the limit,
Expand Down
33 changes: 33 additions & 0 deletions go/apps/api/openapi/gen.go

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

115 changes: 112 additions & 3 deletions go/apps/api/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,6 @@
},
"meta": {
"type": "object",
"additionalProperties": {
"nullable": true
},
"description": "Attach metadata to this identity that you need to have access to when verifying a key.\n\nThis will be returned as part of the `verifyKey` response.\n"
},
"ratelimits": {
Expand Down Expand Up @@ -631,6 +628,45 @@
"$ref": "#/components/schemas/IdentitiesCreateIdentityResponseData"
}
}
},
"V2ApisCreateApiRequestBody": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"minLength": 3,
"description": "The name for your API. This is not customer facing.",
"example": "my-api"
}
},
"additionalProperties": false
},
"ApisCreateApiResponseData": {
"type": "object",
"properties": {
"apiId": {
"description": "The id of the API",
"type": "string"
},
"name": {
"description": "The name of the API",
"type": "string"
}
},
"required": ["apiId", "name"]
},
"V2ApisCreateApiResponseBody": {
"type": "object",
"required": ["meta", "data"],
"properties": {
"meta": {
"$ref": "#/components/schemas/Meta"
},
"data": {
"$ref": "#/components/schemas/ApisCreateApiResponseData"
}
}
}
}
},
Expand Down Expand Up @@ -1135,6 +1171,79 @@
}
}
},
"/v2/apis.createApi": {
"post": {
"tags": ["apis"],
"operationId": "createApi",
"security": [
{
"rootKey": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ApisCreateApiRequestBody"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ApisCreateApiResponseBody"
}
}
},
"description": "Successfully created API"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenErrorResponse"
}
}
}
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerErrorResponse"
}
}
},
"description": "Internal server error"
}
}
}
},
"/v2/liveness": {
"get": {
"tags": ["liveness"],
Expand Down
Loading