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

CodeBuild: Fleet L2 #29617

Closed
1 of 2 tasks
nmussy opened this issue Mar 26, 2024 · 8 comments · Fixed by #29754 · 4 remaining pull requests
Closed
1 of 2 tasks

CodeBuild: Fleet L2 #29617

nmussy opened this issue Mar 26, 2024 · 8 comments · Fixed by #29754 · 4 remaining pull requests
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@nmussy
Copy link
Contributor

nmussy commented Mar 26, 2024

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 #29616 (comment) 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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.133.0

Environment details (OS name and version, etc.)

macOS 14.3.1

@nmussy nmussy added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 26, 2024
@github-actions github-actions bot added the @aws-cdk/aws-codebuild Related to AWS CodeBuild label Mar 26, 2024
@nmussy
Copy link
Contributor Author

nmussy commented Mar 26, 2024

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

@tim-finnigan tim-finnigan self-assigned this Mar 26, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 26, 2024
@tim-finnigan
Copy link

Thanks for the feature request!

@tim-finnigan tim-finnigan added p2 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Mar 26, 2024
@tim-finnigan tim-finnigan removed their assignment Mar 26, 2024
@nmussy
Copy link
Contributor Author

nmussy commented Apr 7, 2024

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 (aws-cloudformation/cloudformation-coverage-roadmap#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
Copy link

rgoltz commented May 24, 2024

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
Copy link
Contributor Author

nmussy commented May 25, 2024

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

@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 nmussy changed the title CodeBuild: Fleet demo/test/L2 CodeBuild: Fleet L2 May 30, 2024
@nmussy
Copy link
Contributor Author

nmussy commented May 30, 2024

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

@mergify mergify bot closed this as completed in #29754 Jun 4, 2024
mergify bot pushed a commit that referenced this issue Jun 4, 2024
### Issue # (if applicable)

Closes #29617.

### Reason for this change

Implementation of reserved capacity CodeBuild projects 

### Description of changes

* Add Fleet Construct
* Add `EnvironmentType` enum
  * Refactor existing type strings to use the new enum	
* Validate that Windows 2022 build images can only be used in fleet projects

Changes merged from #29616:
* Added missing build images
* Updated JSDoc comments to indicate AL2023 based images, see [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)
  * It might be a good idea to deprecate and rename `AMAZON_LINUX_2_STANDARD_3_0` to `AMAZON_LINUX_2023_STANDARD_3_0`, despite how the images are named. I'll leave it up to the maintainers
* Added `{@link}` tags where missing

### Description of how you validated changes

Unit and integ tests

The images were retrieved using the [codebuild:ListCuratedEnvironmentImages](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html) API command, and comparing it to the CDK.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

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

github-actions bot commented Jun 4, 2024

⚠️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.

vdahlberg pushed a commit to vdahlberg/aws-cdk that referenced this issue Jun 10, 2024
### Issue # (if applicable)

Closes aws#29617.

### Reason for this change

Implementation of reserved capacity CodeBuild projects 

### Description of changes

* Add Fleet Construct
* Add `EnvironmentType` enum
  * Refactor existing type strings to use the new enum	
* Validate that Windows 2022 build images can only be used in fleet projects

Changes merged from aws#29616:
* Added missing build images
* Updated JSDoc comments to indicate AL2023 based images, see [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)
  * It might be a good idea to deprecate and rename `AMAZON_LINUX_2_STANDARD_3_0` to `AMAZON_LINUX_2023_STANDARD_3_0`, despite how the images are named. I'll leave it up to the maintainers
* Added `{@link}` tags where missing

### Description of how you validated changes

Unit and integ tests

The images were retrieved using the [codebuild:ListCuratedEnvironmentImages](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html) API command, and comparing it to the CDK.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Leo10Gama pushed a commit to Leo10Gama/aws-cdk that referenced this issue Jun 11, 2024
### Issue # (if applicable)

Closes aws#29617.

### Reason for this change

Implementation of reserved capacity CodeBuild projects 

### Description of changes

* Add Fleet Construct
* Add `EnvironmentType` enum
  * Refactor existing type strings to use the new enum	
* Validate that Windows 2022 build images can only be used in fleet projects

Changes merged from aws#29616:
* Added missing build images
* Updated JSDoc comments to indicate AL2023 based images, see [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)
  * It might be a good idea to deprecate and rename `AMAZON_LINUX_2_STANDARD_3_0` to `AMAZON_LINUX_2023_STANDARD_3_0`, despite how the images are named. I'll leave it up to the maintainers
* Added `{@link}` tags where missing

### Description of how you validated changes

Unit and integ tests

The images were retrieved using the [codebuild:ListCuratedEnvironmentImages](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html) API command, and comparing it to the CDK.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mazyu36 pushed a commit to mazyu36/aws-cdk that referenced this issue Jun 22, 2024
### Issue # (if applicable)

Closes aws#29617.

### Reason for this change

Implementation of reserved capacity CodeBuild projects 

### Description of changes

* Add Fleet Construct
* Add `EnvironmentType` enum
  * Refactor existing type strings to use the new enum	
* Validate that Windows 2022 build images can only be used in fleet projects

Changes merged from aws#29616:
* Added missing build images
* Updated JSDoc comments to indicate AL2023 based images, see [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)
  * It might be a good idea to deprecate and rename `AMAZON_LINUX_2_STANDARD_3_0` to `AMAZON_LINUX_2023_STANDARD_3_0`, despite how the images are named. I'll leave it up to the maintainers
* Added `{@link}` tags where missing

### Description of how you validated changes

Unit and integ tests

The images were retrieved using the [codebuild:ListCuratedEnvironmentImages](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html) API command, and comparing it to the CDK.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment