Skip to content

Commit 9b2c3fd

Browse files
committed
Fix stale naming and default in recompute provider wiring
Rename upgradeAzureQueueConfig/upgradeMemoryQueueConfig import aliases to recomputeAzureQueueConfig/recomputeMemoryQueueConfig in providers/index.ts — these configs provide both upgrade and compute queue factories, so the upgrade-only prefix was misleading. Change the fallback default in bin/config.ts from 'versionCheck' (deprecated alias) to 'onDemand' so a clean deployment with no env var set uses the current non-deprecated value.
1 parent dfb341a commit 9b2c3fd

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

bin/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default {
179179
'recompute.queue'
180180
),
181181
service: loadFactory(
182-
config.get('DEFINITION_RECOMPUTE_PROVIDER') || config.get('DEFINITION_UPGRADE_PROVIDER') || 'versionCheck',
182+
config.get('DEFINITION_RECOMPUTE_PROVIDER') || config.get('DEFINITION_UPGRADE_PROVIDER') || 'onDemand',
183183
'recompute.service'
184184
)
185185
},

providers/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import crawlerConfig from '../providers/harvest/crawlerConfig.ts'
1313
import crawlerQueueConfig from '../providers/harvest/crawlerQueueConfig.ts'
1414
import winstonConfig from '../providers/logging/winstonConfig.ts'
1515
import memoryQueue from '../providers/queueing/memoryQueue.ts'
16-
import upgradeAzureQueueConfig from '../providers/recompute/azureQueueConfig.ts'
17-
import upgradeMemoryQueueConfig from '../providers/recompute/memoryQueueConfig.ts'
16+
import recomputeAzureQueueConfig from '../providers/recompute/azureQueueConfig.ts'
17+
import recomputeMemoryQueueConfig from '../providers/recompute/memoryQueueConfig.ts'
1818
import recomputeHandler from '../providers/recompute/recomputeHandler.ts'
1919
import azureSearchConfig from '../providers/search/azureConfig.ts'
2020
import memorySearch from '../providers/search/memory.ts'
@@ -185,8 +185,8 @@ const providers: Providers = {
185185
},
186186
recompute: {
187187
queue: {
188-
azure: upgradeAzureQueueConfig,
189-
memory: upgradeMemoryQueueConfig
188+
azure: recomputeAzureQueueConfig,
189+
memory: recomputeMemoryQueueConfig
190190
},
191191
service: {
192192
onDemand: recomputeHandler.defaultFactory,

providers/recompute/recomputeHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function getPolicyName(policy: any): string {
106106
}
107107

108108
/**
109-
* Compatibility alias for DEFINITION_UPGRADE_PROVIDER=versionCheck.
109+
* Factory for DEFINITION_RECOMPUTE_PROVIDER=onDemand (alias: versionCheck).
110110
* Only `logger` is used from options; any other properties (e.g. `queue`) are intentionally ignored.
111111
*/
112112
function defaultFactory({ logger }: Pick<DefinitionVersionCheckerOptions, 'logger'> = {}): RecomputeHandler {
@@ -118,7 +118,7 @@ function defaultFactory({ logger }: Pick<DefinitionVersionCheckerOptions, 'logge
118118
}
119119

120120
/**
121-
* Compatibility alias for DEFINITION_UPGRADE_PROVIDER=upgradeQueue.
121+
* Factory for DEFINITION_RECOMPUTE_PROVIDER=delayed (alias: upgradeQueue).
122122
*/
123123
function delayedFactory(options: DelayedFactoryOptions = {}): RecomputeHandler {
124124
const shared = {

0 commit comments

Comments
 (0)