mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
[clsi] prepare for non-representative clsiServerIds (#34546)
* [clsi] forward instanceType to web * [clsi] expose zone in compile response * [clsi-perf] add new fields for instanceType and zone * [clsi] expose isPreEmptible flag in compile response * [clsi-perf] also add isPreEmptible field * [clsi] rename isPreEmptible -> isSpotInstance GitOrigin-RevId: 2bc2d772e0b14da83afb51f5f3e4fefd3f60b733
This commit is contained in:
@@ -334,6 +334,7 @@ async function _sendBuiltRequest(projectId, userId, req, options) {
|
||||
outputUrlPrefix: compile.outputUrlPrefix,
|
||||
clsiCacheShard: compile.clsiCacheShard,
|
||||
baseHistoryVersion: compile.baseHistoryVersion,
|
||||
instanceType: compile.instanceType,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1287,6 +1288,7 @@ export default {
|
||||
'outputUrlPrefix',
|
||||
'buildId',
|
||||
'clsiCacheShard',
|
||||
'instanceType',
|
||||
]),
|
||||
sendExternalRequest: callbackifyMultiResult(sendExternalRequest, [
|
||||
'status',
|
||||
|
||||
@@ -228,6 +228,7 @@ const _CompileController = {
|
||||
outputUrlPrefix,
|
||||
buildId,
|
||||
clsiCacheShard,
|
||||
instanceType,
|
||||
} = await CompileManager.promises
|
||||
.compile(projectId, userId, options)
|
||||
.catch(error => {
|
||||
@@ -261,8 +262,15 @@ const _CompileController = {
|
||||
status,
|
||||
compileTime: timings?.compileE2E,
|
||||
timeout: limits.timeout,
|
||||
server: clsiServerId?.includes('-c4d-') ? 'faster' : 'normal',
|
||||
server: instanceType
|
||||
? instanceType === 'c4d'
|
||||
? 'faster'
|
||||
: 'normal'
|
||||
: clsiServerId?.includes('-c4d-')
|
||||
? 'faster'
|
||||
: 'normal',
|
||||
clsiServerId,
|
||||
instanceType,
|
||||
isAutoCompile,
|
||||
isInitialCompile: stats?.isInitialCompile === 1,
|
||||
restoredClsiCache: stats?.restoredClsiCache === 1,
|
||||
|
||||
@@ -98,6 +98,7 @@ async function compile(projectId, userId, options = {}) {
|
||||
buildId,
|
||||
clsiCacheShard,
|
||||
baseHistoryVersion,
|
||||
instanceType,
|
||||
} = await ClsiManager.promises.sendRequest(projectId, compileAsUser, options)
|
||||
|
||||
return {
|
||||
@@ -112,6 +113,7 @@ async function compile(projectId, userId, options = {}) {
|
||||
buildId,
|
||||
clsiCacheShard,
|
||||
baseHistoryVersion,
|
||||
instanceType,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,6 +245,7 @@ export default CompileManager = {
|
||||
'outputUrlPrefix',
|
||||
'buildId',
|
||||
'clsiCacheShard',
|
||||
'instanceType',
|
||||
]),
|
||||
|
||||
stopCompile: callbackify(stopCompile),
|
||||
|
||||
Reference in New Issue
Block a user