-
Notifications
You must be signed in to change notification settings - Fork 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(ecs): adding a circuit breaker causes Service replacement (under feature flag) #22467
Merged
mergify
merged 23 commits into
aws:main
from
fergusdixon:fix/remove-explicit-ecs-deployment-type-for-circuit-breaker
Nov 9, 2022
+2,723
−9
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8464201
Backwards-compatible implementation with tests
51e6b37
update integration test
6c19367
Update packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
fergusdixon 02192e1
create new test
28801f2
revert old snapshot changes
21c3859
implement feature flag, some old integration tests failing
b177682
fix error annotation
5aa23fb
set old integration tests too old behaviour
de2cc2a
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon b2df8de
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon f8daa6d
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon 975c6de
use feature flags in old integ tests
d22be52
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon d2bcfa4
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon 3723d3e
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
fergusdixon 66f2036
remove useExplicitEcsDeploymentController option to only rely on feat…
0a4a8a0
add snapshot
552e5e8
remove old snapshot
deb9800
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
94117ee
add auto-built readme line
2f72339
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
1500b74
rebuild feature flags
f65b647
Merge branch 'main' into fix/remove-explicit-ecs-deployment-type-for-…
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
Co-authored-by: Jamie Schenker <jam1esch3nk3r@gmail.com>
- Loading branch information
commit 6c19367a8fde5dab1c6232a0578343537e81dbe3
There are no files selected for viewing
This file contains 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
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.
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.
@fergusdixon I've been thinking about this and as much as a don't want to introduce a new feature flag I think that's the best thing to do here. We want the new default behavior to be
false
and a feature flag is the only way to accomplish that.https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#feature-flags
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.
Sure will give it a bash next week, thanks!
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.
@corymhall I have a working implementation with the flag, however I'm struggling to see this to
false
in the integration tests specifically. Should the integration tests cover new or old behaviour (I would imagine both), however I cant seem to set the feature flag value the same way as the unit tests do?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 seems the integ-helper sets all feature flags to
FUTURE_FLAGS
(new behaviour), and this takes precedence over thecontext
prop passed toApp
in the test. So from this it seems integration tests should test new behaviour and unit tests for both?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.
If you want to test the old behavior you can use the postCliContext parameter on
App
.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.
Have done, worked a charm, thanks @corymhall!
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 really want to ship this, but this property is giving me pause. I really don't see the need for it.
I think we can do without this, no?
Other than that, this is great!
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.
Just to cross-check "the need for the 'correct' default after this PR is merged": Now with current CDKv2 versions today, CFN output always has an ECS DeploymentController defined, if you have an CircuitBreaker enabled (even if you not aware as CDK user).
Once a stack has an ECS DeploymentController definied (= all stack build by CDK with CircuitBreaker enabled), you are not able to simply "remove this CFN-lines from JSON output" - If a new/upcoming CDK version would start to not output ECS DeploymentController (by default) to JSON, all existing Services of existing Stacks would run into a replacement - Just because you update your CDK version.
As I understood the current code from Fergus, this default = true would remain the same behaviour as older CDKv2 version, right? - From my point of view that, it's an important brick, isn't it?