appuio / appuio-cloud-reporting

Reporting for APPUiO Cloud
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add type in products #141

Closed zugao closed 1 year ago

zugao commented 1 year ago

Summary

This PR adds column type to the products table. The type column groups a set of targets. For instance products with target 2, 8 and 10 is of type appcat.

Checklist

zugao commented 1 year ago

You can't retroactively change migrations. You need a new migration to add the column.

Ah I see, it's like with percona tools. Understood.

Can you link the documentation for this field? Or update the one we have? https://kb.vshn.ch/appuio-cloud/references/architecture/metering-data-flow.html

Thanks for directions, I was very much unsure what has to be updated.

zugao commented 1 year ago

Can you link the docs?

I will create a PR soon in the docs. Meanwhile you can wait approving this PR.

I have no idea what this field is for without the context you have. cc @corvus-ch

Well we need it for reporting dashboards. The goal is internal to team Schedar. Aldebaran also might want to apply some kind of groupings to its products. The value is not mandatory.

corvus-ch commented 1 year ago

Well we need it for reporting dashboards. The goal is internal to team Schedar. Aldebaran also might want to apply some kind of groupings to its products. The value is not mandatory.

That is a dangerous path to go. We must be really cautious about what we add to the billing system and why. Note that there is already some, although implicit, grouping available: the source string of products. If segmenting of the product's source string is done right, it could be used to build grouping.

zugao commented 1 year ago

Well we need it for reporting dashboards. The goal is internal to team Schedar. Aldebaran also might want to apply some kind of groupings to its products. The value is not mandatory.

That is a dangerous path to go. We must be really cautious about what we add to the billing system and why. Note that there is already some, although implicit, grouping available: the source string of products. If segmenting of the product's source string is done right, it could be used to build grouping.

I personally don't see any issues with this new column, it will greatly reduce the complexity of queries and will eliminate the need to update grafana dashboards. I don't see a good alternative but we can have a short call to dive into this topic as I am not expert with our billing solution.

zugao commented 1 year ago

We decided to go with a different approach - changing the source string. Closing this PR