canonical / canonical/awsmp

unable to update pricing dimensions for instance-types on free products

Open
#89 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6
Forks
9
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
while looking to fix #87 i encountered issues with updating the pricing dimensions.

i haven't done a deep analysis on this, but i suspect a reproducer is simply adding new instance types to an existing listing. this does require slight deviations from the existing impl of the PR, but i suspect this will occur even after a proper implementation is complete on getting `--allow-pricing-update` fully respected.

when viewing the request in the marketplace console, the following error is shone

```
INVALID_RATE_CARD
Rates can't be removed from UsageBasedPricingTerm. Provide prices for all dimensions in the existing rate card.
```

**To Reproduce**
Steps to reproduce the behavior:
1. use #88 with a slight modification:
add `and not allow_pricing_update` to line containing `if (pricing_type or all_zero_to_paid(diffs_hourly) or all_zero_to_paid(diffs_annual)):`
2. this step is unclear at the moment. one of the following is likely the right step
2.1 adjust config file with a new instance type (paid or free is fine)
2.2 adjust config file to remove instance type (paid or free is fine) - i believe this is the real reproducer
4. apply config to listing

**Expected behavior**
Running `update` or `update-instance-type` with added/removed instance types is able to remove existing instance types/adjust pricing of existing instance types

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the implementation referenced in #88, especially the pricing-update condition and the config used by update and update-instance-type. Reproduce the issue by adding and removing instance types, then compare the marketplace request and rate-card error; done means existing dimensions and instance types update without INVALID_RATE_CARD.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.