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

fix: Fargate provider storage size setting doesn't work #661

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

ToddMurphy92
Copy link
Contributor

  • Corrected the logical grouping of the nullish coalescing operator and ternary operator for the ephemeralStorageGiB property.
  • Ensured that the ephemeralStorageGiB property is correctly set when provided in the props.
  • This fix ensures that the correct storage value is reflected in the synthesized CloudFormation template.
  • Prior to this fix the storage value would always be set to 25

@ToddMurphy92 ToddMurphy92 changed the title FIX: Fix ephemeralStorageGiB property assignment in FargateRunnerProvider fix: Fix ephemeralStorageGiB property assignment in FargateRunnerProvider Nov 28, 2024
@kichik kichik changed the title fix: Fix ephemeralStorageGiB property assignment in FargateRunnerProvider fix: Fargate provider storage size changes don't work Nov 28, 2024
@kichik
Copy link
Member

kichik commented Nov 28, 2024

Thanks!

Can you give me access to push to the branch to update the unit tests (I think I can't because main branch is locked?)? Or commit this change directly:

 test/providers.test.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/providers.test.ts b/test/providers.test.ts
index 5261e36..52c26bf 100644
--- a/test/providers.test.ts
+++ b/test/providers.test.ts
@@ -39,7 +39,7 @@ test('CodeBuild provider privileged', () => {
     Environment: {
       PrivilegedMode: true,
     },
-  }), 2/*runners*/+3/*image builders*/);
+  }), 2/*runners*/ + 3/*image builders*/);
 
   template.hasResourceProperties('AWS::CodeBuild::Project', Match.objectLike({
     Environment: {
@@ -73,6 +73,7 @@ test('Fargate provider', () => {
   new FargateRunnerProvider(stack, 'provider', {
     vpc: vpc,
     securityGroups: [sg],
+    ephemeralStorageGiB: 100,
   });
 
   const template = Template.fromStack(stack);
@@ -87,6 +88,7 @@ test('Fargate provider', () => {
         Name: 'runner',
       },
     ],
+    EphemeralStorage: { SizeInGiB: 100 },
   }));
 });

@ToddMurphy92
Copy link
Contributor Author

No worries @kichik
I've made you a collaborator of the fork I created - did that fix the issue for you?

@kichik
Copy link
Member

kichik commented Nov 29, 2024

I still couldn't push from CodeSpaces but the UI worked 🤷

@kichik kichik changed the title fix: Fargate provider storage size changes don't work fix: Fargate provider storage size setting doesn't work Nov 29, 2024
@mergify mergify bot merged commit d293ca2 into CloudSnorkel:main Nov 29, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants