Skip to content

BUG - Discounts/pricing may not be calculated correctly - needs thorough QA #75

@jmimico

Description

@jmimico

In production we sometimes have to provide credits for downtime of service. We do this by editing 'default.py' in the billing api.

Example:
{
'period_start': '2018-05-25',
'period_end': '2019-04-01',
'cpu_price': 0.03,
'volume_price': 0.000067,
'image_price': 0.000067
},
{
'period_start': '2019-04-02',
'period_end': '2019-04-03',
'cpu_price': 0,
'volume_price': 0,
'image_price': 0
},
{
'period_start': '2019-04-04',
'period_end': '2019-11-01',
'cpu_price': 0.03,
'volume_price': 0.000067,
'image_price': 0.000067
},

OR

{
    'period_start': '2019-04-04',
    'period_end': '2019-11-01',
    'cpu_price': 0.03,
    'volume_price': 0.000067,
    'image_price': 0.000067
},
{
    'period_start': '2019-11-01',
    'period_end': '2019-11-02',
    'cpu_price': 0.02,
    'volume_price': 0.000044,
    'image_price': 0.000044
},
{
    'period_start': '2019-11-02',
    'period_end': '2019-11-07',
    'cpu_price': 0.03,
    'volume_price': 0.000067,
    'image_price': 0.000067
},
{
    'period_start': '2019-11-07',
    'period_end': '2019-11-08',
    'cpu_price': 0.015,
    'volume_price': 0.0000335,
    'image_price': 0.0000335
},
{
    'period_start': '2019-11-08',
    'period_end': '2019-11-15',
    'cpu_price': 0.03,
    'volume_price': 0.000067,
    'image_price': 0.000067
},
{
    'period_start': '2019-11-15',
    'period_end': '2019-11-16',
    'cpu_price': 0.015,
    'volume_price': 0.0000335,
    'image_price': 0.0000335
},
{
    'period_start': '2019-11-16',
    'period_end': '2020-12-31',
    'cpu_price': 0.03,
    'volume_price': 0.000067,
    'image_price': 0.000067
}

After reviewing the invoices I am not confident that the discounts are always configured correctly. I am asking that

  1. Some QA be performed to the discounts
  2. A friendlier way to apply discounts be made

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajorHigh Priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions