fix: Changing Scope of Log Group Lookup in DatadogStepFunctions construct - #683
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intoAug 21, 2026
Conversation
…unctions construct
…ng log groups Covers #666 — addStateMachines() previously threw a construct-id collision when called for a second state machine with a pre-defined log group, because the log group lookup was scoped to the shared DatadogStepFunctions construct instead of the state machine. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ava-silver
approved these changes
Aug 21, 2026
gh-worker-dd-mergequeue-cf854d
Bot
merged commit Aug 21, 2026
e473495
into
main
13 of 14 checks passed
gh-worker-dd-mergequeue-cf854d
Bot
deleted the
fix-scope-for-statemachine-log-groups
branch
August 21, 2026 14:52
TalUsvyatsky
added a commit
that referenced
this pull request
Aug 21, 2026
This release includes the following commits: e473495 fix: Changing Scope of Log Group Lookup in DatadogStepFunctions construct (#683) 4e8b86b chore: fix release script (#682) 66aad81 fix(deps): vuln aws-cdk-lib (minor → 2.265.0) [examples/step-functions-typescript-stack] (#672) a0aa8c6 ADMS: vuln minor: github.com/aws/aws-cdk-go/awscdk/v2, golang.org/x/mod [examples/step-functions-go-stack] (#678) 86ef10e ADMS: vuln aws-cdk-lib (minor → 2.265.0) [examples/typescript-stack] (#675)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #666.
This updates the scope of the log group lookup in
DatadogStepFunctionsto be consistent with the scope of a newly-created log group in the same construct. Previously, newly-created log groups used the state machine as their scope while lookups used theDatadogStepFunctionsconstruct itself. This caused a construct-id collision ("There is already a Construct with name 'LogGroup' in DatadogStepFunctions.") whenaddStateMachineswas called for more than one state machine that had a pre-defined log group.Adds unit tests to #667, opened by @mjdean94, which contains the original one-line fix (
4066d28/eabe05cafter rebase). This PR keeps that fix commit as-is and adds a regression unit test on top, then runs it through this repo's full CI (including integration tests), which fork PRs cannot trigger sincetests.ymlonly runs onpush.Testing Guidelines
Added a unit test in
test/datadog-step-functions.spec.tsthat creates two state machines, each with its own pre-defined log group, and callsaddStateMachinesfor each on the sameDatadogStepFunctionsconstruct. Verified locally that this test fails against the pre-fix scoping and passes with the fix.Types of Changes
Check all that apply
Closes #667