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

fix(service-spec): skip adding a resource property that could not be resolved #1508

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

moelasmar
Copy link
Contributor

Fixes:
if the CFN schema contains some resource or type that contains a property of type that could not be resolved (like by mistake the type definition does not exist in the schema), now the specs importer failed to continue processing the remaining properties, and types defined in this resource/type.

This PR is to only skip the property that has issues, and continue importing everything else.

Copy link

@aws-cdk/aws-service-spec: Model database diff detected

├[~] service aws-ec2
│ └ resources
│    └[~] resource AWS::EC2::LaunchTemplate
│      └ types
│         ├[+] type BaselinePerformanceFactors
│         │ ├  documentation: The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application.
│         │ │  Currently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying `c6i` would use the CPU performance of the `c6i` family as the baseline reference.
│         │ │  name: BaselinePerformanceFactors
│         │ └ properties
│         │    └Cpu: Cpu
│         ├[+] type ConnectionTrackingSpecification
│         │ ├  documentation: A security group connection tracking specification that enables you to set the idle timeout for connection tracking on an Elastic network interface. For more information, see [Connection tracking timeouts](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) in the *Amazon EC2 User Guide* .
│         │ │  name: ConnectionTrackingSpecification
│         │ └ properties
│         │    ├UdpTimeout: integer
│         │    ├TcpEstablishedTimeout: integer
│         │    └UdpStreamTimeout: integer
│         ├[+] type Cpu
│         │ ├  documentation: Specifies the CPU performance to consider when using an instance family as the baseline reference.
│         │ │  name: Cpu
│         │ └ properties
│         │    └References: Array<Reference>
│         ├[+] type EnaSrdSpecification
│         │ ├  documentation: ENA Express uses AWS Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances. With ENA Express, you can communicate between two EC2 instances in the same subnet within the same account, or in different accounts. Both sending and receiving instances must have ENA Express enabled.
│         │ │  To improve the reliability of network packet delivery, ENA Express reorders network packets on the receiving end by default. However, some UDP-based applications are designed to handle network packets that are out of order to reduce the overhead for packet delivery at the network layer. When ENA Express is enabled, you can specify whether UDP network traffic uses it.
│         │ │  name: EnaSrdSpecification
│         │ └ properties
│         │    ├EnaSrdEnabled: boolean
│         │    └EnaSrdUdpSpecification: EnaSrdUdpSpecification
│         ├[+] type EnaSrdUdpSpecification
│         │ ├  documentation: ENA Express is compatible with both TCP and UDP transport protocols. When it's enabled, TCP traffic automatically uses it. However, some UDP-based applications are designed to handle network packets that are out of order, without a need for retransmission, such as live video broadcasting or other near-real-time applications. For UDP traffic, you can specify whether to use ENA Express, based on your application environment needs.
│         │ │  name: EnaSrdUdpSpecification
│         │ └ properties
│         │    └EnaSrdUdpEnabled: boolean
│         ├[~] type InstanceRequirements
│         │ └ properties
│         │    ├[+] BaselinePerformanceFactors: BaselinePerformanceFactors
│         │    └[+] MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: integer
│         ├[~] type NetworkInterface
│         │ └ properties
│         │    ├[+] ConnectionTrackingSpecification: ConnectionTrackingSpecification
│         │    └[+] EnaSrdSpecification: EnaSrdSpecification
│         └[+] type Reference
│           ├  documentation: Specifies an instance family to use as the baseline reference for CPU performance.
│           │  name: Reference
│           └ properties
│              └InstanceFamily: string
└[~] service aws-quicksight
  └ resources
     ├[~] resource AWS::QuickSight::Analysis
     │ └ types
     │    ├[+] type GeospatialCategoricalColor
     │    │ ├  name: GeospatialCategoricalColor
     │    │ └ properties
     │    │    ├CategoryDataColors: Array<GeospatialCategoricalDataColor> (required)
     │    │    ├DefaultOpacity: number
     │    │    ├NullDataVisibility: string
     │    │    └NullDataSettings: GeospatialNullDataSettings
     │    ├[+] type GeospatialCategoricalDataColor
     │    │ ├  name: GeospatialCategoricalDataColor
     │    │ └ properties
     │    │    ├DataValue: string (required)
     │    │    └Color: string (required)
     │    ├[+] type GeospatialCircleRadius
     │    │ ├  name: GeospatialCircleRadius
     │    │ └ properties
     │    │    └Radius: number
     │    ├[+] type GeospatialCircleSymbolStyle
     │    │ ├  name: GeospatialCircleSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    ├StrokeWidth: GeospatialLineWidth
     │    │    ├StrokeColor: GeospatialColor
     │    │    └CircleRadius: GeospatialCircleRadius
     │    ├[+] type GeospatialColor
     │    │ ├  name: GeospatialColor
     │    │ └ properties
     │    │    ├Gradient: GeospatialGradientColor
     │    │    ├Categorical: GeospatialCategoricalColor
     │    │    └Solid: GeospatialSolidColor
     │    ├[+] type GeospatialDataSourceItem
     │    │ ├  name: GeospatialDataSourceItem
     │    │ └ properties
     │    │    └StaticFileDataSource: GeospatialStaticFileSource
     │    ├[+] type GeospatialGradientColor
     │    │ ├  name: GeospatialGradientColor
     │    │ └ properties
     │    │    ├DefaultOpacity: number
     │    │    ├StepColors: Array<GeospatialGradientStepColor> (required)
     │    │    ├NullDataVisibility: string
     │    │    └NullDataSettings: GeospatialNullDataSettings
     │    ├[+] type GeospatialGradientStepColor
     │    │ ├  name: GeospatialGradientStepColor
     │    │ └ properties
     │    │    ├DataValue: number (required, default=0)
     │    │    └Color: string (required)
     │    ├[+] type GeospatialLayerColorField
     │    │ ├  name: GeospatialLayerColorField
     │    │ └ properties
     │    │    ├ColorValuesFields: Array<MeasureField>
     │    │    └ColorDimensionsFields: Array<DimensionField>
     │    ├[+] type GeospatialLayerDefinition
     │    │ ├  name: GeospatialLayerDefinition
     │    │ └ properties
     │    │    ├PointLayer: GeospatialPointLayer
     │    │    ├PolygonLayer: GeospatialPolygonLayer
     │    │    └LineLayer: GeospatialLineLayer
     │    ├[+] type GeospatialLayerItem
     │    │ ├  name: GeospatialLayerItem
     │    │ └ properties
     │    │    ├LayerId: string (required)
     │    │    ├JoinDefinition: GeospatialLayerJoinDefinition
     │    │    ├Actions: Array<LayerCustomAction>
     │    │    ├LayerType: string
     │    │    ├LayerDefinition: GeospatialLayerDefinition
     │    │    ├Tooltip: TooltipOptions
     │    │    ├Label: string
     │    │    ├Visibility: string
     │    │    └DataSource: GeospatialDataSourceItem
     │    ├[+] type GeospatialLayerJoinDefinition
     │    │ ├  name: GeospatialLayerJoinDefinition
     │    │ └ properties
     │    │    ├ColorField: GeospatialLayerColorField
     │    │    ├ShapeKeyField: string
     │    │    └DatasetKeyField: UnaggregatedField
     │    ├[~] type GeospatialLayerMapConfiguration
     │    │ └ properties
     │    │    └[+] MapLayers: Array<GeospatialLayerItem>
     │    ├[+] type GeospatialLineLayer
     │    │ ├  name: GeospatialLineLayer
     │    │ └ properties
     │    │    └Style: GeospatialLineStyle (required)
     │    ├[+] type GeospatialLineStyle
     │    │ ├  name: GeospatialLineStyle
     │    │ └ properties
     │    │    └LineSymbolStyle: GeospatialLineSymbolStyle
     │    ├[+] type GeospatialLineSymbolStyle
     │    │ ├  name: GeospatialLineSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    └LineWidth: GeospatialLineWidth
     │    ├[+] type GeospatialLineWidth
     │    │ ├  name: GeospatialLineWidth
     │    │ └ properties
     │    │    └LineWidth: number
     │    ├[+] type GeospatialNullDataSettings
     │    │ ├  name: GeospatialNullDataSettings
     │    │ └ properties
     │    │    └SymbolStyle: GeospatialNullSymbolStyle (required)
     │    ├[+] type GeospatialNullSymbolStyle
     │    │ ├  name: GeospatialNullSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: string
     │    │    ├StrokeWidth: number
     │    │    └StrokeColor: string
     │    ├[+] type GeospatialPointLayer
     │    │ ├  name: GeospatialPointLayer
     │    │ └ properties
     │    │    └Style: GeospatialPointStyle (required)
     │    ├[+] type GeospatialPointStyle
     │    │ ├  name: GeospatialPointStyle
     │    │ └ properties
     │    │    └CircleSymbolStyle: GeospatialCircleSymbolStyle
     │    ├[+] type GeospatialPolygonLayer
     │    │ ├  name: GeospatialPolygonLayer
     │    │ └ properties
     │    │    └Style: GeospatialPolygonStyle (required)
     │    ├[+] type GeospatialPolygonStyle
     │    │ ├  name: GeospatialPolygonStyle
     │    │ └ properties
     │    │    └PolygonSymbolStyle: GeospatialPolygonSymbolStyle
     │    ├[+] type GeospatialPolygonSymbolStyle
     │    │ ├  name: GeospatialPolygonSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    ├StrokeWidth: GeospatialLineWidth
     │    │    └StrokeColor: GeospatialColor
     │    ├[+] type GeospatialSolidColor
     │    │ ├  documentation: Describes the properties for a solid color
     │    │ │  name: GeospatialSolidColor
     │    │ └ properties
     │    │    ├State: string
     │    │    └Color: string (required)
     │    ├[+] type GeospatialStaticFileSource
     │    │ ├  name: GeospatialStaticFileSource
     │    │ └ properties
     │    │    └StaticFileId: string (required)
     │    ├[~] type ImageInteractionOptions
     │    │ └ properties
     │    │    └[+] ImageMenuOption: ImageMenuOption
     │    ├[+] type LayerCustomAction
     │    │ ├  name: LayerCustomAction
     │    │ └ properties
     │    │    ├Status: string
     │    │    ├Trigger: string (required)
     │    │    ├CustomActionId: string (required)
     │    │    ├Name: string (required)
     │    │    └ActionOperations: Array<LayerCustomActionOperation> (required)
     │    ├[+] type LayerCustomActionOperation
     │    │ ├  name: LayerCustomActionOperation
     │    │ └ properties
     │    │    ├NavigationOperation: CustomActionNavigationOperation
     │    │    ├SetParametersOperation: CustomActionSetParametersOperation
     │    │    ├FilterOperation: CustomActionFilterOperation
     │    │    └URLOperation: CustomActionURLOperation
     │    └[~] type LayerMapVisual
     │      └ properties
     │         └[+] ChartConfiguration: GeospatialLayerMapConfiguration
     ├[~] resource AWS::QuickSight::Dashboard
     │ └ types
     │    ├[+] type GeospatialCategoricalColor
     │    │ ├  name: GeospatialCategoricalColor
     │    │ └ properties
     │    │    ├CategoryDataColors: Array<GeospatialCategoricalDataColor> (required)
     │    │    ├DefaultOpacity: number
     │    │    ├NullDataVisibility: string
     │    │    └NullDataSettings: GeospatialNullDataSettings
     │    ├[+] type GeospatialCategoricalDataColor
     │    │ ├  name: GeospatialCategoricalDataColor
     │    │ └ properties
     │    │    ├DataValue: string (required)
     │    │    └Color: string (required)
     │    ├[+] type GeospatialCircleRadius
     │    │ ├  name: GeospatialCircleRadius
     │    │ └ properties
     │    │    └Radius: number
     │    ├[+] type GeospatialCircleSymbolStyle
     │    │ ├  name: GeospatialCircleSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    ├StrokeWidth: GeospatialLineWidth
     │    │    ├StrokeColor: GeospatialColor
     │    │    └CircleRadius: GeospatialCircleRadius
     │    ├[+] type GeospatialColor
     │    │ ├  name: GeospatialColor
     │    │ └ properties
     │    │    ├Gradient: GeospatialGradientColor
     │    │    ├Categorical: GeospatialCategoricalColor
     │    │    └Solid: GeospatialSolidColor
     │    ├[+] type GeospatialDataSourceItem
     │    │ ├  name: GeospatialDataSourceItem
     │    │ └ properties
     │    │    └StaticFileDataSource: GeospatialStaticFileSource
     │    ├[+] type GeospatialGradientColor
     │    │ ├  name: GeospatialGradientColor
     │    │ └ properties
     │    │    ├DefaultOpacity: number
     │    │    ├StepColors: Array<GeospatialGradientStepColor> (required)
     │    │    ├NullDataVisibility: string
     │    │    └NullDataSettings: GeospatialNullDataSettings
     │    ├[+] type GeospatialGradientStepColor
     │    │ ├  name: GeospatialGradientStepColor
     │    │ └ properties
     │    │    ├DataValue: number (required, default=0)
     │    │    └Color: string (required)
     │    ├[+] type GeospatialLayerColorField
     │    │ ├  name: GeospatialLayerColorField
     │    │ └ properties
     │    │    ├ColorValuesFields: Array<MeasureField>
     │    │    └ColorDimensionsFields: Array<DimensionField>
     │    ├[+] type GeospatialLayerDefinition
     │    │ ├  name: GeospatialLayerDefinition
     │    │ └ properties
     │    │    ├PointLayer: GeospatialPointLayer
     │    │    ├PolygonLayer: GeospatialPolygonLayer
     │    │    └LineLayer: GeospatialLineLayer
     │    ├[+] type GeospatialLayerItem
     │    │ ├  name: GeospatialLayerItem
     │    │ └ properties
     │    │    ├LayerId: string (required)
     │    │    ├JoinDefinition: GeospatialLayerJoinDefinition
     │    │    ├Actions: Array<LayerCustomAction>
     │    │    ├LayerType: string
     │    │    ├LayerDefinition: GeospatialLayerDefinition
     │    │    ├Tooltip: TooltipOptions
     │    │    ├Label: string
     │    │    ├Visibility: string
     │    │    └DataSource: GeospatialDataSourceItem
     │    ├[+] type GeospatialLayerJoinDefinition
     │    │ ├  name: GeospatialLayerJoinDefinition
     │    │ └ properties
     │    │    ├ColorField: GeospatialLayerColorField
     │    │    ├ShapeKeyField: string
     │    │    └DatasetKeyField: UnaggregatedField
     │    ├[~] type GeospatialLayerMapConfiguration
     │    │ └ properties
     │    │    └[+] MapLayers: Array<GeospatialLayerItem>
     │    ├[+] type GeospatialLineLayer
     │    │ ├  name: GeospatialLineLayer
     │    │ └ properties
     │    │    └Style: GeospatialLineStyle (required)
     │    ├[+] type GeospatialLineStyle
     │    │ ├  name: GeospatialLineStyle
     │    │ └ properties
     │    │    └LineSymbolStyle: GeospatialLineSymbolStyle
     │    ├[+] type GeospatialLineSymbolStyle
     │    │ ├  name: GeospatialLineSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    └LineWidth: GeospatialLineWidth
     │    ├[+] type GeospatialLineWidth
     │    │ ├  name: GeospatialLineWidth
     │    │ └ properties
     │    │    └LineWidth: number
     │    ├[+] type GeospatialNullDataSettings
     │    │ ├  name: GeospatialNullDataSettings
     │    │ └ properties
     │    │    └SymbolStyle: GeospatialNullSymbolStyle (required)
     │    ├[+] type GeospatialNullSymbolStyle
     │    │ ├  name: GeospatialNullSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: string
     │    │    ├StrokeWidth: number
     │    │    └StrokeColor: string
     │    ├[+] type GeospatialPointLayer
     │    │ ├  name: GeospatialPointLayer
     │    │ └ properties
     │    │    └Style: GeospatialPointStyle (required)
     │    ├[+] type GeospatialPointStyle
     │    │ ├  name: GeospatialPointStyle
     │    │ └ properties
     │    │    └CircleSymbolStyle: GeospatialCircleSymbolStyle
     │    ├[+] type GeospatialPolygonLayer
     │    │ ├  name: GeospatialPolygonLayer
     │    │ └ properties
     │    │    └Style: GeospatialPolygonStyle (required)
     │    ├[+] type GeospatialPolygonStyle
     │    │ ├  name: GeospatialPolygonStyle
     │    │ └ properties
     │    │    └PolygonSymbolStyle: GeospatialPolygonSymbolStyle
     │    ├[+] type GeospatialPolygonSymbolStyle
     │    │ ├  name: GeospatialPolygonSymbolStyle
     │    │ └ properties
     │    │    ├FillColor: GeospatialColor
     │    │    ├StrokeWidth: GeospatialLineWidth
     │    │    └StrokeColor: GeospatialColor
     │    ├[+] type GeospatialSolidColor
     │    │ ├  documentation: Describes the properties for a solid color
     │    │ │  name: GeospatialSolidColor
     │    │ └ properties
     │    │    ├State: string
     │    │    └Color: string (required)
     │    ├[+] type GeospatialStaticFileSource
     │    │ ├  name: GeospatialStaticFileSource
     │    │ └ properties
     │    │    └StaticFileId: string (required)
     │    ├[+] type LayerCustomAction
     │    │ ├  name: LayerCustomAction
     │    │ └ properties
     │    │    ├Status: string
     │    │    ├Trigger: string (required)
     │    │    ├CustomActionId: string (required)
     │    │    ├Name: string (required)
     │    │    └ActionOperations: Array<LayerCustomActionOperation> (required)
     │    ├[+] type LayerCustomActionOperation
     │    │ ├  name: LayerCustomActionOperation
     │    │ └ properties
     │    │    ├NavigationOperation: CustomActionNavigationOperation
     │    │    ├SetParametersOperation: CustomActionSetParametersOperation
     │    │    ├FilterOperation: CustomActionFilterOperation
     │    │    └URLOperation: CustomActionURLOperation
     │    └[~] type LayerMapVisual
     │      └ properties
     │         └[+] ChartConfiguration: GeospatialLayerMapConfiguration
     └[~] resource AWS::QuickSight::Template
       └ types
          └[~] type ImageInteractionOptions
            └ properties
               └[+] ImageMenuOption: ImageMenuOption

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 17231be Dec 18, 2024
9 checks passed
@aws-cdk-automation aws-cdk-automation deleted the melasmar/fix_spec_skip_failed_prop branch December 18, 2024 23:13
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.

3 participants