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

(aws-ecs-patterns): Ostensibly Polymorphic configureAutoscalingForService Method Not Working As Expected #27521

Open
gilday opened this issue Oct 12, 2023 · 1 comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library bug This issue is a bug. p1

Comments

@gilday
Copy link

gilday commented Oct 12, 2023

Describe the bug

In Java, construct QueueProcessingFargateService exposes a protected method configureAutoscalingForService. Ostensible, this access allows subtypes to override the behavior of configureAutoscalingForService, as Java developers would expect. For example:

public class MyQueueProcessingFargateService extends QueueProcessingFargateService {

  public MyQueueProcessingFargateService(Construct scope, String id, QueueProcessingFargateServiceProps props) { super(scope, id, props); }

  @Override
  protected void configureAutoscalingForService(BaseService service) {
    // my logic for configuring autoscaling
  }
}

However, in this example, the MyQueueProcessingFargateService.configureAutoscalingForService method is never called while the super type's configureAutoscalingForService is.

Expected Behavior

Subtypes may override the behavior of configureAutoscalingForService.

Current Behavior

Overridden method is not called.

Reproduction Steps

See example.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.87.0 (build 9fca790)

Framework Version

2.87.0

Node.js Version

v20.8.0

OS

macOS 14.0

Language

Java

Language Version

openjdk version "17.0.8.1" 2023-08-24

Other information

No response

@gilday gilday added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Oct 12, 2023
@khushail khushail changed the title (was-ecs-patterns): Ostensibly Polymorphic configureAutoscalingForService Method Not Working As Expected (aws-ecs-patterns): Ostensibly Polymorphic configureAutoscalingForService Method Not Working As Expected Oct 12, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Oct 12, 2023
@indrora indrora added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2023
@indrora
Copy link
Contributor

indrora commented Oct 19, 2023

Thank you for the report.

@vinayak-kukreja vinayak-kukreja removed the package/tools Related to AWS CDK Tools or CLI label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library bug This issue is a bug. p1
Projects
None yet
Development

No branches or pull requests

3 participants