Skip to content

Commit aa65c60

Browse files
authored
Merge branch 'main' into feature/dependency-extraction-DYN-1235
2 parents 2e7673b + 6a1391e commit aa65c60

File tree

196 files changed

+69707
-40284
lines changed

Some content is hidden

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

196 files changed

+69707
-40284
lines changed

.devcontainer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ If you see errors like "container is not running" or "An error occurred setting
426426
# If missing, build the dev image first, then build local-dev
427427
export FRAMEWORK=VLLM # Replace with VLLM, SGLANG, or TRTLLM
428428
./container/build.sh --framework $FRAMEWORK
429-
./container/build.sh --dev-image dynamo:latest-${FRAMEWORK,,} --framework $FRAMEWORK
429+
# change to lower case portable way across shells
430+
./container/build.sh --dev-image dynamo:latest-$(echo "$FRAMEWORK" | tr '[:upper:]' '[:lower:]') --framework "$FRAMEWORK"
430431
# Now you have dynamo:latest-vllm-local-dev
431432
```
432433

.github/actions/docker-build/action.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ runs:
7676
IMAGE_TAG="${{ inputs.framework }}:latest"
7777
fi
7878
79+
BUILD_START_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
80+
echo "🕐 Build started at: ${BUILD_START_TIME}"
81+
echo "BUILD_START_TIME=${BUILD_START_TIME}" >> $GITHUB_ENV
82+
7983
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
8084
./container/build.sh --tag "$IMAGE_TAG" \
8185
--target ${{ inputs.target }} \
@@ -85,3 +89,81 @@ runs:
8589
--use-sccache \
8690
--sccache-bucket "$SCCACHE_S3_BUCKET" \
8791
--sccache-region "$AWS_DEFAULT_REGION"
92+
93+
BUILD_END_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
94+
echo "🕐 Build ended at: ${BUILD_END_TIME}"
95+
echo "BUILD_END_TIME=${BUILD_END_TIME}" >> $GITHUB_ENV
96+
97+
- name: Capture Build Metrics
98+
id: metrics
99+
shell: bash
100+
run: |
101+
echo "📊 Capturing build metrics for ${{ inputs.framework }}..."
102+
103+
# Create metrics directory
104+
mkdir -p build-metrics
105+
106+
# Get accurate build timing
107+
BUILD_START_TIME="${{ env.BUILD_START_TIME }}"
108+
BUILD_END_TIME="${{ env.BUILD_END_TIME }}"
109+
110+
# Calculate duration
111+
START_EPOCH=$(date -d "$BUILD_START_TIME" +%s)
112+
END_EPOCH=$(date -d "$BUILD_END_TIME" +%s)
113+
BUILD_DURATION_SEC=$((END_EPOCH - START_EPOCH))
114+
115+
echo "🕐 Build timing:"
116+
echo " Start: ${BUILD_START_TIME}"
117+
echo " End: ${BUILD_END_TIME}"
118+
echo " Duration: ${BUILD_DURATION_SEC} seconds"
119+
120+
# Get image size using docker inspect
121+
IMAGE_TAG="${{ steps.build.outputs.image_tag }}"
122+
if [ -n "$IMAGE_TAG" ]; then
123+
IMAGE_SIZE_BYTES=$(docker image inspect "$IMAGE_TAG" --format='{{.Size}}' 2>/dev/null || echo "0")
124+
echo "📦 Image size: ${IMAGE_SIZE_BYTES} bytes"
125+
else
126+
IMAGE_SIZE_BYTES=0
127+
echo "⚠️ No image tag available"
128+
fi
129+
130+
echo "📊 Final metrics captured"
131+
132+
# Create consolidated metrics JSON file
133+
echo "🔍 Debug: inputs.platform = '${{ inputs.platform }}'"
134+
PLATFORM_ARCH=$(echo "${{ inputs.platform }}" | sed 's/linux\///')
135+
echo "🔍 Debug: PLATFORM_ARCH = '${PLATFORM_ARCH}'"
136+
echo "PLATFORM_ARCH=${PLATFORM_ARCH}" >> $GITHUB_ENV
137+
JOB_KEY="${{ inputs.framework }}-${PLATFORM_ARCH}"
138+
echo "🔍 Debug: JOB_KEY = '${JOB_KEY}'"
139+
140+
# Create job-specific metrics file
141+
mkdir -p build-metrics
142+
METRICS_FILE="build-metrics/metrics-${{ inputs.framework }}-${PLATFORM_ARCH}.json"
143+
144+
# Create the job metrics file directly
145+
cat > "$METRICS_FILE" << EOF
146+
{
147+
"framework": "${{ inputs.framework }}",
148+
"target": "${{ inputs.target }}",
149+
"platform": "${{ inputs.platform }}",
150+
"platform_arch": "${PLATFORM_ARCH}",
151+
"image_size_bytes": ${IMAGE_SIZE_BYTES},
152+
"build_start_time": "${BUILD_START_TIME}",
153+
"build_end_time": "${BUILD_END_TIME}",
154+
"build_duration_sec": ${BUILD_DURATION_SEC}
155+
}
156+
EOF
157+
158+
echo "📁 Created build metrics file for ${JOB_KEY}:"
159+
cat "$METRICS_FILE"
160+
161+
# Metrics captured and saved to JSON file
162+
163+
# Upload job-specific build metrics as artifact
164+
- name: Upload Build Metrics
165+
uses: actions/upload-artifact@v4
166+
with:
167+
name: build-metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}
168+
path: build-metrics/metrics-${{ inputs.framework }}-${{ env.PLATFORM_ARCH }}.json
169+
retention-days: 7

.github/workflows/container-validation-backends.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
7878
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
7979
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
80+
8081
- name: Run unit tests
8182
if: ${{ matrix.platform.arch != 'arm64' }}
8283
uses: ./.github/actions/pytest
@@ -107,6 +108,7 @@ jobs:
107108
steps:
108109
- name: Checkout repository
109110
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
111+
110112
- name: Build Container
111113
id: build-image
112114
uses: ./.github/actions/docker-build
@@ -122,6 +124,7 @@ jobs:
122124
sccache_s3_bucket: ${{ secrets.SCCACHE_S3_BUCKET }}
123125
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
124126
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
127+
125128
- name: Docker Tag and Push
126129
uses: ./.github/actions/docker-tag-push
127130
with:
@@ -137,7 +140,15 @@ jobs:
137140
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
138141
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
139142
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
140-
- name: Run tests
143+
144+
- name: Run unit tests
145+
# OPS-1140: Uncomment the below line
146+
# if: ${{ matrix.platform.arch != 'arm64' }}
147+
uses: ./.github/actions/pytest
148+
with:
149+
image_tag: ${{ steps.build-image.outputs.image_tag }}
150+
pytest_marks: "unit and sglang and gpu_1"
151+
- name: Run e2e tests
141152
# OPS-1140: Uncomment the below line
142153
# if: ${{ matrix.platform.arch != 'arm64' }}
143154
uses: ./.github/actions/pytest
@@ -159,6 +170,7 @@ jobs:
159170
steps:
160171
- name: Checkout code
161172
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
173+
162174
- name: Build Container
163175
id: build-image
164176
uses: ./.github/actions/docker-build
@@ -172,6 +184,7 @@ jobs:
172184
sccache_s3_bucket: ${{ secrets.SCCACHE_S3_BUCKET }}
173185
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
174186
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
187+
175188
- name: Docker Tag and Push
176189
uses: ./.github/actions/docker-tag-push
177190
with:
@@ -185,7 +198,14 @@ jobs:
185198
azure_acr_hostname: ${{ secrets.AZURE_ACR_HOSTNAME }}
186199
azure_acr_user: ${{ secrets.AZURE_ACR_USER }}
187200
azure_acr_password: ${{ secrets.AZURE_ACR_PASSWORD }}
188-
- name: Run tests
201+
202+
- name: Run unit tests
203+
if: ${{ matrix.platform.arch != 'arm64' }}
204+
uses: ./.github/actions/pytest
205+
with:
206+
image_tag: ${{ steps.build-image.outputs.image_tag }}
207+
pytest_marks: "unit and trtllm_marker and gpu_1"
208+
- name: Run e2e tests
189209
if: ${{ matrix.platform.arch != 'arm64' }}
190210
uses: ./.github/actions/pytest
191211
with:
@@ -212,12 +232,23 @@ jobs:
212232
run: |
213233
python -m pip install --upgrade pip
214234
pip install requests
235+
236+
- name: Download build metrics
237+
uses: actions/download-artifact@v4
238+
with:
239+
pattern: build-metrics-*
240+
path: build-metrics/
241+
merge-multiple: true
242+
continue-on-error: true # Don't fail if artifacts don't exist
243+
215244
- name: Upload Complete Workflow Metrics
216245
env:
217246
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218247
WORKFLOW_INDEX: ${{ secrets.WORKFLOW_INDEX }}
219248
JOB_INDEX: ${{ secrets.JOB_INDEX }}
220249
STEPS_INDEX: ${{ secrets.STEPS_INDEX }}
250+
# Container index configuration
251+
CONTAINER_INDEX: ${{ secrets.CONTAINER_INDEX }}
221252
run: |
222-
# Run the enhanced metrics upload script
253+
# Upload complete workflow metrics including container metrics
223254
python3 .github/workflows/upload_complete_workflow_metrics.py

0 commit comments

Comments
 (0)