-
Notifications
You must be signed in to change notification settings - Fork 27
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
MIGRATIONS-1519: Add support for providing Fargate CPU arch in CDK #520
MIGRATIONS-1519: Add support for providing Fargate CPU arch in CDK #520
Conversation
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
@@ -6,6 +6,7 @@ | |||
"nodeToNodeEncryptionEnabled": true, | |||
"encryptionAtRestEnabled": true, | |||
"vpcEnabled": true, | |||
"defaultFargateCpuArch": "X86_64", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like a setting that should be able to be modified as it depends on the image that's built (unless we change our build script to build within a container and be able to build for whichever target irregardless of host system).
I'd prefer this get auto-resolved, possibly through an auto
setting here then using const hostArchitecture = process.arch;
See example for output on M1:
➜ TrafficCapture git:(main) ✗ node
Welcome to Node.js v18.18.2.
Type ".help" for more information.
> process.arch
'arm64'
and for X86 EC2:
[akurait@ip-10-0-3-66 ~]$ node
Welcome to Node.js v18.18.2.
Type ".help" for more information.
> process.arch
'x64'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, have updated so as a default we will try to use process.arch
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #520 +/- ##
============================================
+ Coverage 76.87% 76.90% +0.03%
+ Complexity 1389 1386 -3
============================================
Files 158 158
Lines 6105 6105
Branches 532 532
============================================
+ Hits 4693 4695 +2
+ Misses 1061 1058 -3
- Partials 351 352 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
|
||
const cpuArch4 = "X86_64" | ||
const detectedArch4 = validateFargateCpuArch(cpuArch4) | ||
expect(detectedArch4).toEqual(CpuArchitecture.X86_64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have one test that passes nothing and expects it to be something valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test case 👍
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
Description
Add CDK option to provide default CPU arch
defaultFargateCpuArch
across Fargate containers forX86_64
andARM64
Issues Resolved
https://opensearch.atlassian.net/browse/MIGRATIONS-1519
Testing
CDK jest tests and manual AWS deployment
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.