Skip to content

Commit 144cc8b

Browse files
authored
chore(vpcv2): fix doc issue due to IRoute (#31464)
### Issue # (if applicable) Closes #NA. ### Reason for this change Fixes the doc job build failure for python docs failing with the error in main pipeline ``` TypeError: Cannot create a consistent method resolution order (MRO) for bases IConstruct, IResource, Protocol ``` Issue seemed to have been occured due to IRoute interface extending both IConstruct and IResource, we don't need it as `IResource` already extends `IConstruct` and `IConstruct` extends `IDependable`. ### Description of changes Renamed `IRoute` to `IRouteV2`(as previous release) , we already have an interface in the main lib with name [`IRoute`](https://github.com/aws/aws-cdk/blob/33eea3f7f2e832d63dc2c1823c56f5e235c80076/packages/aws-cdk-lib/aws-apigatewayv2/lib/common/route.ts#L6) for apigateway ### Description of how you validated changes Deployed in test-pipeline for verification using ``` git fetch origin pull/31464/head git push -f origin FETCH_HEAD:test-main-pipeline ``` ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0da4f43 commit 144cc8b

File tree

1 file changed

+3
-3
lines changed
  • packages/@aws-cdk/aws-ec2-alpha/lib

1 file changed

+3
-3
lines changed

Diff for: packages/@aws-cdk/aws-ec2-alpha/lib/route.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CfnEIP, CfnEgressOnlyInternetGateway, CfnInternetGateway, CfnNatGateway, CfnRoute, CfnRouteTable, CfnVPCGatewayAttachment, CfnVPNGateway, CfnVPNGatewayRoutePropagation, GatewayVpcEndpoint, IRouteTable, IVpcEndpoint, RouterType } from 'aws-cdk-lib/aws-ec2';
2-
import { Construct, IConstruct, IDependable } from 'constructs';
2+
import { Construct, IDependable } from 'constructs';
33
import { Annotations, Duration, IResource, Resource } from 'aws-cdk-lib/core';
44
import { IVpcV2, VPNGatewayV2Options } from './vpc-v2-base';
55
import { NetworkUtils, allRouteTableIds } from './util';
@@ -456,7 +456,7 @@ export class RouteTargetType {
456456
/**
457457
* Interface to define a route.
458458
*/
459-
export interface IRoute extends IConstruct, IResource {
459+
export interface IRouteV2 extends IResource {
460460
/**
461461
* The ID of the route table for the route.
462462
* @attribute routeTable
@@ -512,7 +512,7 @@ export interface RouteProps {
512512
* Creates a new route with added functionality.
513513
* @resource AWS::EC2::Route
514514
*/
515-
export class Route extends Resource implements IRoute, IDependable {
515+
export class Route extends Resource implements IRouteV2 {
516516
/**
517517
* The IPv4 or IPv6 CIDR block used for the destination match.
518518
*

0 commit comments

Comments
 (0)