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(codebuild): Fleet L2 #29754

Merged
merged 26 commits into from
Jun 4, 2024
Merged

feat(codebuild): Fleet L2 #29754

merged 26 commits into from
Jun 4, 2024

Conversation

nmussy
Copy link
Contributor

@nmussy nmussy commented Apr 7, 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
    • 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 API command, and comparing it to the CDK.

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team April 7, 2024 07:22
@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 labels Apr 7, 2024
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.

@nmussy nmussy changed the title feat(codebuild): Fleet L2 feat(codebuild): Fleet L2 Apr 7, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review April 10, 2024 17:18

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

@nmussy nmussy marked this pull request as ready for review April 10, 2024 17:23
@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 10, 2024
@@ -1,5 +1,7 @@
/**
* Build machine compute type.
*
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
Copy link
Contributor

Choose a reason for hiding this comment

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

might be working combining this file, environment-type.ts, and FleetComputeType into an enums file?

Copy link
Contributor Author

@nmussy nmussy Apr 13, 2024

Choose a reason for hiding this comment

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

The current "convention" for this package is that most of the enums are part of their feature file (e.g. ReportGroupType in report-group.ts), with the exception of ComputeType, which has its own file. I assume this was because it was used across multiple "features", in this case both Project and IBuildImages implementations, and now also Fleet. EnvironmentType is in a similar situation, used both for the IBuildImages and Fleet classes.

If anything, the best thing to do would be to move both ComputeType and EnvironmentType in one of the feature files, probably project.ts, which contains IBuildImage?

LARGE = ComputeType.LARGE,
X_LARGE = ComputeType.X_LARGE,
X2_LARGE = ComputeType.X2_LARGE,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

see note above. worth moving all the enums into enums.ts ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Co-authored-by: Calvin Combs <66279577+comcalvi@users.noreply.github.com>
@mergify mergify bot dismissed comcalvi’s stale review April 23, 2024 16:15

Pull request has been modified.

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

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

lgtm, just those doc changes and this is good to go

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 6, 2024
@mergify mergify bot dismissed comcalvi’s stale review May 6, 2024 18:14

Pull request has been modified.

@nmussy nmussy requested a review from comcalvi May 6, 2024 18:16
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 6, 2024
@nmussy
Copy link
Contributor Author

nmussy commented May 27, 2024

@comcalvi Nudge

Copy link
Contributor

mergify bot commented Jun 4, 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 Jun 4, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 117f24b
  • 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 940e799 into aws:main Jun 4, 2024
12 checks passed
Copy link
Contributor

mergify bot commented Jun 4, 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).

@nmussy nmussy mentioned this pull request Jun 5, 2024
2 tasks
vdahlberg pushed a commit to vdahlberg/aws-cdk that referenced this pull request 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 pull request 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*
@michaelbwebb
Copy link

@nmussy I'm curious, is the L2 construct working then based off your pull request? It seems that you don't have to use a L1 construct but when deploying the fleet property is not being picked up by the build project

@nmussy
Copy link
Contributor Author

nmussy commented Jun 20, 2024

@michaelbwebb I'm not sure what you're asking here, would you be able to open a new issue detailing what you're attempting to do, and include an example of your CDK code? Feel free to tag me there as well

mazyu36 pushed a commit to mazyu36/aws-cdk that referenced this pull request 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
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days 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.

CodeBuild: Fleet L2
5 participants