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
37 changes: 18 additions & 19 deletions .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand All @@ -31,6 +33,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand All @@ -46,6 +50,8 @@ jobs:
HADOLINT_RECURSIVE: "true"
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Lint dockerfiles
uses: hadolint/hadolint-action@v2.0.0
with:
Expand All @@ -59,6 +65,8 @@ jobs:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand All @@ -78,29 +86,12 @@ jobs:
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=coverage.txt -service=github

tests_sourceclear:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
check-latest: true
- name: sourceclear
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
run: |
make -e setup build
curl -sSL https://download.sourceclear.com/ci.sh | bash -s – scan
- name: run
run: |
make -e setup build
go get -v -d ./...

tests_windows_build_ps1:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: windows build.ps1 test
id: windows_build
shell: pwsh
Expand All @@ -117,6 +108,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand Down Expand Up @@ -147,6 +140,7 @@ jobs:
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand Down Expand Up @@ -179,6 +173,7 @@ jobs:
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand All @@ -190,6 +185,7 @@ jobs:
repository: 'optimizely/travisci-tools'
path: 'home/runner/travisci-tools'
ref: 'master'
persist-credentials: false
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -250,6 +246,8 @@ jobs:
TARGET: windows-amd64
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: '1.24.0'
Expand All @@ -261,6 +259,7 @@ jobs:
repository: 'optimizely/travisci-tools'
path: 'home/runner/travisci-tools'
ref: 'master'
persist-credentials: false
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
repository: 'optimizely/travisci-tools'
path: 'home/runner/travisci-tools'
ref: 'master'
persist-credentials: false
- name: set SDK Branch if PR
if: ${{ github.event_name == 'pull_request' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ test-acceptance:
make setup && \
make run & \
bash scripts/wait_for_agent_to_start.sh && \
pytest -vv -rA --diff-symbols tests/acceptance/test_acceptance/ \
pytest -vv -rA tests/acceptance/test_acceptance/ \
-k "not test_decide__feature_no_ups and not test_decide__flag_key_parameter_no_ups" --host "$(MYHOST)" && \
make stop
22 changes: 22 additions & 0 deletions api/openapi-spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ paths:
schema:
oneOf:
- type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyDecision'
- $ref: '#/components/schemas/OptimizelyDecision'
Expand Down Expand Up @@ -263,6 +264,7 @@ paths:
explode: true
schema:
type: array
maxItems: 1000000
items:
type: string
- name: experimentKey
Expand All @@ -272,6 +274,7 @@ paths:
explode: true
schema:
type: array
maxItems: 1000000
items:
type: string
- name: disableTracking
Expand Down Expand Up @@ -311,6 +314,7 @@ paths:
application/json:
schema:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/Decision'
description: ''
Expand Down Expand Up @@ -421,6 +425,10 @@ paths:
application/json: {}
deprecated: false
components:
# Note: maxItems values throughout this spec are set to 1000000 to satisfy security
# scanning requirements (Arnica/Prisma). These limits are for documentation purposes
# only and are NOT enforced at runtime by Agent. Actual DoS protection is handled
# by infrastructure-level controls (load balancers, rate limiting, timeouts).
requestBodies:
ActivateContext:
required: true
Expand Down Expand Up @@ -555,6 +563,7 @@ components:
type: string
experimentIds:
type: array
maxItems: 1000000
items:
type: string
description: ''
Expand All @@ -571,11 +580,13 @@ components:
type: string
experimentRules:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyExperiment'
description: ''
deliveryRules:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyExperiment'
description: ''
Expand Down Expand Up @@ -635,6 +646,7 @@ components:
$ref: '#/components/schemas/UserContext'
reasons:
type: array
maxItems: 1000000
items:
type: string
description: ''
Expand All @@ -660,6 +672,7 @@ components:
type: string
messages:
type: array
maxItems: 1000000
items:
type: string
description: ''
Expand Down Expand Up @@ -693,16 +706,19 @@ components:
$ref: '#/components/schemas/OptimizelyFeature'
attributes:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyAttribute'
description: ''
audiences:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyAudience'
description: ''
events:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/OptimizelyEvent'
description: ''
Expand Down Expand Up @@ -764,6 +780,7 @@ components:
properties:
decideOptions:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/DecideOption'
description: ''
Expand All @@ -773,13 +790,15 @@ components:
type: object
forcedDecisions:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/ForcedDecision'
description: ''
fetchSegments:
type: boolean
fetchSegmentsOptions:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/FetchSegmentsOption'
description: ''
Expand Down Expand Up @@ -846,6 +865,7 @@ components:
properties:
operations:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/BatchOperation'
description: Array of requests to Agent endpoints, batched into one request
Expand Down Expand Up @@ -897,6 +917,7 @@ components:
contentEncoding: int32
response:
type: array
maxItems: 1000000
items:
$ref: '#/components/schemas/BatchResponseItem'
description: ''
Expand All @@ -917,6 +938,7 @@ components:
body:
oneOf:
- type: array
maxItems: 1000000
items:
type: object
- type: object
Expand Down
10 changes: 10 additions & 0 deletions api/openapi-spec/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ info:
servers:
- url: https://api.optimizely.com
description: Hosted Optimizely Decision Service
security:
- WebhookSignature: []
paths:
/webhooks/optimizely:
post:
Expand All @@ -31,8 +33,16 @@ paths:
description: No content. Webhook message received and processed.
'400':
description: Invalid webhook message received.
security:
- WebhookSignature: []
deprecated: false
components:
securitySchemes:
WebhookSignature:
type: apiKey
name: X-Hub-Signature
in: header
description: "HMAC-SHA1 signature of the request payload using the webhook secret (format: sha1=<hex_digest>)"
schemas:
DatafileUpdateData:
title: DatafileUpdateData
Expand Down
1 change: 0 additions & 1 deletion examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
certifi==2025.1.31
chardet==5.2.0
charset-normalizer==3.4.1
idna==3.10
requests==2.32.4
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/go-chi/cors v1.2.1
github.com/go-chi/httplog v0.2.5
github.com/go-chi/render v1.0.2
github.com/go-kit/kit v0.12.0
github.com/go-kit/kit v0.13.0
github.com/go-redis/redis/v8 v8.11.5
github.com/go-redis/redismock/v8 v8.11.5
github.com/golang-jwt/jwt/v4 v4.5.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ github.com/go-chi/render v1.0.2/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIo
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4=
github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs=
github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU=
github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
Expand Down
1 change: 0 additions & 1 deletion tests/acceptance/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pytest==7.0.0
pytest-clarity==1.0.1
requests==2.32.4
openapi_core==0.17.1
openapi_spec_validator==0.5.6
Expand Down