fix(#196, #199): Fix TypeScript errors from race condition and throttler changes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

- Regenerated Prisma client to include version field from #196
- Updated ThrottlerValkeyStorageService to match @nestjs/throttler v6.5 interface
  - increment() now returns ThrottlerStorageRecord with totalHits, timeToExpire, isBlocked
  - Added blockDuration and throttlerName parameters to match interface
- Added null checks for job variable after length checks in coordinator-integration.service.ts
- Fixed template literal type error in ConcurrentUpdateException
- Removed unnecessary await in throttler-storage.service.ts
- Fixes pipeline 79 typecheck failure

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Jason Woltje
2026-02-02 13:31:47 -06:00
parent e808487725
commit a0dc2f798c
3 changed files with 54 additions and 12 deletions

View File

@@ -120,11 +120,14 @@ export class CoordinatorIntegrationService {
FOR UPDATE
`;
if (!jobs || jobs.length === 0) {
if (jobs.length === 0) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
const job = jobs[0];
if (!job) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
// Validate status transition
if (!this.isValidStatusTransition(job.status, dto.status as RunnerJobStatus)) {
@@ -245,11 +248,14 @@ export class CoordinatorIntegrationService {
FOR UPDATE
`;
if (!jobs || jobs.length === 0) {
if (jobs.length === 0) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
const job = jobs[0];
if (!job) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
// Validate status transition
if (!this.isValidStatusTransition(job.status, RunnerJobStatus.COMPLETED)) {
@@ -312,11 +318,14 @@ export class CoordinatorIntegrationService {
FOR UPDATE
`;
if (!jobs || jobs.length === 0) {
if (jobs.length === 0) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
const job = jobs[0];
if (!job) {
throw new NotFoundException(`RunnerJob with ID ${jobId} not found`);
}
// Validate status transition
if (!this.isValidStatusTransition(job.status, RunnerJobStatus.FAILED)) {