Improve storing of the package configs #2724
Labels
area/database
Related to the Packit's database
complexity/single-task
Regular task, should be done within days.
kind/internal
Doesn't affect users directly, may be e.g. infrastructure, DB related.
Related to packit/packit#2306
This topic came up during an arch discussion about logging of the package configs. Currently we store the configs as JSON in the database with each of the project events, this “may” be a bit wasteful, given that the configs should not change that often.
To optimize this, we should be able to hash a canonical JSON as a string. This would allow us to store the JSON only once (in a separate table) and reference it from the “project event model”.
As for the canonical from, only nested dictionaries do not guarantee an order, but
json.dump
provides an option to resolve this, therefore it should be possible to obtaine a canonical JSON by following:Permalink to the field as of the time of creating this issue:
packit-service/packit_service/models.py
Line 1595 in 99ff2c5
The text was updated successfully, but these errors were encountered: