Closed brainsiq closed 2 months ago
I cloned the project and think I have managed to determine the cause: https://github.com/DataDog/datadog-ci/blob/d74e427ef5a569569fdd4e4041545bdccb0df4b5/src/commands/stepfunctions/helpers.ts#L96-L98
I believe it will only work when the state machine uses arn:aws:states:::states:startExecution
to execute another state machine, which ensures that after the second assignment the variable still contains true. I think the fix is replacing L98 with:
definitionHasBeenUpdated = definitionHasBeenUpdated || injectContextForStepFunctions(step)
I executed this modified code and it performed the update of the Lambda on the same step function definition. I haven't yet been able to verify that the general feature works when the definition is updated.
@brainsiq It is expected to inject execution context in the payload when the Step Function invokes either Lambda or another Step Function. We are currently working on a fix for the CI.
Bug description
With a trivial step function definition containing only a single Lambda task, running the instrument command with propagate/merge flags does not result in any update of the Lambda payload in the definition.
Describe what you expected
Payload should be replaced with
States.JsonMerge($$, $, false)
Steps to reproduce the issue
Example step function ASL:
Command:
Additional context
OS: Mac OS Sonoma Node version: 20 Datadog-CI version: 2.42.0
Command
stepfunctions instrument