aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

Unused code in MyWidgetServiceStack

Open davidmoten opened this issue 5 years ago • 5 comments
trafficstars

https://github.com/aws-samples/aws-cdk-examples/blob/0612ac04cbfe46831ed4f077b38194d649a8fdea/java/my-widget-service/src/main/java/software/amazon/awscdk/examples/MyWidgetServiceStack.java#L38-L42

The above variable restApiRole is not used anywhere. What's the story?

davidmoten avatar Feb 04 '20 03:02 davidmoten

It’s used here

https://github.com/aws-samples/aws-cdk-examples/blob/0612ac04cbfe46831ed4f077b38194d649a8fdea/java/my-widget-service/src/main/java/software/amazon/awscdk/examples/MyWidgetServiceStack.java#L41

On Feb 3, 2020, at 10:14 PM, Dave Moten [email protected] wrote:

 https://github.com/aws-samples/aws-cdk-examples/blob/0612ac04cbfe46831ed4f077b38194d649a8fdea/java/my-widget-service/src/main/java/software/amazon/awscdk/examples/MyWidgetServiceStack.java#L38-L42

The above variable restApiRole is not used anywhere. What's the story?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rhboyd avatar Feb 04 '20 03:02 rhboyd

My bad. I misread your email and thought you said the variable above RestAPI Role. I assume that someone changed the example from an APIGW service integration to a Lambda Integration and didn’t remove the older parts in the Python or TS examples. When it was translated to Java, those artifacts remained.

Sent from my iPad

On Feb 3, 2020, at 10:14 PM, Dave Moten [email protected] wrote:

 https://github.com/aws-samples/aws-cdk-examples/blob/0612ac04cbfe46831ed4f077b38194d649a8fdea/java/my-widget-service/src/main/java/software/amazon/awscdk/examples/MyWidgetServiceStack.java#L38-L42

The above variable restApiRole is not used anywhere. What's the story?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rhboyd avatar Feb 04 '20 03:02 rhboyd

They probably tried to copy this example, then gave up.

https://github.com/aws-samples/aws-cdk-examples/blob/master/python/my-widget-service/my_widget_service/my_widget_service_stack.py#L23

Sent from my iPad

On Feb 3, 2020, at 10:14 PM, Dave Moten [email protected] wrote:

 https://github.com/aws-samples/aws-cdk-examples/blob/0612ac04cbfe46831ed4f077b38194d649a8fdea/java/my-widget-service/src/main/java/software/amazon/awscdk/examples/MyWidgetServiceStack.java#L38-L42

The above variable restApiRole is not used anywhere. What's the story?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rhboyd avatar Feb 04 '20 04:02 rhboyd

Given that this project is put forward as a official examples, are the examples tested (or just translated and thrown in)?

davidmoten avatar Feb 10 '20 22:02 davidmoten

@davidmoten,

Thank you for the catch. This looks like it warrants a more thorough sweep of the Java examples to ensure they are of an acceptable quality.

Given that this project is put forward as a official examples, are the examples tested (or just translated and thrown in)?

These examples are tested via a CI test suite, but it seems linting is not presently run on the Java examples.

NGL321 avatar May 08 '20 00:05 NGL321

Was fixed

kaiz-io avatar Dec 27 '24 22:12 kaiz-io

⚠️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.

github-actions[bot] avatar Dec 27 '24 22:12 github-actions[bot]