Skip to content

Commit

Permalink
chore(vpcv2): fix doc issue due to IRoute (#31464)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
shikha372 authored Sep 18, 2024
1 parent 0da4f43 commit 144cc8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-ec2-alpha/lib/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CfnEIP, CfnEgressOnlyInternetGateway, CfnInternetGateway, CfnNatGateway, CfnRoute, CfnRouteTable, CfnVPCGatewayAttachment, CfnVPNGateway, CfnVPNGatewayRoutePropagation, GatewayVpcEndpoint, IRouteTable, IVpcEndpoint, RouterType } from 'aws-cdk-lib/aws-ec2';
import { Construct, IConstruct, IDependable } from 'constructs';
import { Construct, IDependable } from 'constructs';
import { Annotations, Duration, IResource, Resource } from 'aws-cdk-lib/core';
import { IVpcV2, VPNGatewayV2Options } from './vpc-v2-base';
import { NetworkUtils, allRouteTableIds } from './util';
Expand Down Expand Up @@ -456,7 +456,7 @@ export class RouteTargetType {
/**
* Interface to define a route.
*/
export interface IRoute extends IConstruct, IResource {
export interface IRouteV2 extends IResource {
/**
* The ID of the route table for the route.
* @attribute routeTable
Expand Down Expand Up @@ -512,7 +512,7 @@ export interface RouteProps {
* Creates a new route with added functionality.
* @resource AWS::EC2::Route
*/
export class Route extends Resource implements IRoute, IDependable {
export class Route extends Resource implements IRouteV2 {
/**
* The IPv4 or IPv6 CIDR block used for the destination match.
*
Expand Down

0 comments on commit 144cc8b

Please sign in to comment.