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

feat(appmesh): change Route's spec to a union-like class #11343

Merged
merged 12 commits into from
Nov 19, 2020

Conversation

dfezzie
Copy link
Contributor

@dfezzie dfezzie commented Nov 6, 2020

Implements the same pattern GatewayRoutes use for defining protocol specific specs.

Adds GRPC and HTTP2 support to Routes which will resolve #9755

BREAKING CHANGE: changes Route's spec to a union-like class. RouteSpec is now defined using protocol variant static methods


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Nov 6, 2020

Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Couple of notes.

You're also missing a BREAKING CHANGE in your PR description.

packages/@aws-cdk/aws-appmesh/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/lib/route-spec.ts Outdated Show resolved Hide resolved
Comment on lines 139 to 144
abstract readonly weightedTargets: WeightedTarget[];

/**
* The priority for the route. Routes are matched based on the specified value, where 0 is the highest priority
*/
abstract readonly priority?: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we exposing these - I don't see them used in Route...? I think we only need bind() in this class, no?

We should strive to minimize the public API surface as much as we can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this field makes a bit more sense once we implement header based routing for HTTP.

Essentially it is used to disambiguate when a request matches multiple routes. I'll remove for this PR and we can add it back later!

packages/@aws-cdk/aws-appmesh/lib/route-spec.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/test/test.route.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed skinny85’s stale review November 18, 2020 05:36

Pull request has been modified.

@skinny85 skinny85 changed the title feat(appmesh): changes Route's spec to a union-like class feat(appmesh): change Route's spec to a union-like class Nov 19, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Some minor comments.

packages/@aws-cdk/aws-appmesh/lib/route-spec.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/lib/route-spec.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/lib/route-spec.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed skinny85’s stale review November 19, 2020 04:18

Pull request has been modified.

Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fantastic, thanks @dfezzie !

@mergify
Copy link
Contributor

mergify bot commented Nov 19, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 7b8521d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Nov 19, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit f0de91f into aws:master Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-appmesh] Cannot create gRPC or HTTP/2 routes for Virtual Router
3 participants