Skip to content

Commit 1b4f802

Browse files
Merge branch 'main' into robot2
2 parents c302312 + 2ae5946 commit 1b4f802

File tree

5 files changed

+86
-37
lines changed

5 files changed

+86
-37
lines changed

.github/workflows/advanced-docker-compose-build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,24 @@ jobs:
106106
echo ".env not found; continuing"
107107
fi
108108
109+
- name: Free Disk Space
110+
run: |
111+
echo "Freeing disk space..."
112+
df -h
113+
sudo rm -rf /usr/share/dotnet
114+
sudo rm -rf /usr/local/lib/android
115+
sudo rm -rf /opt/ghc
116+
sudo rm -rf /usr/share/swift
117+
docker system prune -a -f
118+
df -h
119+
120+
- name: Initialize OpenMemory cache
121+
run: |
122+
echo "Initializing OpenMemory cache..."
123+
cd ../../extras/openmemory-mcp
124+
chmod +x init-cache.sh
125+
./init-cache.sh
126+
109127
- name: Determine version
110128
id: version
111129
run: |
@@ -116,6 +134,7 @@ jobs:
116134
else
117135
VERSION="sha-${GITHUB_SHA::7}"
118136
fi
137+
119138
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
120139
121140
- name: Build, tag, and push services sequentially with version
@@ -177,6 +196,9 @@ jobs:
177196
docker image rm -f "$target_image" || true
178197
docker image rm -f "$latest_image" || true
179198
echo "::endgroup::"
199+
200+
# Aggressive cleanup to save space
201+
docker system prune -af || true
180202
done
181203
182204
# Build and push parakeet-asr with CUDA variants (cu121, cu126, cu128)
@@ -205,6 +227,9 @@ jobs:
205227
docker image rm -f "$target_image" || true
206228
docker image rm -f "$latest_image" || true
207229
fi
230+
231+
# Aggressive cleanup to save space
232+
docker system prune -af || true
208233
done
209234
cd - > /dev/null
210235
echo "::endgroup::"
@@ -237,6 +262,9 @@ jobs:
237262
docker image rm -f "$target_image" || true
238263
docker image rm -f "$latest_image" || true
239264
fi
265+
266+
# Aggressive cleanup to save space
267+
docker system prune -af || true
240268
done
241269
cd - > /dev/null
242270
echo "::endgroup::"

extras/asr-services/Dockerfile_Moonshine

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1212

1313
# Dependency manifest first for cache‑friendly installs
1414
COPY pyproject.toml uv.lock ./
15-
RUN --mount=type=cache,target=/root/.cache/uv \
16-
uv sync --no-install-project --compile-bytecode --group moonshine
15+
RUN uv sync --no-install-project --compile-bytecode --group moonshine && \
16+
uv cache clean
1717

1818
# Add source and install project itself
1919
COPY . .

extras/asr-services/Dockerfile_Parakeet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616

1717
# Dependency manifest first for cache‑friendly installs
1818
COPY pyproject.toml uv.lock ./
19-
RUN --mount=type=cache,target=/root/.cache/uv \
20-
uv sync --no-install-project --group parakeet --extra ${CUDA_VERSION}
19+
RUN uv sync --no-install-project --group parakeet --extra ${CUDA_VERSION} && \
20+
uv cache clean
2121

2222
# Should prepare the .venv for use :)
2323

extras/speaker-recognition/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ RUN mkdir -p src/simple_speaker_recognition
2828
COPY src/simple_speaker_recognition/__init__.py src/simple_speaker_recognition/
2929

3030
# Install dependencies and package
31-
RUN uv sync --no-dev --extra ${PYTORCH_CUDA_VERSION}
31+
RUN uv sync --no-dev --extra ${PYTORCH_CUDA_VERSION} && \
32+
uv cache clean
3233

3334
# Create directories
3435
RUN mkdir -p /app/audio_chunks /app/debug /app/data /models

tests/endpoints/client_queue_tests.robot

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
Documentation Client and Queue Management API Tests
33
Library RequestsLibrary
44
Library Collections
5-
Resource ../setup/setup_keywords.robot
6-
Resource ../setup/teardown_keywords.robot
7-
Resource ../resources/user_keywords.robot
5+
Resource ../resources/setup_resources.robot
6+
Resource ../resources/session_resources.robot
7+
Resource ../resources/user_resources.robot
88
Suite Setup Suite Setup
99
Suite Teardown Delete All Sessions
10-
Test Setup Test Cleanup
10+
1111
*** Test Cases ***
1212

1313
Get Active Clients Test
1414
[Documentation] Test getting active client information
15-
[Tags] infra
15+
[Tags] client active positive
1616
1717
Create API Session admin_session
1818
${response}= GET On Session admin_session /api/clients/active
@@ -30,7 +30,7 @@ Get Active Clients Test
3030

3131
Get Queue Jobs Test
3232
[Documentation] Test getting queue jobs with pagination
33-
[Tags] queue
33+
[Tags] queue jobs positive
3434
3535
Create API Session admin_session
3636
&{params}= Create Dictionary limit=20 offset=0
@@ -52,7 +52,7 @@ Get Queue Jobs Test
5252

5353
Get Queue Jobs With Different Limits Test
5454
[Documentation] Test queue jobs pagination with different limits
55-
[Tags] queue
55+
[Tags] queue jobs pagination positive
5656
Get Anonymous Session anon_session
5757

5858
Create API Session admin_session
@@ -77,45 +77,53 @@ Get Queue Jobs With Different Limits Test
7777

