aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.65k stars 3.91k forks source link

CodeBuild: Fleet L2 #29617

Closed nmussy closed 4 months ago

nmussy commented 7 months ago

Describe the feature

There is currently no documented examples or tests of reserved capacity CodeBuild projects.

Use Case

I discovered this issue while attempting to add the aws/codebuild/windows-base:2019-3 image to WindowsBuildImage, see https://github.com/aws/aws-cdk/pull/29616#issuecomment-2019991742 for additional context

Proposed Solution

Adding a fleet prop to the Project construct shouldn't be too much work, and will allow us to easily check that the fleet property is present when a WindowsImageType.SERVER_2022 image is given

Other Information

Working with reserved capacity in AWS CodeBuild

29616

Acknowledgements

CDK version used

v2.133.0

Environment details (OS name and version, etc.)

macOS 14.3.1

nmussy commented 7 months ago

If someone else wants to take this on, feel free to do so, I already have my share of WIP PRs 😅

tim-finnigan commented 7 months ago

Thanks for the feature request!

nmussy commented 6 months ago

I've started working on implementing the L2 construct. It shouldn't be too much more work, but the integration tests are slow running given how long fleets take to be deleted.

Unfortunately, I've noticed two missing attributes in the L1 construct, overflowBehavior and scalingConfiguration.

I've opened an issue in the CloudFormation Public Coverage Roadmap project (https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1998). Unfortunately I'm going to have to ignore these attributes in the meantime, I'll open another PR to add them to the construct if and when they're implemented.

rgoltz commented 5 months ago

Hi Jimmy @nmussy - There is a update on the CloudFormation definition/documentation for AWS::CodeBuild::Fleet 👍. I can already see those props in CFN:

It seems to move fast 💯 - Just scalingConfiguration is pending in CFN, isn't it?

nmussy commented 5 months ago

I'll update the PR, thanks for the ping 👍

EDIT: The L1 constructs have not yet been updated to support these props, I'll update the PR when they do

michaelbwebb commented 5 months ago

@nmussy If I'm understanding this correctly, CDK L1 constructs are not supporting this feature yet due to CloudFormation limitations. I am catching myself up to speed with my CDK skills and wanted to verify I am following this thread correctly

nmussy commented 5 months ago

30354 just added support for the recently added CloudFormation properties listed here. scalingConfiguration is still missing from the CloudFormation construct

github-actions[bot] commented 4 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

aws-cdk-automation commented 3 months ago

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.