Skip to content

Commit cbb4304

Browse files
abhiaiyer91Mastra Code (anthropic/claude-opus-4-6)
andcommitted
fix(cli): return actual deploy status instead of hardcoded 'queued' in studio uploadDeploy
Co-Authored-By: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
1 parent 5900d9d commit cbb4304

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/cli/src/commands/server/platform-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function uploadServerDeploy(
8989
throwApiError('Deploy failed', response.status);
9090
}
9191

92-
const { id, uploadUrl } = data;
92+
const { id, status, uploadUrl } = data;
9393

9494
if (!uploadUrl) {
9595
throw new Error('No upload URL returned');
@@ -131,7 +131,7 @@ export async function uploadServerDeploy(
131131
orgId,
132132
});
133133

134-
return { id, status: 'queued' };
134+
return { id, status };
135135
}
136136

137137
export async function pollServerDeploy(

packages/cli/src/commands/studio/platform-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('uploadDeploy', () => {
144144
envVars: { FOO: 'bar' },
145145
});
146146

147-
expect(result).toMatchObject({ id: 'dep-1', status: 'queued' });
147+
expect(result).toMatchObject({ id: 'dep-1', status: 'starting' });
148148

149149
// createApiClient().POST called twice: create + upload-complete
150150
expect(mockPOST).toHaveBeenCalledTimes(2);

packages/cli/src/commands/studio/platform-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export async function uploadDeploy(
9494
throwApiError('Deploy failed', response.status, error.detail);
9595
}
9696

97-
const { id, uploadUrl } = data.deploy;
97+
const { id, status, uploadUrl } = data.deploy;
9898

9999
if (!uploadUrl) {
100100
throw new Error('No upload URL returned');
@@ -136,7 +136,7 @@ export async function uploadDeploy(
136136
orgId,
137137
});
138138

139-
return { id, status: 'queued' };
139+
return { id, status };
140140
}
141141

142142
async function streamDeployLogs(deployId: string, token: string, orgId: string, signal: AbortSignal): Promise<void> {

0 commit comments

Comments
 (0)