Merge pull request #26813 from acierto/checkpoint-key
Included step name and step id into check point key.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Include step name and step id to checkpoint key
|
||||
@@ -601,11 +601,11 @@ describe('NunjucksWorkflowRunner', () => {
|
||||
return Promise.resolve({
|
||||
state: {
|
||||
checkpoints: {
|
||||
['v1.task.checkpoint.key1']: {
|
||||
['v1.task.checkpoint.test.key1']: {
|
||||
status: 'success',
|
||||
value: 'initial',
|
||||
},
|
||||
['v1.task.checkpoint.key2']: {
|
||||
['v1.task.checkpoint.test2.key2']: {
|
||||
status: 'failed',
|
||||
reason: 'fatal error',
|
||||
},
|
||||
|
||||
@@ -375,7 +375,7 @@ export class NunjucksWorkflowRunner implements WorkflowRunner {
|
||||
keySuffix: string,
|
||||
fn: () => Promise<U>,
|
||||
) {
|
||||
const key = `v1.task.checkpoint.${keySuffix}`;
|
||||
const key = `v1.task.checkpoint.${step.id}.${keySuffix}`;
|
||||
try {
|
||||
let prevValue: U | undefined;
|
||||
if (prevTaskState) {
|
||||
|
||||
Reference in New Issue
Block a user