Skip to content

Return costs#155

Draft
adityathebe wants to merge 5 commits intomainfrom
return-costs
Draft

Return costs#155
adityathebe wants to merge 5 commits intomainfrom
return-costs

Conversation

@adityathebe
Copy link
Copy Markdown
Member

@adityathebe adityathebe commented Feb 27, 2023

Add Costs to Scrape Result.

Comment thread scrapers/aws/cost.go Outdated
@github-actions
Copy link
Copy Markdown

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.

Comment thread scrapers/aws/cost.go Outdated
@yashmehrotra
Copy link
Copy Markdown
Member

LGTM, @moshloop please have a second look

Comment thread scrapers/runscrapers.go
if result.Costs != nil {
gormDB := db.DefaultDB()
var accountTotal1h, accountTotal1d, accountTotal7d, accountTotal30d float64
for _, item := range result.Costs.LineItems {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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