Skip to content

Commit

Permalink
fix(sdk-rest): change job.key to job.jobKey for 8.6 patch release
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Oct 17, 2024
1 parent bca9446 commit ecdbab3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"operate",
"camunda8",
"optimize",
"lossless-parser"
"lossless-parser",
"sdk-rest"
],
"editor.formatOnSave": true,
"xo.enable": true,
Expand All @@ -26,4 +27,4 @@
"[typescriptreact]": {
"editor.defaultFormatter": "samverschueren.linter-xo"
}
}
}
4 changes: 2 additions & 2 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk-rest/source/c8-rest/camunda-job-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,18 @@ export class CamundaJobWorker<
JobCompletionInterfaceRest<ProcessVariables>,
) {
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) {
/** Unhandled exception in the job handler */
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}`, {
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk-rest/source/c8-rest/camunda-rest-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}),
})

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-rest/source/dto/c8-dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. <zeebe:taskDefinition
* type="payment-service" />)
Expand Down

0 comments on commit ecdbab3

Please sign in to comment.