Merge pull request #30813 from overleaf/bg-fix-compile-from-redis

exclude buildId from project state hash

GitOrigin-RevId: da7424378422bec348adeaa5da0fe2d3581744d9
This commit is contained in:
Brian Gough
2026-01-16 15:25:23 +00:00
committed by Copybot
parent ff8f77d85c
commit dbff5ae559
2 changed files with 18 additions and 2 deletions
@@ -47,7 +47,7 @@ export default {
const object = options || {}
for (const key in object) {
const value = object[key]
if (!['isAutoCompile'].includes(key)) {
if (!['isAutoCompile', 'buildId'].includes(key)) {
result.push(`option ${key}:${value}`)
}
}
@@ -18,7 +18,11 @@ describe('ClsiStateManager', function () {
ctx.ClsiStateManager = (await import(modulePath)).default
ctx.project = 'project'
ctx.options = { draft: true, isAutoCompile: false }
ctx.options = {
draft: true,
isAutoCompile: false,
buildId: 'original-build-id',
}
ctx.callback = sinon.stub()
})
@@ -189,5 +193,17 @@ describe('ClsiStateManager', function () {
).to.equal(ctx.hash0)
})
})
describe('when the buildId option is changed', function () {
beforeEach(function (ctx) {
ctx.options.buildId = 'new-build-id'
})
it('should return the same hash value', function (ctx) {
expect(
ctx.ClsiStateManager.computeHash(ctx.project, ctx.options)
).to.equal(ctx.hash0)
})
})
})
})