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-cdk/aws-appmesh] AppMesh Stable Changes #9490

Closed
MrArnoldPalmer opened this issue Aug 6, 2020 · 11 comments · Fixed by #11978
Closed

[@aws-cdk/aws-appmesh] AppMesh Stable Changes #9490

MrArnoldPalmer opened this issue Aug 6, 2020 · 11 comments · Fixed by #11978
Assignees
Labels
@aws-cdk/aws-appmesh Related to AWS App Mesh bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Milestone

Comments

@MrArnoldPalmer
Copy link
Contributor

MrArnoldPalmer commented Aug 6, 2020

AppMesh API Revisions

  1. Currently VirtualNode defaults the value of the logging file path parameter to /dev/stdout and is not configurable through the construct's props. Remove this default and allow customers to configure log location for their specific use case.

  2. Change addListeners method signature to not be variadic since VirtualNode only has one listener. Depending on Feature Request: Add support for multiple listeners on Virtual Node and Virtual Router aws-app-mesh-roadmap#120 we may or may not actually want to change this API.

  3. Change model so that VirtualService always uses mesh from either router or node and requires mesh property to exist on VirtualRouter and VirtualNode for importing. VirtualNode and VirtualRouter always have to be in same mesh as VirtualService.


This is 🐛 Bug Report

@MrArnoldPalmer MrArnoldPalmer added bug This issue is a bug. p2 effort/small Small work item – less than a day of effort needs-triage This issue or PR still needs to be triaged. @aws-cdk/aws-appmesh Related to AWS App Mesh labels Aug 6, 2020
@MrArnoldPalmer MrArnoldPalmer self-assigned this Aug 6, 2020
@MrArnoldPalmer MrArnoldPalmer changed the title [@aws-cdk/aws-appmesh] VirtualNode logging configuration support [@aws-cdk/aws-appmesh] VirtualNode Revisions Aug 6, 2020
@MrArnoldPalmer MrArnoldPalmer changed the title [@aws-cdk/aws-appmesh] VirtualNode Revisions [@aws-cdk/aws-appmesh] AppMesh Stable Changes Aug 6, 2020
@MrArnoldPalmer MrArnoldPalmer removed the needs-triage This issue or PR still needs to be triaged. label Aug 6, 2020
@SomayaB SomayaB assigned skinny85 and unassigned MrArnoldPalmer Aug 20, 2020
mergify bot pushed a commit that referenced this issue Sep 30, 2020
…#10490)

Addresses the first point on #9490 by allow access logging to be configured through props

1. Introduces a new `AccessLog` shared-interface as it can be reused in Virtual Gateways and Virtual Nodes
1. Removes the default access logging to stdout in Virtual Nodes and allows it to be configured via props

BREAKING CHANGE: VirtualNode no longer has accessLog set to "/dev/stdout" by default

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@dfezzie
Copy link
Contributor

dfezzie commented Nov 23, 2020

There has been work on this issue so I am providing an update

  1. This is now configurable and no longer defaulted
  2. This is the intended behavior. App Mesh has a feature request to support multiple listeners:
  3. VirtualService is required to have the mesh property when importing. The proposal to ensure the targets of the VS are in the same mesh is valid. This could also be applied for the backends of VirtualNodes and targets of VirtualGateway routes.

@skinny85
Copy link
Contributor

skinny85 commented Nov 23, 2020

For 2., we actually did change addListeners() - we renamed it addListener(), moved it to VirtualNode (from IVirtualNode), and it also now takes a single VirtualNodeListener as the argument. So I think we can call that "done" 🙂.

@skinny85
Copy link
Contributor

For 3., with your recent changes @dfezzie , both IVirtualRouter and IVirtualNode now allow retrieving the Mesh they belong to. Given that, I wonder if forcing providing the same Mesh again when creating a new VirtualService (not importing one, as providing a Mesh there makes perfect sense) is a good experience.

Additionally, I'm not crazy about the "one of virtualRouter or virtualNode is required" when creating a new VirtualService. Perhaps this is another place to use the union-like pattern? @dfezzie what do you think?

@dfezzie
Copy link
Contributor

dfezzie commented Nov 24, 2020

Ah good call on 2. That is complete 😄

