-
Notifications
You must be signed in to change notification settings - Fork 523
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:(AWS) Adds support for Ephemeral Storage #2304
Conversation
@aliscott The build seems to be failing because it can't access AWS. |
@robh007 sorry for the delay, I've been struck by the virus. Those errors look expected. It looks like the sync usage stuff which is okay for the tests. The test failures seem to be because the usage data was updated. Did you have AWS credentials exported in your shell when running the update the tests? |
Not that I'm aware of, I've ran the updates again & nothing new as generated. Do I need to do anything else? |
@robh007 I hope you don't mind I just pushed a commit to this branch to update the tests to see if that helps. I ran the following:
|
@robh007 the failing tests are now fixed in master, so this so pass the tests when rebased. |
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.
Thanks @robh007 this is awesome! I added a couple of comments. It also looks like the rebase went a bit weird.
|
||
func (a *LambdaFunction) storageCostComponent(quantity *decimal.Decimal, storageType string) *schema.CostComponent { | ||
return &schema.CostComponent{ | ||
Name: "Ephemeral Storage", |
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.
Name: "Ephemeral Storage", | |
Name: "Ephemeral storage", |
storageGBSeconds = decimalPtr(calculateStorageGBSeconds(storageSize, *gbSeconds)) | ||
|
||
costComponents = append(costComponents, a.storageCostComponent(storageGBSeconds, storageType)) |
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.
I think we can move this logic down to be in the same block that we add the duration cost component, since we're already calculating monthlyRequests
and gbSeconds
there.
|
||
costComponents = append(costComponents, a.storageCostComponent(storageGBSeconds, storageType)) | ||
} else { | ||
costComponents = append(costComponents, a.storageCostComponent(decimalPtr(decimal.NewFromInt(0)), storageType)) |
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.
costComponents = append(costComponents, a.storageCostComponent(decimalPtr(decimal.NewFromInt(0)), storageType)) | |
costComponents = append(costComponents, a.storageCostComponent(nil, storageType)) |
I think this means it will show the pricing instead of a zero cost, which is what we want if there's no usage data added.
36b8a7f
to
1957878
Compare
Finally!!! Hopefully!!! @aliscott |
Thanks @robh007! |
Should close #2138