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

chore(ec2): update WindowsVersions enum #29796

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

nmussy
Copy link
Contributor

@nmussy nmussy commented Apr 11, 2024

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:
    • 38b6cd9: Added new versions
    • f21fd86: Deprecated EOL versions
    • 686d8d3: 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 #29736 (comment) 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

@github-actions github-actions bot added the p2 label Apr 11, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team April 11, 2024 19:05
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Apr 11, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Apr 11, 2024
@aaythapa aaythapa assigned aaythapa and unassigned aaythapa Apr 18, 2024
@aws-cdk-automation
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants