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

fix(ecs): get rid of EFS casing warnings #19681

Merged
merged 2 commits into from
Apr 6, 2022
Merged

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 1, 2022

About a year ago, ECS TaskDefinition handler changed the casing of some
EFS-related properties:

  • EfsVolumeConfiguration -> EFSVolumeConfiguration
  • FileSystemId -> FilesystemId

They continue to accept both casings, but emit a warning when the
deprecated casing is used. When the new casing was introduced, we
reverted to the old casing in order to not cause resource replacements.

However:

  • The old casings emit warnings; when the service/task creation fails
    due to unrelated reasons, users see the warnings, interpret them as
    errors, then stop looking and come and tell us that there is a bug
    in CDK.
  • Task definition replacement isn't actually a problem. Task definitions
    can be replaced for something as trivial as changing CPU count or
    memory size. Replacing them for a change that is effectively a no-op
    shouldn't matter. Yes, this will restart Services based on these
    Task Definitions, but if you are only running 1 copy of the Task
    you have made the decision not to care about potential downtime of
    your service.

Maintaining the patch does not seem worth the cost/benefit ratio.

Reverts #10483, closes #15025.


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use cdk-integ to deploy the infrastructure and generate the snapshot (i.e. cdk-integ without --dry-run)?

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

About a year ago, ECS TaskDefinition handler changed the casing of some
EFS-related properties:

* `EfsVolumeConfiguration` -> `EFSVolumeConfiguration`
* `FileSystemId` -> `FilesystemId`

They continue to accept both casings, but emit a warning when the
deprecated casing is used. When the new casing was introduced, we
reverted to the old casing in order to not cause resource replacements.

However:

- The old casings emit warnings; when the service/task creation fails
  due to unrelated reasons, users see the warnings, interpret them as
  errors, then stop looking and come and tell us that there is a bug
  in CDK.
- Task definition replacement isn't actually a problem. Task definitions
  can be replaced for something as trivial as changing CPU count or
  memory size. Replacing them for a change that is effectively a no-op
  shouldn't matter. Yes, this will restart `Service`s based on these
  Task Definitions, but if you are only running 1 copy of the Task
  you have made the decision not to care about potential downtime of
  your service.

Maintaining the patch does not seem worth the cost/benefit ratio.

Reverts #10483, closes #15025.
@rix0rrr rix0rrr requested a review from a team April 1, 2022 12:30
@rix0rrr rix0rrr self-assigned this Apr 1, 2022
@gitpod-io
Copy link

gitpod-io bot commented Apr 1, 2022

@github-actions github-actions bot added bug This issue is a bug. p2 labels Apr 1, 2022
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Apr 1, 2022

I'd like @iliapolo to confirm that I didn't overlook anything about the task replacement (given he originally introduced this patch).

Also @MrArnoldPalmer mentions in this comment that the change was breaking because users would need to change their code. As far as I can tell, all the changes are hidden in our code?

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 1, 2022
@rix0rrr rix0rrr added the pr/requires-two-approvers This PR is critical (e.g., security, broadly-impacting) and requires 2 approvers to be merged. label Apr 1, 2022
@iliapolo
Copy link
Contributor

iliapolo commented Apr 4, 2022

@rix0rrr

I'd like @iliapolo to confirm that I didn't overlook anything about the task replacement (given he originally introduced this patch).

I don't think you overlooked anything.

Also @MrArnoldPalmer mentions #15025 (comment) that the change was breaking because users would need to change their code. As far as I can tell, all the changes are hidden in our code?

The L2 code won't have to change, but if people are using the L1's, it will break.

However given the mess and confusion this creates, I think its worth just taking the hit here 👍

@rix0rrr rix0rrr removed the pr/requires-two-approvers This PR is critical (e.g., security, broadly-impacting) and requires 2 approvers to be merged. label Apr 6, 2022
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Apr 6, 2022

@iliapolo mind following that approval up with an actual approval? 😉

@mergify
Copy link
Contributor

mergify bot commented Apr 6, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 54e340d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit eafc11a into master Apr 6, 2022
@mergify mergify bot deleted the huijbers/revert-ecs-efs branch April 6, 2022 09:24
@mergify
Copy link
Contributor

mergify bot commented Apr 6, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
About a year ago, ECS TaskDefinition handler changed the casing of some
EFS-related properties:

* `EfsVolumeConfiguration` -> `EFSVolumeConfiguration`
* `FileSystemId` -> `FilesystemId`

They continue to accept both casings, but emit a warning when the
deprecated casing is used. When the new casing was introduced, we
reverted to the old casing in order to not cause resource replacements.

However:

- The old casings emit warnings; when the service/task creation fails
  due to unrelated reasons, users see the warnings, interpret them as
  errors, then stop looking and come and tell us that there is a bug
  in CDK.
- Task definition replacement isn't actually a problem. Task definitions
  can be replaced for something as trivial as changing CPU count or
  memory size. Replacing them for a change that is effectively a no-op
  shouldn't matter. Yes, this will restart `Service`s based on these
  Task Definitions, but if you are only running 1 copy of the Task
  you have made the decision not to care about potential downtime of
  your service.

Maintaining the patch does not seem worth the cost/benefit ratio.

Reverts aws#10483, closes aws#15025.


----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-ecs: wrong cfnspec for EFS volume configuration (casing issue)
3 participants