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

provide default accumulation for custom costs API #2630

Merged
merged 4 commits into from Mar 12, 2024

Conversation

ameijer
Copy link
Contributor

@ameijer ameijer commented Mar 12, 2024

What does this PR change?

  • provides default accumulation options for time series endpoint

Does this PR relate to any other PRs?

How will this PR impact users?

Does this PR address any GitHub or Zendesk issues?

  • Closes ...

How was this PR tested?

Does this PR require changes to documentation?

Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opencost ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 5:46pm

}

// GetCustomCostAccumulateOption determines defaults in a way that matches options presented in the UI
func getCustomCostAccumulateOption(window opencost.Window, from []opencost.AccumulateOption) (opencost.AccumulateOption, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This appears unit test-worthy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added!

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
…into atm/default-accum-opts

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
@ameijer
Copy link
Contributor Author

ameijer commented Mar 12, 2024

@michaelmdresser I added a unit test - would you be able to merge this?

Copy link

sonarcloud bot commented Mar 12, 2024

@michaelmdresser michaelmdresser merged commit c2c9880 into opencost:develop Mar 12, 2024
6 of 7 checks passed
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.

None yet

2 participants