Skip to content

Commit c394f41

Browse files
Andrew Farriesroboquat
authored andcommitted
Don't count user errors in failed image builds
Exclude image build failures that look like they were due to user error from the metric.
1 parent 3bf9dd3 commit c394f41

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/server/src/workspace/workspace-starter.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,10 +1273,6 @@ export class WorkspaceStarter {
12731273
// ...and wait for the build to finish
12741274
buildResult = await result.buildPromise;
12751275
if (buildResult.getStatus() == BuildStatus.DONE_FAILURE) {
1276-
// Register a failed image build only if the image actually needed to be built; ie the build was not a no-op.
1277-
if (result.actuallyNeedsBuild) {
1278-
increaseImageBuildsCompletedTotal("failed");
1279-
}
12801276
throw new Error(buildResult.getMessage());
12811277
}
12821278
} catch (err) {
@@ -1352,6 +1348,7 @@ export class WorkspaceStarter {
13521348
`workspace image build failed: ${message}`,
13531349
);
13541350
err = new StartInstanceError("imageBuildFailed", err);
1351+
increaseImageBuildsCompletedTotal("failed");
13551352
}
13561353
this.analytics.track({
13571354
userId: user.id,

0 commit comments

Comments
 (0)