-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add build metadata collection #3751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I agree with this idea in general. I also prefer JSONField because the reason you mentioned and besides because it's easy to make queries and rely completely in the db instead of end writting hacky chunks of Python to query what we want. Creating a relation table, will involve more work on maintaining it (adding new fields / removing olds / making mistakes on the data type, etc). I prefer to avoid this. This raised me more questions:
Relying on the data from the JSONField to display things to the user under the Build page makes me a little of noise on "relying on data that maybe is not available / chaged the scheme" and won't be easy to notice. |
YAML -> dict -> JSON should be fine as we don't have any odd types in there like datetime. Fun unrelated fact: python's
All of this will need to be conditional in the templates, yeah. That is a downside to schemaless here. Writing these templates might be annoying, but we'll have legacy builds that are missing this data to worry about as well. |
We are already saving the config used on the db #4749, I guess we can close this. |
The only thing missing from the original request is the The Docker image SHA is saved into the
I'm closing here but feel free to reopen if you consider, @agjohnson. Also, we should open another issue to discuss about how to present this information to the user somewhere. |
As we are pushing projects to use
readthedocs.yml
, we are losing the ability to query our database for builds that should be using a certain build container, python version, etc. Having a table that tracks the metadata for each build would be helpful for users as well as for debug and making design decisions on our side.Some of the metadata we might track:
readthedocs.yml
, though we also want this for historical build metadata that is in the databaseAnything that we might want to show to the user on the build output page could be useful to track.
There are a number of ways to address this from the technical side. Concerning storage:
I lean towards JSONField, as we don't have to worry about the schema of what we're storing. Metadata will be mostly used for some display, querying all builds/projects will be more expensive but very infrequent. We might, for instance, want to query to see how many projects are using our
latest
build image, but that will be rare.The text was updated successfully, but these errors were encountered: