Closed jacobtylerwalls closed 5 days ago
@jacobtylerwalls
I appreciate all the hard work you've put into this PR. As it’s taking shape, I’m starting to feel that we might be adding more complexity than necessary, and it may be overall better to just stick with the settings declaration. I’d love to hear your thoughts on this and I'm for sure open to discussion.
I’m starting to feel that we might be adding more complexity than necessary, and it may be overall better to just stick with the settings declaration. I’d love to hear your thoughts on this and I'm for sure open to discussion.
I hear that. Let me take one last go at removing the requirement at a specific INSTALLED_APPS ordering and see how it looks after that.
The expectation is that I would then see bar's console log. However I see arches-core console log.
Thanks for the repro steps -- I followed it and got the same result.
Then I retested on dev/7.6.x, and I found that in the sanity-check step before deleting any files, I see my foo
log statement, when we would expect bar
. And then removing and rebuilding obviously falls back to core.
So, my impression is that we're improving the situation slightly with this PR. Do you see the same?
(Hm, if project files are supposed to overwrite arches applications files, perhaps the new behavior isn't really an improvement.)
Ah -- yeah sanity checks for the win. Once https://github.com/archesproject/arches/pull/11147 is merged into dev/7.5.x
and dev/7.5.x
is merged into dev/7.6.x
and then those changes are merged/tested here, we should be g2g 👍
Retested the scenario from above, looking clear now 😎
Ah I thought we had consensus on collapsing the app/project distinction, but no problem to cleave that off here and propose it separately to vet it throughly 👍
I'll just flip the bit in the apps.py template to set is_arches_application = False
and just document that when you're ready to graduate to a reusable app you need to flip the bit.
Hopefully flipping the bit will become unnecessary!
Ah I thought we had consensus on collapsing the app/project distinction, but no problem to cleave that off here and propose it separately to vet it throughly 👍
I'll just flip the bit in the apps.py template to set
is_arches_application = False
and just document that when you're ready to graduate to a reusable app you need to flip the bit.Hopefully flipping the bit will become unnecessary!
Ah I may have missed that. Ideally I'd rather have the settings_util updated to filter our the project its called from, but if that's not kosher I'd much rather have it as it currently is instead of needing the user to flip a bit to make a project an Arches app
Oh perfect, I'll do that.
Then I would want to clarify the settings.py <--> webpack interface to use a key like "arches applications other than this one/app root" (overly descriptive ? 😛 ) so we can keep using is_arches_application
in apps.py to represent "anything built with arches", no bit flipping necessary.
Then we can decide what we mean by "arches application" -- do we mean "anything you build with arches"? (my hope)
Oh fair! Yeah I'm down to update the key to something like EXTERNAL_ARCHES_APPLICATIONS
.
But taking a step back, this all may be unnecessary. I'd say don't a change a thing today, I'd like some time to think if what we currently have will break anything. Because the more I think on it, the more sorta like having the project also be counted as an Arches application 👍
Apologies for the run-around 😅
No worries. My expectation is that it will give implementers a little more control over what overrides what via just reading from the order of INSTALLED_APPS. We can provide sensible defaults, but ultimately the implementer can do whatever they want. (Should feel natural to them if coming from a Django background, which was my takeaway from the convo after core standup the other day.)
Thanks for the review @chrabyrd!
Types of changes
Description of Change
If we shift the burden from declaring arches applications from the installer to the publisher, then the installer can just put it in
INSTALLED_APPS
like any django app. We can then presumably extend on this pattern to let the publisher of the app declare whether their app has graphs, business_data, etc., without any further friction for the installer.The publisher would do this in apps.py:
Issues Solved
Closes #11009
Checklist
Ticket Background
Further comments