mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #28346 from overleaf/as-compile-timeout-teardown
[web] Teardown 10s-timeout-enforcement split test GitOrigin-RevId: 56b286539446e7dab371fb1c7392692cabb15db9
This commit is contained in:
@@ -10,7 +10,6 @@ const ClsiManager = require('./ClsiManager')
|
||||
const Metrics = require('@overleaf/metrics')
|
||||
const { RateLimiter } = require('../../infrastructure/RateLimiter')
|
||||
const UserAnalyticsIdCache = require('../Analytics/UserAnalyticsIdCache')
|
||||
const SplitTestHandler = require('../SplitTests/SplitTestHandler')
|
||||
const {
|
||||
callbackify,
|
||||
callbackifyMultiResult,
|
||||
@@ -131,17 +130,6 @@ async function _getProjectCompileLimits(project) {
|
||||
ownerFeatures.compileGroup = 'alpha'
|
||||
}
|
||||
|
||||
if (ownerFeatures.compileTimeout === 20) {
|
||||
const overrideCompileTimeout =
|
||||
await SplitTestHandler.promises.getAssignmentForUser(
|
||||
project.owner_ref,
|
||||
'10s-timeout-enforcement'
|
||||
)
|
||||
|
||||
if (overrideCompileTimeout.variant === 'enabled') {
|
||||
ownerFeatures.compileTimeout = 10
|
||||
}
|
||||
}
|
||||
const analyticsId = await UserAnalyticsIdCache.get(owner._id)
|
||||
|
||||
const compileGroup =
|
||||
|
||||
@@ -783,17 +783,6 @@ const _ProjectController = {
|
||||
isOverleafAssistBundleEnabled &&
|
||||
(await ProjectController._getAddonPrices(req, res))
|
||||
|
||||
const reducedTimeout =
|
||||
await SplitTestHandler.promises.getAssignmentForUser(
|
||||
project.owner_ref,
|
||||
'10s-timeout-enforcement'
|
||||
)
|
||||
|
||||
let compileTimeout = ownerFeatures?.compileTimeout
|
||||
if (compileTimeout === 20 && reducedTimeout.variant === 'enabled') {
|
||||
compileTimeout = 10
|
||||
}
|
||||
|
||||
let planCode = subscription?.planCode
|
||||
if (!planCode && !userInNonIndividualSub) {
|
||||
planCode = 'personal'
|
||||
@@ -899,7 +888,7 @@ const _ProjectController = {
|
||||
customerIoEnabled,
|
||||
addonPrices,
|
||||
compileSettings: {
|
||||
compileTimeout,
|
||||
compileTimeout: ownerFeatures?.compileTimeout,
|
||||
},
|
||||
})
|
||||
timer.done()
|
||||
|
||||
Reference in New Issue
Block a user