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

feat(ecs): support ecs tag propagation and ecs managed tags #3420

Merged
merged 28 commits into from
Aug 23, 2019

Conversation

iamhopaul123
Copy link
Contributor

@iamhopaul123 iamhopaul123 commented Jul 24, 2019

Add two properties for ECS Service to support ECS tag propagation and ECS managed tags.

Please read the contribution guidelines and follow the pull-request checklist.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@iamhopaul123 iamhopaul123 requested a review from a team as a code owner July 24, 2019 19:36
@iamhopaul123
Copy link
Contributor Author

iamhopaul123 commented Jul 24, 2019

@pkandasamy91 please review

@piradeepk
Copy link
Contributor

@iamhopaul123 looks like the integration tests need to be updated as well.

Copy link
Contributor

@piradeepk piradeepk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests to verify that this works as expected and update integration tests to reflect this change.

packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts Outdated Show resolved Hide resolved
@iamhopaul123
Copy link
Contributor Author

@iamhopaul123 looks like the integration tests need to be updated as well.

@iamhopaul123 Please add unit tests to verify that this works as expected and update integration tests to reflect this change.

Done!

Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to introduce behavior-breaking changes, which is undesirable. We can discuss whether this has the potential to actually break users, or if the new behavior is functionally compatible, but my instinct right now is that we should preserve the current behavior.

Also, I couldn't find documentation for the CFN properties that you are now wiring, so I couldn't assess the validity of certain default behaviors (but I suspect they're not what I'll want, because they turn into breaking behavior).

packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
@@ -41,6 +41,8 @@ export = {
DesiredCount: 1,
LaunchType: LaunchType.FARGATE,
LoadBalancers: [],
EnableECSManagedTags: true,
PropagateTags: PropagateTagsFromType.SERVICE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact you had to introduce these means you're making a breaking change. We don't want that.

@iamhopaul123
Copy link
Contributor Author

iamhopaul123 commented Jul 26, 2019

@RomainMuller after talking with my teammates, we think that it would not be causing breaking changes for adding default values for those two Service properties. Because from the customers' perspective they don't have a reason for not needing those ECS managed tag. However, we agree we should add "no_propagate" option for those who don't want to propagate tags to tasks.

@iamhopaul123 iamhopaul123 force-pushed the tag_ecs branch 2 times, most recently from 87207a7 to 23f5b2e Compare July 29, 2019 23:00
piradeepk
piradeepk previously approved these changes Aug 6, 2019
@piradeepk
Copy link
Contributor

@eladb do you have any thoughts on this? Should this be considered a breaking change?

@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2019

Pull Request Checklist

  • Testing
  • Unit test added (prefer to add a new test rather than modify existing tests)
  • CLI change? Re-run/add CLI integration tests
  • Documentation
  • Inline docs: make sure all public APIs are documented (copy & paste from official AWS docs)
  • README: update module README
  • Design: for significant features, follow the design process
  • Title uses the format type(scope): text
  • Type: fix, feat, refactor go into CHANGELOG, chore is hidden
  • Scope: name of the module without the aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
  • Style: use all lower-case, do not end with a period
  • Description
  • Rationale: describe rationale of change and approach taken
  • Issues: Indicate issues fixed via: fixes #xxx or closes #xxx
  • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Sensitive Modules (requires 2 PR approvers)
  • IAM document library (in @aws-cdk/aws-iam)
  • EC2 security groups and ACLs (in @aws-cdk/aws-ec2)
  • Grant APIs (if not based on official documentation with a reference)

@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2019

Pull Request Checklist

  • Testing
  • Unit test added (prefer to add a new test rather than modify existing tests)
  • CLI change? Re-run/add CLI integration tests
  • Documentation
  • Inline docs: make sure all public APIs are documented (copy & paste from official AWS docs)
  • README: update module README
  • Design: for significant features, follow the design process
  • Title uses the format type(scope): text
  • Type: fix, feat, refactor go into CHANGELOG, chore is hidden
  • Scope: name of the module without the aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
  • Style: use all lower-case, do not end with a period
  • Description
  • Rationale: describe rationale of change and approach taken
  • Issues: Indicate issues fixed via: fixes #xxx or closes #xxx
  • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Sensitive Modules (requires 2 PR approvers)
  • IAM document library (in @aws-cdk/aws-iam)
  • EC2 security groups and ACLs (in @aws-cdk/aws-ec2)
  • Grant APIs (if not based on official documentation with a reference)

@mergify mergify bot dismissed stale reviews from piradeepk and RomainMuller August 19, 2019 20:23

Pull request has been modified.

Copy link
Contributor

@piradeepk piradeepk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, had a couple comments.

packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ecs/lib/base/base-service.ts Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2019

Codebuild (Continuous Integration) build failed for current commits. Please check log and resolve before PR is merged.

@piradeepk
Copy link
Contributor

Tests are failing, try to remove the empty ServiceRegistries and LoadBalancers properties. I think it's related to an error in resolving the merge conflicts.

@piradeepk piradeepk removed the request for review from skinny85 August 22, 2019 22:02
@mergify mergify bot dismissed piradeepk’s stale review August 22, 2019 22:24

Pull request has been modified.

@mergify mergify bot dismissed piradeepk’s stale review August 22, 2019 22:52

Pull request has been modified.

@piradeepk piradeepk changed the title feat(ecs): support ECS tag propagation and ECS managed tags feat(ecs): support ecs tag propagation and ecs managed tags Aug 23, 2019
Copy link
Contributor

@piradeepk piradeepk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2019

Thank you for contributing! Your pull request is now being automatically merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants