netbookai / spawner

Mulit-Cloud infrastructure orchestrator for kubernetes first development.
https://netbook-2.gitbook.io/netbook-docs/opensource/docs/spawner
GNU General Public License v3.0
56 stars 10 forks source link

Change cost type #36

Closed imaskm closed 2 years ago

imaskm commented 2 years ago

Description

cost from clouds is returned in float/string format, in spawner now we are using Decimal type for all operations, the cost rpcs will return the cost 1/100th of cents as integer

Fixes # (issue) avoid using float as cost type

Type of change

Please delete options that are not relevant.

why

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

NishanthSpShetty commented 2 years ago

can we wrap errors instead of returning err directoctly with some message or function name, like

return errors.Wrap(err, "GetApplicationCost")

or with more description as return errors.Wrap(err, "GetApplicationCost: unable to get the value")

imaskm commented 2 years ago

can we wrap errors instead of returning err directoctly with some message or function name, like

return errors.Wrap(err, "GetApplicationCost")

or with more description as return errors.Wrap(err, "GetApplicationCost: unable to get the value")

Done

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.9% 2.9% Duplication