-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Simplify modeling for builds and Sphinx context data #3103
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
Ping @ericholscher |
Agreed 100%. We use a lot of the project modeling though in the build, which is why it's hard to break this out historically. This is a good starting point to completely breaking the builder code out, which seems like a useful end game. |
I really want the builds to use other modeling instead of the Project, so it would be much more explicit what you can use that doesn't depend on hitting the DB. |
This also relates to #3054, and I believe the full list of build data required is here: https://github.com/rtfd/readthedocs.org/pull/3054/files#diff-fab3f6c80eb0a5d20dc58fae29ac388dR28 |
Yeah, i was thinking the full build return Project API endpoint would just have the attribute fields appended there. I haven't done an audit to see how many argument methods we are using yet however. I was also considering secondary modeling, though if we are able to make this 100% api driven, that might not be necessary. We'll just treat the objects as glorified dicts from Slumber. I can definitely see a case where we might want modeling though. I also started considering what a new API might look like, without getting too serious about it. I think the Way of The Future is to use OpenAPI and schema to auto generate a client. This would supplement the need for modeling on the client side -- again, if we're 100% api driven. |
I don't think this issue is valid anymore. We are moving away from injecting data on the Sphinx context (see readthedocs/addons#72) Also, I don't think we will change our internal Project and API modeling at this point. I would say that the next step here will eventually be "Isolating the build process" (as discussed in https://github.com/readthedocs/meta/discussions/135) |
Considering our patterns for how we use model data in our builders, there are a few deficiencies:
DONT_HIT_DB
setting. But our builders should never hit the DB, they should always be API driven.Project
objects, so that we can use some of the model methods. I feel like this should also be API driven, with all of these method instead becoming attributes, and the API returns these attributes hard codedThis will offer a few benefits:
Solution
Project
and return these selectively from the API.This will take a larger audit of how we are using data from the API, and perhaps blends in with a larger API v3 project. I think we can keep this separate however.
The text was updated successfully, but these errors were encountered: