Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 1.108.0 #15045

Merged
merged 43 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3048568
chore(merge-back): 1.107.0 (#14959)
mergify[bot] Jun 2, 2021
093ebcb
chore: eks -> Otavio, ec2 -> Nick (#14955)
rix0rrr Jun 2, 2021
df16d40
fix(lambda-nodejs): pnpm exec command (#14954)
relm923 Jun 3, 2021
f66f4b8
feat(cli): new bootstrap supports cross-account lookups (#14874)
otaviomacedo Jun 3, 2021
25412a6
fix(apigatewayv2): http api - default route does not use the default …
iRoachie Jun 3, 2021
1ff5b9e
feat(kms): introduce `fromCfnKey()` method (#14859)
skinny85 Jun 3, 2021
da6f2c6
chore: transfer shivlaks ownership to BenChaimberg (#14976)
BenChaimberg Jun 3, 2021
af6d49f
fix(ec2): add missing entry for XLARGE3 (#14750)
cmooreamazon Jun 3, 2021
b35328c
feat(ecs): Adding support for ECS Exec (#14670)
upparekh Jun 3, 2021
a466ba5
docs(aws-glue): catalogID should be described as the AWS account ID (…
Jun 3, 2021
ced9b38
fix(docs): fixed typos in documentation (#14760)
QuercusNemus Jun 3, 2021
cd31457
docs(core): simple typo fix (#14982)
atenni Jun 4, 2021
adf60be
chore(pkglint): v2 CLI package.json cannot have "main" and "types" ke…
skinny85 Jun 4, 2021
a12db62
feat(cognito): user pool - customize mfa message (#14241)
cjihrig Jun 4, 2021
14fbb11
fix(cli): cross account docker image assets upload no longer works (#…
jmortlock Jun 4, 2021
f932e0f
feat(s3): support ExpiredObjectDeleteMarker (#14970)
otaviomacedo Jun 4, 2021
beaffa9
fix(cli): image publishing role doesn't have docker pull permissions …
jogold Jun 4, 2021
d1b6ce4
feat(ec2): Implement UserData methods in MultipartUserData (#14347)
ddneilson Jun 4, 2021
c162b3e
chore(ec2): remove egress rule warning when using allowFrom() (#14677)
jogold Jun 4, 2021
a5d27aa
feat(events): support embedded string variables (#13487)
thantos Jun 4, 2021
3bad98f
fix(events): AwsApi warns if service does not exist (#13352)
mprencipe Jun 4, 2021
213ef38
docs(stepfunctions-tasks): fix typo in EmrClusterScaleDownBehavior de…
SaxyPandaBear Jun 6, 2021
fdab3f4
chore: remove rosetta patch (#15001)
iliapolo Jun 6, 2021
775a0c9
chore: npm-check-updates && yarn upgrade (#15003)
aws-cdk-automation Jun 6, 2021
a37108c
feat: Parameterize bootstrap stack version (#14626)
rabbittsoup Jun 7, 2021
bc01207
feat(custom-resources): support custom lambda role in provider framew…
Ruben-E Jun 7, 2021
6c7c7b5
chore: remove jsdom exclusion on yarn-upgrade (#15005)
iliapolo Jun 7, 2021
f9be15d
fix(s3): `autoDeleteObjects` had redundant `GetObject*` permissions (…
berenddeboer Jun 7, 2021
aee0f58
feat(cfnspec): cloudformation spec v37.1.0 (#14951)
aws-cdk-automation Jun 7, 2021
f0c9726
feat(route-53): add ability to create DS Records (#14726)
Infra-Red Jun 7, 2021
b22da80
feat(route53-targets): route53 record target (#14820)
jogold Jun 7, 2021
486990f
fix(stepfunctions): repeated object references not allowed even if no…
marciocarmona Jun 7, 2021
252dfa2
feat(elb): set accessLoggingPolicy property with L2 LoadBalancer (#14…
ramancloudsmartz Jun 7, 2021
ebac8bc
fix(core): property overrides fail for references (#15018)
skinny85 Jun 8, 2021
7c98fb2
chore(pipelines): added troubleshooting sub-section for the "S3 error…
otaviomacedo Jun 8, 2021
0aea547
docs(lambda-python): recommend lockfiles (#14847)
Jun 8, 2021
8625510
docs(custom-resources): fix dead links (#14989)
rix0rrr Jun 8, 2021
6b2d0e0
fix(ecs): Can't enable both Fargate and ASG capacity providers on ECS…
SoManyHs Jun 9, 2021
c432fb4
feat(ecs-patterns): Add Load Balancer name to ApplicationLoadBalanced…
richardhughes Jun 9, 2021
00c11b5
feat(ecs-patterns): Add support for Docker labels to ECS Patterns (#1…
ABevier Jun 9, 2021
cb87974
chore(release): 1.108.0
Jun 9, 2021
6f123fd
Update breaking changes header
njlynch Jun 9, 2021
4efd095
Removed broken closes link
njlynch Jun 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(stepfunctions): repeated object references not allowed even if no…
…t a circular reference (#14628)

Popping the current node from `visited` array after finishing visiting it in `recurseObject` method. This allows another reference to the same object to happen on a different object path (currently being swallowed).

Created unit test before making any code changes to verify the failure scenario on the expected behavior before fixing it.

fixes #14596 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
marciocarmona authored Jun 7, 2021
commit 486990f9d771779cacb008dfe347a65705146818
15 changes: 10 additions & 5 deletions packages/@aws-cdk/aws-stepfunctions/lib/json-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ interface FieldHandlers {

export function recurseObject(obj: object | undefined, handlers: FieldHandlers, visited: object[] = []): object | undefined {
if (obj === undefined) { return undefined; }
if (visited.includes(obj)) {
return {};
} else {
visited.push(obj);
}

// Avoiding infinite recursion
if (visited.includes(obj)) { return {}; }

// Marking current object as visited for the current recursion path
visited.push(obj);

const ret: any = {};
for (const [key, value] of Object.entries(obj)) {
Expand All @@ -106,6 +107,10 @@ export function recurseObject(obj: object | undefined, handlers: FieldHandlers,
}
}

// Removing from visited after leaving the current recursion path
// Allowing it to be visited again if it's not causing a recursion (circular reference)
visited.pop();

return ret;
}

Expand Down
22 changes: 22 additions & 0 deletions packages/@aws-cdk/aws-stepfunctions/test/fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,26 @@ describe('Fields', () => {
expect(FieldUtils.findReferencedPaths(paths))
.toStrictEqual(['$.listField', '$.numField', '$.stringField']);
});

test('repeated object references at different tree paths should not be considered as recursions', () => {
const repeatedObject = {
field: JsonPath.stringAt('$.stringField'),
numField: JsonPath.numberAt('$.numField'),
};
expect(FieldUtils.renderObject(
{
reference1: repeatedObject,
reference2: repeatedObject,
},
)).toStrictEqual({
reference1: {
'field.$': '$.stringField',
'numField.$': '$.numField',
},
reference2: {
'field.$': '$.stringField',
'numField.$': '$.numField',
},
});
});
});