-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Improve clarity of No New Apps ADR #31659
Comments
The README recommendation is a good idea, not just for edx-platform. If you have the capacity to, consider adding that to the Django App Patterns OEP. |
For new-app-observability, I wonder if you could leverage CODEOWNERS to trigger an Arch review request. |
@kdmccormick: I'm not sure exactly what this means. Will this make more sense in the future when-and-if we are using CODEOWNERS consistently over our legacy ownership spreadsheet? |
I'm wondering if this ADR should be separate from a how-to on adding a new app? New apps could have an ADR explaining why they are needed at all. The no-new-apps ADR is specifically looking for details in an ADR about why the app must live in edx-platform, rather than in an external repository. The creator of a new app may want to write a single ADR, but we need to ensure that both these requirements are met (or at least the requirement document in this ADR). See #31665 for an attempt to follow this ADR, and some possible clues on how we could make this all more clear. |
@robrap Putting aside both the legacy ownership and new maintainership systems... Arch-BOM could set up CODEOWNERS expressly for the purpose of enforcing this ADR, something like this: # Arch-BOM "owns" each Djangoapp root.
# (this is not "owns" in the sense of OEP-55 maintainership nor operator-ownership)
# This means that they will get pinged on any PR that modifies these directories.
# edx-platform settings could also be modified in order to restrict those PRs from
# merging without their review.
# This would apply to subdirectories (the actual Django apps) too, but we exempt those below.
lms/djangoapps @openedx/arch-bom
cms/djangoapps @openedx/arch-bom
common/djangoapps @openedx/arch-bom
openedx/features @openedx/arch-bom
openedx/core/djangoapps @openedx/arch-bom
# Existing Djangoapps are exempted (assigned to no owner).
lms/djangoapps/badges
lms/djangoapps/courseware
lms/djangoapps/course_api
...
cms/djangoapps/contentstore
...
etc. # remaining existing djangoapps Of course, if it seemed valuable in the future, the "existing djangoapps" section could be mapped to maintainership or operator-ownership assignments without disrupting this setup. I don't feel especially strongly about whether you folks go with this system, but I wanted to suggest it while you were considering solutions to:
|
@kdmccormick: This is a good idea. We also may want an ADR that explains why we decided to create the app to begin with. This ADR could then note the specific new requirements for the app ADR of any new app going directly into the edx-platform repository. Unfortunately, OEP-49 was added as type "architecture". I added notes around these two possible changes to OEP-49 in this new issue: openedx/open-edx-proposals#439. |
@kdmccormick: Understood. Managing ownership attribution in edx-platform is an odd job that Arch-BOM on-call has to take care of, and I wouldn't want any additional manual overhead. That doesn't mean we should do something like this, but I wouldn't do it until we can automate moving or duplicating the data. In the meantime, our current automation does serve as a linting mechanism, which is how I noticed a new app to begin with. |
@robrap I anticipate that edx-platform will be the very last repo to come under Maintainership in the new sense, and I think we need to be planning for the interim.
For this piece, I think we should solve for edx-platform specifically and not worry about it generalizing to other django apps. Are you saying though that the linting is sufficient and we don't need another mechanism? |
Yeah, I took this:
to mean that you were looking for an alternative new-app-detection solution. If you're all set on that front, though, then nevermind the CODEOWNERS thing. |
|
Here are additional questions that may affect this ADR, or related docs, like the plugins README.
Also note that the doc https://edx.readthedocs.io/projects/edx-developer-guide/en/latest/extending_platform/index.html is completely out-of-sync with the docs referenced in this ADR, which seems like a big documentation issue. |
Also, does anyone know of a good reference implementation for a plugin? I'm not sure if that is needed, but it was requested by @zainab-amir. |
I'm not sure if you're looking for input now, but here are my opinions anyway, in case they might be useful to the ADR author...
I will try to steel-man (give my most generous view on) the idea of adding direct dependencies as plugins:
But I also have counterarguments for all of these:
Personally, I lean towards my counterarguments: dependencies from
If, by "privately installed", you mean "not installed by base requirements" rather than strictly private, than I agree 👍🏻 To expand on what I mean, I could see there being public edx-platform plugins for generally-used features that we want run by default in named releases, yet we want implemented only using official edx-platform plugin APIs in order to keep them decoupled from edx-platform's core. Based on OEP-57, these would be a type of bundled extension. For example, if grading was reimplemented as a proper plugin, then we would keep it public and install it by-default into named releases.
I want to take a very hard-line stance there: All new features should be implemented as plugins and use official plugin APIs, like the XBlock framework or the Hooks API. If the plugin APIs are not sufficient, then they should be augmented to support the feature. Exceptions would only be made for features that really belong in the "core", although the only such features I can think of would be replacements for existing components, such as a replacement for the LMS courseware unit renderer. This lets us throw away the gut-threshold-of-usage calculation. Just make a plugin, and then let operators decide whether or not they want to use it (Calling back to the "dogfood" argument from the top of my comment: this is how we would really dogfood a plugin system. This policy would be a pain in the neck at first... but then it would lead us to make an awesome set of plugin APIs!) |
Thanks @kdmccormick. Great thoughts and I will be coming back to this soon. Note to self: There have been several requests for an example plugin in the plugin documentation. |
@davidjoy: [inform/question] Not sure if you want to participate in helping with any of these docs, or simply want to be aware of where all this lands, in relation to the extensibility question. Thanks. |
I'll happily read along and improve my mental model, but think that y'all have way more subject matter expertise here than I ever will, and that I implicitly trust your choices. I mean, if you want an opinion on something I'll give it, but otherwise I'd just lurk. 😛 |
I'm going to document things I think we need to do, and then unassign and move back to groomed (or TODO):
|
Thanks @robrap . |
@rgraber: You may want to take this other ticket into account: edx/edx-arch-experiments#206 |
Going to take a stab at summarizing the guidance we want to give, for my own benefit as well as posterity:
Note that here I'm not talking about where we will put all this guidance, just that this is the guidance we want to give. Is this more or less correct? |
I think that's a great summary 👍🏻 |
Great summary. The first point I'd add a little nuance.
The "ie" is where this gets tricky. Depending on what you are adding, and whether or not it will be core to the platform, it might require an interface that the edx-platform calls without knowing about your specific implementation. Part of these docs are about helping uncover these opportunities, and documenting them, and maybe even fixing them and making the appropriate API that didn't before exist. |
I'm not sure where to put the plugin-vs-not information (possibly https://docs.openedx.org/en/latest/developers/concepts/index.html ), but I definitely would not put it in the ADR for not adding new apps to the edx-platform repository. We could specifically say "this ADR does not address what kind of app you should create, for that, see :some doc:" |
Interesting that that doc points to an ADR in plugins, and not the README (or a how-to). I think the README should provide this context, and if you wanted to try to summarize anything in the concepts doc, you could try, but otherwise maybe we just point to the README instead (once updated). See https://github.com/openedx/edx-django-utils/blob/master/edx_django_utils/plugins/README.rst |
Whoops, I wasn't aware of this thread so I posted a long related idea on the forum. But the key points are:
Number 3 and 4 are not easily possible today, but I think we can easily make them possible with what I suggested in the thread (separating |
Thanks @bradenmacdonald.
I agree that pluggability is more important than the separate repo. I know there are advantages and disadvantages to the separate repos, so I'll leave that for now.
I think @kdmccormick introduced some linting capabilities around boundaries that would be an additional or alternate approach.
Note that sometimes the boundaries can't be respected as-is, and the platform needs to provide better interfaces. Part of this ADR was about helping explain and capture some of that information.
If the dependency isn't included, we get this for free, right? Are you just talking about the exceptions which we are trying to avoid? Could we use linting to help us avoid new exceptions, and then deal with the old ones at a later point in time?
I think the ADR should better explain when and why to use a plugin Django app, which is more than just putting code in a separate repo. In general I agree with your sentiments (except maybe the monorepo), and I'm simply just trying to add in other possibilities. |
Yeah that's true, as long as it's not installed by default that covers #4. But then your code won't be covered by edx-platform tests.
Yes, I think that's a good approach. I think it also works hand in hand with my |
Yup, importlinter is running on edx-platform PRs. The rules are pretty basic right now but I encourage folks to expand them & I am happy to help anyone who is interested but doesn't know where to start. One could certainly use importlinter rules to, say, add a library directly to edx-platform but enforce that the library doesn't rely on some/all other edx-platform apps.
I would gently push back on the idea that they can't be respected. I think that, historically, we have allowed those with direct edx-platform write access to disrespect the boundaries. Other community members were held to a higher standard: they were asked to use proper platform interfaces or create their own. That's why we now have the Hooks framework, Tutor plugins, etc. I am not trying to be adversarial here... as someone who has been there, it is hard to tell your product manager that you need to build a plugin interface in order to implement the feature X when your entire team possesses direct upstream commit rights and could easily implement X as another djangoapp under openedx/core/djangoapps. I think it might be in everyone's best interest to put hard limits on what can be added to edx-platform and base.in. |
I don't think we could write a lint rule for this, since there's no easy mapping of distribution names (the entries in |
I'm in broad agreement with the direction you folks are taking this. I do want to mention a couple historical reasons for the push to split out into separate apps like:
Right now, I think there's a kind of implicit assumption that there is a 1:1 relationship between an app/plugin and a repo, and I'd like to get away from that mindset. It's appropriate for certain repos like openedx-events, but I think it muddles other things. For instance, I don't think that "Enterprise" can ever be a coherent "plugin"–it's a feature that is probably a combination of a number of plugins to different plugin APIs in addition to a bunch of its own apps. But because it's thought of as "the place for enterprise things", it has an main |
Deleted my previous comments because I think they confused the issue more than helped.
In the future, we can update that third thing with more guidance about whether something is in base, or default, or a plugin, or what to do if you really can't separate something because our plugin API is missing something. |
I've got more thoughts and don't yet have time to document before a meeting. For now:
|
Here is the PR for that first bit: #31863 |
Some additional clarification of the three A/C I proposed:
|
Is someone with write access able to merge openedx/docs.openedx.org#267 ? |
This may be all set, but I still plan to review. Feel free to close when you think it is ready, and I can always create a new ticket. |
@kdmccormick @robrap @ormsbee @rgraber I wrote a new importlinter configuration that can enforce OEP-49 |
I think this can be closed. The original intent was to make it clearer that we just wanted certain information in the ADR that is required by OEP-49 and have a clearer starting point to people who want to begin developing a plugin, which I think we've done. |
A reader of https://github.com/openedx/edx-platform/blob/master/docs/decisions/0014-no-new-apps.rst misinterpreted this as meaning that the service shouldn't be added to at all. The various sections of the ADR could be re-worded to make it abundantly clear that this is not about eliminating the ability to add new apps to the LMS, but only to keep that new code outside of the edx-platform repository.
Other related notes:
Acceptance Criteria
The text was updated successfully, but these errors were encountered: