Skip to content

Commit f227ef4

Browse files
committed
Merge branch 'main' into rename-letsgo-to-go
2 parents 1cef26f + 4a9b998 commit f227ef4

1,174 files changed

Lines changed: 800201 additions & 93675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
# These owners will be the default owners for everything in
44
# the repo. Unless a later match takes precedence,
5-
* @ashwinb @raghotham @ehhuang @leseb @bbrowning @mattf @franciscojavierarceo @cdoern
5+
* @ashwinb @raghotham @ehhuang @leseb @bbrowning @mattf @franciscojavierarceo @cdoern @skamenan7
6+
7+
# OpenAPI SDK generation and publishing
8+
/client-sdks/openapi/ @ashwinb @leseb @bbrowning
9+
/.github/workflows/openapi-generator-validation.yml @ashwinb @leseb @bbrowning

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ contact_links:
44
- name: Have you read the docs?
55
url: https://ogx-ai.github.io/docs
66
about: Much help can be found in the docs
7-
- name: Chat on Slack
8-
url: https://join.slack.com/t/ogx-ai/shared_invite/zt-3uyw5bxj9-tSEwsNZncgkGEKbd4dXIpw
9-
about: Maybe chatting with the community can help
7+
- name: Join the Discord community
8+
url: https://discord.gg/bUYRqEvK6
9+
about: Ask questions and chat with the community

.github/actions/install-ogx-client/action.yml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ runs:
3030
id: configure
3131
shell: bash
3232
run: |
33-
# If sdk_install_url is provided (e.g., from Stainless preview), use it directly
33+
# If sdk_install_url is provided, use it directly
3434
if [ -n "${{ inputs.sdk_install_url }}" ]; then
3535
echo "Using provided sdk_install_url: ${{ inputs.sdk_install_url }}"
36+
echo "generate=false" >> $GITHUB_OUTPUT
3637
echo "install-after-sync=true" >> $GITHUB_OUTPUT
3738
echo "install-source=${{ inputs.sdk_install_url }}" >> $GITHUB_OUTPUT
3839
exit 0
@@ -51,28 +52,60 @@ runs:
5152
5253
echo "Working with branch: $BRANCH"
5354
54-
# On release branches: install client from the matching release branch in the client repo
55-
# On non-release branches: install based on client-version after sync
55+
# The ogx-client Python SDK is generated in-repo from client-sdks/openapi.
56+
# On release branches and when client-version=latest, generate the SDK from
57+
# the current checkout so tests run against the client built from this source.
58+
# When client-version=published, use the version resolved by uv sync from PyPI.
5659
if [[ "$BRANCH" =~ ^release-[0-9]+\.[0-9]+\.x$ ]]; then
57-
echo "Detected release branch: $BRANCH"
58-
59-
# Check if matching branch exists in client repo
60-
if ! git ls-remote --exit-code --heads https://github.com/ogx-ai/ogx-client-python.git "$BRANCH" > /dev/null 2>&1; then
61-
echo "::error::Branch $BRANCH not found in ogx-client-python repository"
62-
echo "::error::Please create the matching release branch in ogx-client-python before testing"
63-
exit 1
64-
fi
65-
60+
echo "Detected release branch: $BRANCH — generating client from checkout"
61+
echo "generate=true" >> $GITHUB_OUTPUT
6662
echo "install-after-sync=true" >> $GITHUB_OUTPUT
67-
echo "install-source=git+https://github.com/ogx-ai/ogx-client-python.git@$BRANCH" >> $GITHUB_OUTPUT
63+
echo "install-source=${{ github.workspace }}/client-sdks/openapi/sdks/python" >> $GITHUB_OUTPUT
6864
elif [ "${{ inputs.client-version }}" = "latest" ]; then
69-
# Install from main git after sync
65+
echo "Generating client from checkout (client-version=latest)"
66+
echo "generate=true" >> $GITHUB_OUTPUT
7067
echo "install-after-sync=true" >> $GITHUB_OUTPUT
71-
echo "install-source=git+https://github.com/ogx-ai/ogx-client-python.git@main" >> $GITHUB_OUTPUT
68+
echo "install-source=${{ github.workspace }}/client-sdks/openapi/sdks/python" >> $GITHUB_OUTPUT
7269
elif [ "${{ inputs.client-version }}" = "published" ]; then
7370
# Use published version from PyPI (installed by sync)
71+
echo "generate=false" >> $GITHUB_OUTPUT
7472
echo "install-after-sync=false" >> $GITHUB_OUTPUT
7573
elif [ -n "${{ inputs.client-version }}" ]; then
7674
echo "::error::Invalid client-version: ${{ inputs.client-version }}"
7775
exit 1
76+
else
77+
echo "generate=false" >> $GITHUB_OUTPUT
78+
fi
79+
80+
- name: Set up Java (SDK generation)
81+
if: steps.configure.outputs.generate == 'true'
82+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
83+
with:
84+
distribution: 'temurin'
85+
java-version: '11'
86+
87+
- name: Set up Node.js (SDK generation)
88+
if: steps.configure.outputs.generate == 'true'
89+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
90+
with:
91+
node-version: '20'
92+
93+
- name: Install openapi-generator-cli (SDK generation)
94+
if: steps.configure.outputs.generate == 'true'
95+
shell: bash
96+
run: npm install -g @openapitools/openapi-generator-cli
97+
98+
- name: Generate ogx-client SDK
99+
if: steps.configure.outputs.generate == 'true'
100+
shell: bash
101+
working-directory: client-sdks/openapi
102+
run: |
103+
echo "Generating ogx-client SDK (OPEN=0) from checkout..."
104+
make sdk OPEN=0
105+
106+
PY_FILE_COUNT=$(find sdks/python -name "*.py" | wc -l)
107+
echo "Generated Python files: $PY_FILE_COUNT"
108+
if [ "$PY_FILE_COUNT" -le 10 ]; then
109+
echo "::error::Too few Python files generated (expected > 10, got $PY_FILE_COUNT)"
110+
exit 1
78111
fi
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: 'Launch GPU EC2 Runner'
2+
description: 'Launch GPU-enabled EC2 instance as GitHub Actions self-hosted runner (wrapper for machulav/ec2-github-runner)'
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
mode:
8+
description: 'Mode: start or stop'
9+
required: true
10+
github-token:
11+
description: 'GitHub Personal Access Token with repo scope for runner registration'
12+
required: true
13+
instance-type:
14+
description: 'EC2 instance type (e.g., g6.2xlarge, g5.2xlarge, g6.8xlarge)'
15+
required: false
16+
default: 'g6.2xlarge'
17+
aws-region:
18+
description: 'AWS region'
19+
required: true
20+
availability-zones-config:
21+
description: 'JSON array of AZ configs with imageId, subnetId, securityGroupId for fallback'
22+
required: false
23+
default: ''
24+
# For stop mode
25+
label:
26+
description: 'Runner label (for stop mode)'
27+
required: false
28+
ec2-instance-id:
29+
description: 'EC2 instance ID (for stop mode)'
30+
required: false
31+
# Optional
32+
ec2-instance-tags:
33+
description: 'JSON array of tags to apply to EC2 instance'
34+
required: false
35+
default: '[]'
36+
runner-home-dir:
37+
description: 'Home directory for the runner'
38+
required: false
39+
default: ''
40+
iam-role-name:
41+
description: 'IAM role name to attach to the instance (optional, for enhanced security)'
42+
required: false
43+
default: ''
44+
45+
outputs:
46+
label:
47+
description: 'Unique label for the launched runner'
48+
value: ${{ steps.ec2-runner.outputs.label }}
49+
ec2-instance-id:
50+
description: 'EC2 instance ID'
51+
value: ${{ steps.ec2-runner.outputs.ec2-instance-id }}
52+
53+
runs:
54+
using: 'composite'
55+
steps:
56+
- name: Start EC2 runner
57+
if: inputs.mode == 'start'
58+
id: ec2-runner
59+
uses: machulav/ec2-github-runner@343a1b2ae682e681c3cec9a235d882da17ff04ef # v2.6.1
60+
env:
61+
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
62+
AWS_REGION: ${{ inputs.aws-region }}
63+
with:
64+
mode: start
65+
github-token: ${{ inputs.github-token }}
66+
ec2-instance-type: ${{ inputs.instance-type }}
67+
aws-resource-tags: ${{ inputs.ec2-instance-tags }}
68+
runner-home-dir: ${{ inputs.runner-home-dir }}
69+
iam-role-name: ${{ inputs.iam-role-name }}
70+
availability-zones-config: ${{ inputs.availability-zones-config }}
71+
72+
- name: Stop EC2 runner
73+
if: inputs.mode == 'stop'
74+
uses: machulav/ec2-github-runner@343a1b2ae682e681c3cec9a235d882da17ff04ef # v2.6.1
75+
env:
76+
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
77+
AWS_REGION: ${{ inputs.aws-region }}
78+
with:
79+
mode: stop
80+
github-token: ${{ inputs.github-token }}
81+
label: ${{ inputs.label }}
82+
ec2-instance-id: ${{ inputs.ec2-instance-id }}

.github/actions/run-and-record-tests/action.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
description: 'Regex pattern to pass to pytest -k'
2525
required: false
2626
default: ''
27+
text-model:
28+
description: 'Text model override to pass to integration-tests.sh'
29+
required: false
30+
default: ''
2731
target-branch:
2832
description: 'Target branch for recording commits (for PRs, use the PR head branch)'
2933
required: false
@@ -56,28 +60,37 @@ runs:
5660
INPUT_SUITE: ${{ inputs.suite }}
5761
INPUT_SUBDIRS: ${{ inputs.subdirs }}
5862
INPUT_PATTERN: ${{ inputs.pattern }}
63+
INPUT_TEXT_MODEL: ${{ inputs.text-model }}
5964
run: |
60-
SCRIPT_ARGS="--stack-config ${INPUT_STACK_CONFIG} --inference-mode ${INPUT_INFERENCE_MODE}"
65+
SCRIPT_ARGS=(
66+
--stack-config "${INPUT_STACK_CONFIG}"
67+
--inference-mode "${INPUT_INFERENCE_MODE}"
68+
)
6169
6270
# Add optional arguments only if they are provided
6371
if [ -n "${INPUT_SETUP}" ]; then
64-
SCRIPT_ARGS="${SCRIPT_ARGS} --setup ${INPUT_SETUP}"
72+
SCRIPT_ARGS+=(--setup "${INPUT_SETUP}")
6573
fi
6674
if [ -n "${INPUT_SUITE}" ]; then
67-
SCRIPT_ARGS="${SCRIPT_ARGS} --suite ${INPUT_SUITE}"
75+
SCRIPT_ARGS+=(--suite "${INPUT_SUITE}")
6876
fi
6977
if [ -n "${INPUT_SUBDIRS}" ]; then
70-
SCRIPT_ARGS="${SCRIPT_ARGS} --subdirs ${INPUT_SUBDIRS}"
78+
SCRIPT_ARGS+=(--subdirs "${INPUT_SUBDIRS}")
7179
fi
7280
if [ -n "${INPUT_PATTERN}" ]; then
73-
SCRIPT_ARGS="${SCRIPT_ARGS} --pattern ${INPUT_PATTERN}"
81+
SCRIPT_ARGS+=(--pattern "${INPUT_PATTERN}")
82+
fi
83+
if [ -n "${INPUT_TEXT_MODEL}" ]; then
84+
SCRIPT_ARGS+=(--text-model "${INPUT_TEXT_MODEL}")
7485
fi
7586
7687
echo "=== Running command ==="
77-
echo "uv run --no-sync ./scripts/integration-tests.sh $SCRIPT_ARGS"
88+
printf 'uv run --no-sync ./scripts/integration-tests.sh'
89+
printf ' %q' "${SCRIPT_ARGS[@]}"
90+
printf '\n'
7891
echo ""
7992
80-
uv run --no-sync ./scripts/integration-tests.sh $SCRIPT_ARGS | tee "pytest-${INPUT_INFERENCE_MODE}.log"
93+
uv run --no-sync ./scripts/integration-tests.sh "${SCRIPT_ARGS[@]}" | tee "pytest-${INPUT_INFERENCE_MODE}.log"
8194
8295
8396
- name: Commit and push recordings

.github/actions/setup-runner/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
required: false
77
default: "3.12"
88
client-version:
9-
description: The ogx-client-python version to test against (latest or published)
9+
description: Which ogx-client to test against — 'latest' generates the SDK in-repo from client-sdks/openapi, 'published' uses the PyPI release
1010
required: false
1111
default: "latest"
1212
sdk_install_url:
@@ -46,7 +46,7 @@ runs:
4646
# Install specific client version after sync if needed
4747
if [ "${{ steps.client-config.outputs.install-after-sync }}" = "true" ]; then
4848
echo "Installing ogx-client from: ${{ steps.client-config.outputs.install-source }}"
49-
uv pip install ${{ steps.client-config.outputs.install-source }}
49+
uv pip install --upgrade ${{ steps.client-config.outputs.install-source }}
5050
fi
5151
5252
echo "Installed ogx packages"

.github/actions/setup-test-environment/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ inputs:
2727
description: 'Explicit branch override (used by scheduled CI to pass the matrix branch)'
2828
required: false
2929
default: ''
30+
enable-hf-cache:
31+
description: 'Whether to cache HuggingFace models and datasets'
32+
required: false
33+
default: 'true'
3034

3135
runs:
3236
using: 'composite'
@@ -40,6 +44,7 @@ runs:
4044
branch: ${{ inputs.branch }}
4145

4246
- name: Cache HuggingFace models and datasets
47+
if: ${{ inputs.enable-hf-cache == 'true' }}
4348
uses: actions/cache@v4
4449
with:
4550
path: ~/.cache/huggingface
@@ -48,6 +53,7 @@ runs:
4853
hf-cache-${{ runner.os }}-
4954
5055
- name: Pre-download HuggingFace assets for offline use
56+
if: ${{ inputs.enable-hf-cache == 'true' }}
5157
shell: bash
5258
env:
5359
HF_HUB_ENABLE_HF_TRANSFER: "1"
@@ -74,7 +80,7 @@ runs:
7480
setup: ${{ inputs.setup }}
7581

7682
- name: Setup vllm
77-
if: ${{ startsWith(inputs.setup, 'vllm') && inputs.inference-mode != 'replay' }}
83+
if: ${{ startsWith(inputs.setup, 'vllm') && !startsWith(inputs.setup, 'vllm-gpu-') && inputs.inference-mode != 'replay' }}
7884
uses: ./.github/actions/setup-vllm
7985

8086
- name: Start Postgres service

0 commit comments

Comments
 (0)