Include run costs into export runs report
- Dominant language
- Java
- Stars
- 163
- Forks
- 65
- Avg merge
- 11h 46m
- Merged PRs (30d)
- 29
Description
**Background**
At the moment, `POST /run/filter/export` method does not include run costs into report and it would be nice to support it.
**Approach**
1. Currently, run object provides the following information about prices:
- `computePricePerHour` - virtual machine price per hour
- `diskPricePerHour` - instance disk gigabyte price per hour
- `fsPricePerHour` - filesystem price per hour taking into account its current capacity. This value shall be updated as per as the file system capacity is updated.
- `pricePerHour` - overall run price per hour:
```
pricePerHour = computePricePerHour + * diskPricePerHour + fsPricePerHour
```
`pricePerHour` value shall be updated after disk autoscaling process.
Note: run object does not provide full disk price per hour directly. But this value can be estimated as:
```
= pricePerHour - computePricePerHour - fsPricePerHour
```
2. In case of cluster run, master run objects contains `workersPrice` - the estimated total price for all workers
3. As far as run can be paused, compute costs shall be respected only for active periods.
Thereby, estimated run costs can be calculated the following way:
```
* computePricePerHour + * (pricePerHour - computePricePerHour) + workersPrice
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the POST /run/filter/export endpoint and trace how run objects are assembled for the report. Use the stated active-hours, total-hours, pricePerHour, and workersPrice formulas, including paused runs and cluster workers; done means exported reports include the estimated run cost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100