aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

chore(ec2): update WindowsVersions enum

Open nmussy opened this issue 1 year ago • 4 comments

Issue # (if applicable)

None

Reason for this change

Update the CDK EC2 listed Windows versions to match the current availability. Follow up to #29435, which was reverted for erroneous changes. This version in based on the /aws/service/ami-windows-latest/* SSM parameters, similarly to #29738.

Description of changes

  • Updates to the WindowsVersion enum:
    • 38b6cd9d818368d30049d1f4b45588c93d5f9bed: Added new versions
    • f21fd862ffa25305b39388d37dcac57259ef903a: Deprecated EOL versions
    • 686d8d32756f5aa10487ef61340e34f58aacefb8: Added unit test to verify that all versions keys and values match each other. This highlighted both several typos in keys and values, and allowed for a simpler reflection process in the integration test
  • Added jsii and jsii-reflect dependencies to @aws-cdk-testing/framework-integ
    • This allows the integration test to check whether a field is deprecated

Description of how you validated changes

The WindowsVersion values were compared to the SDK results of ssm:GetParametersByPath with the following params:

{
	"Path": "/aws/service/ami-windows-latest"
}

The parameters that did not start with /aws/service/ami-windows-latest/Windows_Server were ignored. Some are Amazon Linux images:

  • amzn2-ami-hvm-2.0.*
  • amzn2-x86_64-SQL_2019_*

Others are either EC2LaunchV2 or NitroTPM Windows images, neither currently supported by the CDK:

  • EC2LaunchV2-Windows_Server-2016-English-*
  • TPM-Windows_Server-2016-English-*
  • TPM-Windows_Server-2019-English-*
  • TPM-Windows_Server-2022-English-*

Also went a little crazy on the integration, it checks all of the listed WindowsVersion and:

  • Expects all non-deprecated versions to have an SSM /aws/service/ami-windows-latest/<version> parameter
  • Expects all deprecated versions not to have that same SSM parameter

This ensures that a situation like https://github.com/aws/aws-cdk/issues/29736#issuecomment-2038925967 does not happen again

Checklist


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

nmussy avatar Apr 11 '24 19:04 nmussy

This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar May 05 '24 00:05 aws-cdk-automation

This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar Jun 15 '24 00:06 aws-cdk-automation

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Jun 29 '24 00:06 aws-cdk-automation

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Jul 04 '24 00:07 aws-cdk-automation

Hi

This PR has been pending for community review for a while. Please consider posting it on the #contributing channel in cdk.dev. Community members will be on the lookout there as well for possible reviews.

Check How to get your P2 PR community reviewed for more details.

pahud avatar Jul 30 '24 15:07 pahud

This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar Aug 19 '24 00:08 aws-cdk-automation

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

aws-cdk-automation avatar Sep 01 '24 00:09 aws-cdk-automation

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Sep 01 '24 00:09 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.54%. Comparing base (5735e9e) to head (7137ece). Report is 338 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29796   +/-   ##
=======================================
  Coverage   80.54%   80.54%           
=======================================
  Files         106      106           
  Lines        6954     6954           
  Branches     1287     1287           
=======================================
  Hits         5601     5601           
  Misses       1175     1175           
  Partials      178      178           
Flag Coverage Δ
suite.unit 80.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 80.54% <ø> (ø)

codecov[bot] avatar Dec 09 '24 18:12 codecov[bot]

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Dec 13 '24 00:12 aws-cdk-automation

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Dec 22 '24 00:12 aws-cdk-automation

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Dec 23 '24 00:12 aws-cdk-automation

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

aws-cdk-automation avatar Dec 24 '24 00:12 aws-cdk-automation

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7137ece7d64cb0b99ca085f8132ed78f65f657f5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

aws-cdk-automation avatar Dec 24 '24 09:12 aws-cdk-automation

This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

aws-cdk-automation avatar Jan 18 '25 00:01 aws-cdk-automation

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

aws-cdk-automation avatar Feb 02 '25 00:02 aws-cdk-automation

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Feb 02 '25 00:02 github-actions[bot]