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

feat(ec2): default BastionHostLinux to use Amazon Linux 2023 (under feature flag) #31996

Merged
merged 8 commits into from
Dec 2, 2024

Conversation

blimmer
Copy link
Contributor

@blimmer blimmer commented Nov 3, 2024

Issue #29493

Closes #29493

Reason for this change

Right now, if a machineImage property isn't passed to BastionHostLinux, it defaults to an Amazon Linux 2 image. Since Amazon Linux 2 is hitting end-of-life in June 2025, it'd be better to default to Amazon Linux 2023.

Since changing this default would be a breaking change, I placed it behind a feature flag, @aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault.

Description of changes

  • Added the @aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault
  • When set, and a machineImage is not provided, we use the latest Amazon Linux 2023 image, instead of Amazon Linux 2.

Description of how you validated changes

  • Unit Tests
  • Integration Test

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 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 admired-contributor [Pilot] contributed between 13-24 PRs to the CDK labels Nov 3, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team November 3, 2024 02:50
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@blimmer blimmer changed the title feat(aws-ec2): default BastionHostLinux to use Amazon Linux 2023 (under feature flag) feat(ec2): default BastionHostLinux to use Amazon Linux 2023 (under feature flag) Nov 3, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 3, 2024 02:57

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@blimmer blimmer force-pushed the default-bastion-host-to-al2023 branch from 7a433bf to cdd23d6 Compare November 3, 2024 16:00
@@ -18,9 +18,6 @@
"VPCPublicSubnet1SubnetB4246D30": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the old integration tests, since AL2023 is the new default with the feature flag on. I added an integration test disabling the flag, which can be removed when v3 is released.

@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 Nov 3, 2024
Copy link
Contributor

@tmokmss tmokmss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@blimmer
Copy link
Contributor Author

blimmer commented Nov 30, 2024

Merge conflicts resolved.

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.50%. Comparing base (9e6bb24) to head (b94afc2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #31996   +/-   ##
=======================================
  Coverage   78.50%   78.50%           
=======================================
  Files         106      106           
  Lines        7201     7201           
  Branches     1321     1321           
=======================================
  Hits         5653     5653           
  Misses       1361     1361           
  Partials      187      187           
Flag Coverage Δ
suite.unit 78.50% <ø> (ø)

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

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

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Nov 30, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for this high quality work!

Copy link
Contributor

mergify bot commented Dec 2, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 2, 2024
Copy link
Contributor

mergify bot commented Dec 2, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit bf77e51 into aws:main Dec 2, 2024
17 checks passed
Copy link
Contributor

mergify bot commented Dec 2, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link

github-actions bot commented Dec 2, 2024

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 github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2024
@blimmer blimmer deleted the default-bastion-host-to-al2023 branch December 2, 2024 23:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-ec2): Support Amazon Linux 2023 as a first-class option for BastionHostLinux
4 participants