-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
‼️ (codedeploy): ServerDeploymentConfig Type Error in java #22566
Labels
@aws-cdk/aws-codedeploy
Related to AWS CodeDeploy
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p0
Comments
4 tasks
mergify bot
pushed a commit
that referenced
this issue
Oct 20, 2022
Change all `deploymentConfig` static method implementations on `EcsDeploymentConfig`, `LambdaDeploymentConfig`, and `ServerDeploymentConfig` to return their corresponding specific interfaces instead of `IBaseDeploymentConfig`. This reverts breaking changes to Java users introduced in #22159 Fixes #22566 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn 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*
|
madeline-k
pushed a commit
that referenced
this issue
Oct 21, 2022
Change all `deploymentConfig` static method implementations on `EcsDeploymentConfig`, `LambdaDeploymentConfig`, and `ServerDeploymentConfig` to return their corresponding specific interfaces instead of `IBaseDeploymentConfig`. This reverts breaking changes to Java users introduced in #22159 Fixes #22566 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn 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*
mrgrain
pushed a commit
to mrgrain/aws-cdk
that referenced
this issue
Oct 24, 2022
Change all `deploymentConfig` static method implementations on `EcsDeploymentConfig`, `LambdaDeploymentConfig`, and `ServerDeploymentConfig` to return their corresponding specific interfaces instead of `IBaseDeploymentConfig`. This reverts breaking changes to Java users introduced in aws#22159 Fixes aws#22566 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/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/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn 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
@aws-cdk/aws-codedeploy
Related to AWS CodeDeploy
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p0
Please add your +1 👍 to let us know you have encountered this
Status: Will be fixed as a part of 2.47.0
Overview:
In Java, using ServerDeploymentConfig.ONE_AT_A_TIME with ServerDeploymentGroupProps results in a type error.
Workaround:
The current workaround is to stay on 2.44.0.
[Original Issue]
Describe the bug
Using ServerDeploymentConfig.ONE_AT_A_TIME with ServerDeploymentGroupProps results in a type error.
The DeploymentConfig Property expects a type of IServerDeploymentConfig, but the static enums in ServerDeploymentConfig where changed to be typed as IBaseDeploymentConfig
I observed this bug in the latest release of the Java CDK bindings.
Expected Behavior
I expect
ServerDeploymentGroupProps.builder().deploymentConfig(ServerDeploymentConfig.ONE_AT_A_TIME)
to not result in a type error as it was working in 2.44.0, but became broken in 2.45.0.Current Behavior
Using
ServerDeploymentGroupProps.builder().deploymentConfig(ServerDeploymentConfig.ONE_AT_A_TIME)
in Java results in a type error.Reproduction Steps
Install latest CDK, try to create a ServerDeploymentGroupProps.builder() instance and pass ServerDeploymentConfig.ONE_AT_A_TIME to the deploymentConfig method.
This also impacts LambdaDeploymentGroup.builder(), and I imagine others.
Possible Solution
I think the issue stems from these lines 6840d8e#diff-93f73231716deb0056687ee155c13d03ccabe2222fd191a33be9caeb7ad87ebaL82-L85 that used to call 6840d8e#diff-93f73231716deb0056687ee155c13d03ccabe2222fd191a33be9caeb7ad87ebaL126-L131 that had the correct type.
However now 6840d8e#diff-93f73231716deb0056687ee155c13d03ccabe2222fd191a33be9caeb7ad87ebaR36 calls 6840d8e#diff-40567274e0d0eeca9055e6d9bce3a1c5b325045f8e21f14e60f08076eebdd061R118 which has the incorrect type.
Additional Information/Context
No response
CDK CLI Version
2.45.0
Framework Version
No response
Node.js Version
14.20
OS
Amazon Linux 2
Language
Java
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: