-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: fix bug in custom DeploymentPreference feature #966
Conversation
The work required was actually smaller for this bug than I thought. This should fix this feature and allow the release to go out. |
}, | ||
"DeploymentConfigName": { | ||
"Fn::Sub": [ | ||
"CodeDeployDefault.Lambda${ConfigName}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example of the "Sub nested in Sub" case that the code explicitly fixes.
Codecov Report
@@ Coverage Diff @@
## release/v1.12.0 #966 +/- ##
===================================================
+ Coverage 94.66% 94.68% +0.02%
===================================================
Files 69 69
Lines 3018 3030 +12
Branches 562 564 +2
===================================================
+ Hits 2857 2869 +12
Misses 85 85
Partials 76 76
Continue to review full report at Codecov.
|
return value | ||
else: | ||
if value in CODEDEPLOY_PREDEFINED_CONFIGURATIONS_LIST: | ||
print(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
return value | ||
else: | ||
if value in CODEDEPLOY_PREDEFINED_CONFIGURATIONS_LIST: | ||
print(key) | ||
if key == "Fn::Sub": # Don't nest a "Sub" in a "Sub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this means. Could you add a clearer comment? Also, what about !Sub
? Or has it been transformed into Fn::Sub at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been transformed to Fn::Sub at this point.
CfnLint error:
[E1019: Sub validation of parameters] (Sub should be a string or array of 2 items for Resources/CustomWithCondition2DeploymentGroup/Properties/DeploymentConfigName/Fn::If/1/Fn::Sub)
It was doing the following:
"Fn::Sub": {
"Fn::Sub": [
"CodeDeployDefault.Lambda${ConfigName}",
{
"ConfigName": "AllAtOnce"
}
]
}
Issue #, if available:
N/A
Description of changes:
Supports
Fn::FindInMap
and other intrinsics for the new custom CodeDeploy configurations featureDescription of how you validated changes:
Tests updated and pass
Checklist:
make pr
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.