7878
Get Queue Statistics Test
7979
[Documentation] Test getting queue statistics
80-
[Tags] queue
80+
[Tags] queue statistics positive
81+
Get Anonymous Session anon_session
82+
83+
Create API Session admin_session
8184

82-
${response}= GET On Session api /api/queue/stats
85+
${response}= GET On Session admin_session /api/queue/stats
8386
Should Be Equal As Integers ${response.status_code} 200
8487

8588
${stats}= Set Variable ${response.json()}
86-
Dictionary Should Contain Key ${stats} queued_jobs
87-
Dictionary Should Contain Key ${stats} processing_jobs
88-
Dictionary Should Contain Key ${stats} completed_jobs
89-
Dictionary Should Contain Key ${stats} failed_jobs
90-
Dictionary Should Contain Key ${stats} total_jobs
91-
Dictionary Should Contain Key ${stats} cancelled_jobs
92-
Dictionary Should Contain Key ${stats} deferred_jobs
89+
Dictionary Should Contain Key ${stats} queued
90+
Dictionary Should Contain Key ${stats} processing
91+
Dictionary Should Contain Key ${stats} completed
92+
Dictionary Should Contain Key ${stats} failed
9393

94+
# All counts should be non-negative
95+
Should Be True ${stats}[queued] >= 0
96+
Should Be True ${stats}[processing] >= 0
97+
Should Be True ${stats}[completed] >= 0
98+
Should Be True ${stats}[failed] >= 0
9499

95100
Get Queue Health Test
96101
[Documentation] Test getting queue health status
97-
[Tags] queue health
102+
[Tags] queue health positive
103+
Get Anonymous Session anon_session
98104

99-
${response}= GET On Session api /api/queue/worker-details
105+
Create API Session admin_session
106+
${response}= GET On Session admin_session /api/queue/health
100107
Should Be Equal As Integers ${response.status_code} 200
101108

102109
${health}= Set Variable ${response.json()}
103-
Dictionary Should Contain Key ${health} workers
104-
Dictionary Should Contain Key ${health} redis_connection
110+
Dictionary Should Contain Key ${health} status
111+
Dictionary Should Contain Key ${health} worker_running
112+
Dictionary Should Contain Key ${health} message
105113

106114
# Status should be one of expected values
107-
Should Be True '${health}[redis_connection]' in ['healthy', 'stopped', 'unhealthy']
115+
Should Be True '${health}[status]' in ['healthy', 'stopped', 'unhealthy']
108116

109117
Queue Jobs User Isolation Test
110118
[Documentation] Test that regular users only see their own queue jobs
111-
[Tags] queue permissions
119+
[Tags] queue security isolation
112120
Get Anonymous Session anon_session
113121

114122
Create API Session admin_session
115123

116124
# Create a test user
117-
${test_user}= Create Test User admin_session
118-
Create API Session user_session email=${test_user}[email] password=${TEST_USER_PASSWORD}
125+
${test_user}= Create Test User admin_session test-user-${RANDOM_ID}@example.com test-password-123
126+
Create API Session user_session email=test-user-${RANDOM_ID}@example.com password=test-password-123
119127

120128
# Get user's jobs (should be filtered to their user_id)
121129
${response}= GET On Session user_session /api/queue/jobs
@@ -132,11 +140,11 @@ Queue Jobs User Isolation Test
132140
END
133141

134142
# Cleanup
135-
Delete User admin_session ${test_user}[id]
143+
Delete Test User ${test_user}[user_id]
136144

137145
Invalid Queue Parameters Test
138146
[Documentation] Test queue endpoints with invalid parameters
139-
[Tags] queue
147+
[Tags] queue negative validation
140148
Get Anonymous Session anon_session
141149

142150
Create API Session admin_session
@@ -158,29 +166,41 @@ Invalid Queue Parameters Test
158166

159167
Unauthorized Client Access Test
160168
[Documentation] Test that client endpoints require authentication
161-
[Tags] infra permissions
169+
[Tags] client security negative
162170
Get Anonymous Session session
163171

164172
# Try to access active clients without token
165-
${response}= GET On Session session /api/clients/active expected_status=401
173+
${response}= GET On Session ${session} /api/clients/active expected_status=401
166174
Should Be Equal As Integers ${response.status_code} 401
167175

168176
Unauthorized Queue Access Test
169177
[Documentation] Test that queue endpoints require authentication
170-
[Tags] queue permissions
178+
[Tags] queue security negative
171179
Get Anonymous Session session
172180

173181
# Try to access queue jobs without token
174-
${response}= GET On Session session /api/queue/jobs expected_status=401
182+
${response}= GET On Session ${session} /api/queue/jobs expected_status=401
175183
Should Be Equal As Integers ${response.status_code} 401
176184

177185
# Try to access queue stats without token
178-
${response}= GET On Session session /api/queue/stats expected_status=401
186+
${response}= GET On Session ${session} /api/queue/stats expected_status=401
179187
Should Be Equal As Integers ${response.status_code} 401
180188

189+
Queue Health Public Access Test
190+
[Documentation] Test that queue health endpoint is publicly accessible
191+
[Tags] queue health public
192+
Get Anonymous Session session
193+
194+
# Queue health should be accessible without authentication
195+
${response}= GET On Session ${session} /api/queue/health
196+
Should Be Equal As Integers ${response.status_code} 200
197+
198+
${health}= Set Variable ${response.json()}
199+
Dictionary Should Contain Key ${health} status
200+
181201
Client Manager Integration Test
182202
[Documentation] Test client manager functionality
183-
[Tags] infra e2e
203+
[Tags] client manager integration
184204
Get Anonymous Session anon_session
185205

186206
Create API Session admin_session

0 commit comments

Comments
 (0)