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

‼️ (codedeploy): ServerDeploymentConfig Type Error in java #22566

Closed
mikeamzn opened this issue Oct 19, 2022 · 1 comment · Fixed by #22567
Closed

‼️ (codedeploy): ServerDeploymentConfig Type Error in java #22566

mikeamzn opened this issue Oct 19, 2022 · 1 comment · Fixed by #22567
Assignees
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

@mikeamzn
Copy link

mikeamzn commented Oct 19, 2022

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

@mikeamzn mikeamzn added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2022
@github-actions github-actions bot added the @aws-cdk/aws-codedeploy Related to AWS CodeDeploy label Oct 19, 2022
@kaizencc kaizencc added p0 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2022
@kaizencc kaizencc changed the title aws-cdk: ServerDeploymentConfig Type Error (codedeploy): ServerDeploymentConfig Type Error in java Oct 19, 2022
@kaizencc kaizencc pinned this issue Oct 19, 2022
@kaizencc kaizencc changed the title (codedeploy): ServerDeploymentConfig Type Error in java ‼️ (codedeploy): ServerDeploymentConfig Type Error in java Oct 19, 2022
@mergify mergify bot closed this as completed in #22567 Oct 20, 2022
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*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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*
@TheRealAmazonKendra TheRealAmazonKendra unpinned this issue Nov 21, 2022
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants