Gradual rollout of new compile timeout to existing users (#15478)

* Rollout compile timeout to existing users

* Update copy for compile timeout messages

GitOrigin-RevId: bada02efb3fc506ae6e35bdb7871a58ef4295cbe
This commit is contained in:
Thomas
2023-10-30 13:55:07 +01:00
committed by Copybot
parent 221d16f4e4
commit 3cd0cefd30
7 changed files with 137 additions and 54 deletions

View File

@@ -109,8 +109,18 @@ async function joinProject(req, res, next) {
// New users will see a 10s warning and compile fail at 20s
project.showNewCompileTimeoutUI = 'active'
} else {
// Older users aren't limited to 20s, but will see a notice of upcoming changes if compile >20s
project.showNewCompileTimeoutUI = 'changing'
const existingUserTimeoutAssignment =
await SplitTestHandler.promises.getAssignmentForUser(
project.owner._id,
'compile-timeout-20s-existing-users'
)
if (existingUserTimeoutAssignment?.variant === '20s') {
// Older users in treatment see 10s warning and compile fail at 20s
project.showNewCompileTimeoutUI = 'active'
} else {
// Older users in control aren't limited to 20s, but will see a notice of upcoming changes if compile >20s
project.showNewCompileTimeoutUI = 'changing'
}
}
}
}