From ecdbab352ad006852244d14518e670fc70f69cff Mon Sep 17 00:00:00 2001 From: Josh Wulf Date: Thu, 17 Oct 2024 14:31:33 +1300 Subject: [PATCH] fix(sdk-rest): change job.key to job.jobKey for 8.6 patch release --- .vscode/settings.json | 5 +++-- docker/.env | 4 ++-- packages/sdk-rest/source/c8-rest/camunda-job-worker.ts | 6 +++--- packages/sdk-rest/source/c8-rest/camunda-rest-client.ts | 8 ++++---- packages/sdk-rest/source/dto/c8-dto.ts | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0c9568b8..34dbb624 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,8 @@ "operate", "camunda8", "optimize", - "lossless-parser" + "lossless-parser", + "sdk-rest" ], "editor.formatOnSave": true, "xo.enable": true, @@ -26,4 +27,4 @@ "[typescriptreact]": { "editor.defaultFormatter": "samverschueren.linter-xo" } -} +} \ No newline at end of file diff --git a/docker/.env b/docker/.env index d8c8fea0..cfe96bdd 100644 --- a/docker/.env +++ b/docker/.env @@ -2,8 +2,8 @@ # CAMUNDA_CONNECTORS_VERSION=0.23.2 CAMUNDA_CONNECTORS_VERSION=8.6.2 CAMUNDA_OPTIMIZE_VERSION=8.6.0 -CAMUNDA_PLATFORM_VERSION=8.6.0 -CAMUNDA_ZEEBE_VERSION=8.6.0 +CAMUNDA_PLATFORM_VERSION=8.6.1 +CAMUNDA_ZEEBE_VERSION=8.6.3 CAMUNDA_WEB_MODELER_VERSION=8.6.0 ELASTIC_VERSION=8.15.2 KEYCLOAK_SERVER_VERSION=24.0.5 diff --git a/packages/sdk-rest/source/c8-rest/camunda-job-worker.ts b/packages/sdk-rest/source/c8-rest/camunda-job-worker.ts index 2130de49..dde383bc 100644 --- a/packages/sdk-rest/source/c8-rest/camunda-job-worker.ts +++ b/packages/sdk-rest/source/c8-rest/camunda-job-worker.ts @@ -178,10 +178,10 @@ export class CamundaJobWorker< JobCompletionInterfaceRest, ) { try { - this.log.debug(`Invoking job handler for job ${job.key}`, this.logMeta()) + this.log.debug(`Invoking job handler for job ${job.jobKey}`, this.logMeta()) await this.config.jobHandler(job, this.log) this.log.debug( - `Completed job handler for job ${job.key}.`, + `Completed job handler for job ${job.jobKey}.`, this.logMeta(), ) } catch (error) { @@ -189,7 +189,7 @@ export class CamundaJobWorker< if (error instanceof Error) { // If err is an instance of Error, we can safely access its properties this.log.error( - `Unhandled exception in job handler for job ${job.key}`, + `Unhandled exception in job handler for job ${job.jobKey}`, this.logMeta(), ) this.log.error(`Error: ${error.message}`, { diff --git a/packages/sdk-rest/source/c8-rest/camunda-rest-client.ts b/packages/sdk-rest/source/c8-rest/camunda-rest-client.ts index 6eabb2c9..c539bbd9 100644 --- a/packages/sdk-rest/source/c8-rest/camunda-rest-client.ts +++ b/packages/sdk-rest/source/c8-rest/camunda-rest-client.ts @@ -844,25 +844,25 @@ export class CamundaRestClient { }, complete: async (variables: Dto.ProcessVariables = {}) => this.completeJob({ - jobKey: job.key, + jobKey: job.jobKey, variables, }), error: async error => this.errorJob({ ...error, - jobKey: job.key, + jobKey: job.jobKey, }), fail: async failJobRequest => this.failJob({ retries: job.retries - 1, retryBackOff: 0, ...failJobRequest, - jobKey: job.key, + jobKey: job.jobKey, }), /* This has an effect in a Job Worker, decrementing the currently active job count */ forward: () => Dto.jobActionAcknowledgement, modifyJobTimeout: async ({newTimeoutMs}: {newTimeoutMs: number}) => - this.updateJob({jobKey: job.key, timeout: newTimeoutMs}), + this.updateJob({jobKey: job.jobKey, timeout: newTimeoutMs}), }) /** diff --git a/packages/sdk-rest/source/dto/c8-dto.ts b/packages/sdk-rest/source/dto/c8-dto.ts index ced9dfdb..5be6bedb 100644 --- a/packages/sdk-rest/source/dto/c8-dto.ts +++ b/packages/sdk-rest/source/dto/c8-dto.ts @@ -463,7 +463,7 @@ export type Job< CustomHeaderShape = CustomHeaders, > = { /** The key, a unique identifier for the job */ - readonly key: string; + readonly jobKey: string; /** * The job type, as defined in the BPMN process (e.g. )