For 3, I think adding that enforcement is valid and would prevent customers misconfiguring their mesh. If it makes sense in terms of CDK API design we could easily implement it.

I agree on the switching the VirtualService to using a union type for the provider. I just took a quick look and we are also doing something similar for VirtualNode service discovery where we accept CloudMap and DNS at the top level. We should change that as well!

@skinny85
Copy link
Contributor

Before I forget, if we're going to make the changes to VirtualService to use a union-like class, I would also remove the addVirtualService() method from IMesh, and probably add addVirtualService() to both IVirtualRouter and IVirtualNode.

@dfezzie
Copy link
Contributor

dfezzie commented Dec 10, 2020

Before I forget, if we're going to make the changes to VirtualService to use a union-like class, I would also remove the addVirtualService() method from IMesh, and probably add addVirtualService() to both IVirtualRouter and IVirtualNode.

I don't think removing the addVirtualService() from IMesh and adding it to IVirtualRouter and IVirtualNode is necessary. You can define a IVirtualService without a provider and you can have IVirtualRouter and IVirtualNode without an associated IVirtualService. I think simply adding the union-class would suffice to make the class more ergonomic.

mergify bot pushed a commit that referenced this issue Dec 10, 2020
…class (#11926)

Addresses part of the conversation on #9490

BREAKING CHANGE: the properties `dnsHostName` and `awsCloudMap` of `VirtualNodeProps` have been replaced with the property `serviceDiscovery`

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@skinny85
Copy link
Contributor

You can define a IVirtualService without a provider

Hmm, I thought providing one of VirtualNode or VirtualRouter was actually required. This complicates things a tiny bit then 😜.

How about we have 3 options in the union-like class for the provider in IVirtualService: one taking a IVirtualNode, one taking a IVirtualRouter, and the third one just taking in an IMesh?

This way, we can have the addVirtualService() method on all 3 of IMesh, IVirtualNode and IVirtualRouter.

How does this sound @dfezzie ? 🙂

flochaz pushed a commit to flochaz/aws-cdk that referenced this issue Jan 5, 2021
…class (aws#11926)

Addresses part of the conversation on aws#9490

BREAKING CHANGE: the properties `dnsHostName` and `awsCloudMap` of `VirtualNodeProps` have been replaced with the property `serviceDiscovery`

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@dfezzie
Copy link
Contributor

dfezzie commented Jan 21, 2021

You can define a IVirtualService without a provider

Hmm, I thought providing one of VirtualNode or VirtualRouter was actually required. This complicates things a tiny bit then 😜.

How about we have 3 options in the union-like class for the provider in IVirtualService: one taking a IVirtualNode, one taking a IVirtualRouter, and the third one just taking in an IMesh?

This way, we can have the addVirtualService() method on all 3 of IMesh, IVirtualNode and IVirtualRouter.

How does this sound @dfezzie ? 🙂

So, I've been thinking about this. I think having addVirtualService methods on IVirtualNode and IVirtualRouter is semantically awkward. I like to think of a Virtual Service as the abstraction of the "Service" that other teams would interact with. You would start with a Virtual Service as the entry point into a microservice infrastructure and that would not change. The provider behind it on the other hand would be mutable as you may swap from one Virtual Node to another, or add routes to your Virtual Router.

@skinny85
Copy link
Contributor

@dfezzie I have no problem with that. It just seemed like an easy set of methods that we could get basically for free. But if they don't fit the model of the service, that's fine 🙂.

Does the same comment apply to addVirtualService() in IMesh, or is that different?

@dfezzie
Copy link
Contributor

dfezzie commented Jan 21, 2021

Adding a Virtual Service to the mesh is appropriate. The mesh is a container for the other subresources so it makes sense to have the utility method there

@mergify mergify bot closed this as completed in #11978 Jan 28, 2021
mergify bot pushed a commit that referenced this issue Jan 28, 2021
…11978)

Fixes #9490

BREAKING CHANGE: the properties virtualRouter and virtualNode of VirtualServiceProps have been replaced with the union-like class VirtualServiceProvider 
* **appmesh**: the method `addVirtualService` has been removed from `IMesh`

----

*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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appmesh Related to AWS App Mesh bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants