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

Return costs #155

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Return costs #155

wants to merge 5 commits into from

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented Feb 27, 2023

Add Costs to Scrape Result.

scrapers/aws/cost.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 27, 2023

E2E -

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 5bf2654.

♻️ This comment has been updated with latest results.

scrapers/aws/cost.go Outdated Show resolved Hide resolved
@yashmehrotra
Copy link
Member

LGTM, @moshloop please have a second look

if result.Costs != nil {
gormDB := db.DefaultDB()
var accountTotal1h, accountTotal1d, accountTotal7d, accountTotal30d float64
for _, item := range result.Costs.LineItems {
Copy link
Member

Choose a reason for hiding this comment

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

I think this is missing external_type, Did we also not extract this into a common clause so that we con't have to keep repeating it ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@moshloop external type wasn't being used in aws/cost.go which is where this code comes from. Should I add it?

@adityathebe
Copy link
Member Author

On hold for now because we might need to add a separate costs table first.

@moshloop moshloop marked this pull request as draft September 12, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants