- First commit to issue fork.
- Merge request !262Add Search API and Config Readonly integration submodule → (Merged) created by averagejoe3000
- 🇺🇸United States averagejoe3000 Swanzey, NH
The reference issue in #2 was fixed about a year ago. I just ran into this on a project so I've created an MR with my solution.
I created a submodule so people could easily decide if they wanted to enable this feature or not.
The submodule uses an event subscriber to mark certain confirm forms as editable. I hardcoded the list of form IDs that should be allowed to be used. My thought process was that any confirm form that doesn't modify config should be allowed, so the confirm forms to disable an index or server are not in the allowed list.
This should have some tests, but I was unsure how to approach with integrating the 2 modules.
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks, looks great!
However, I see no reason to have that as part of a sub-module. I don’t think the current behavior (not being able to reindex because theconfig_readonly
module is installed) is really expected or desired by anyone.
And even if it is, there are certainly better ways to implement this than an entire sub-module for four lines of code. (A hiddent setting in our module config, for instance. We do have a few of those already.)I therefore removed the submodule and moved the event subscriber directly into the main module.
I also added theconfig_readonly
module as a dev dependency. Would you be able to write an integration test for this new functionality? It would just have to enable theconfig_readonly
module, then go through all the forms this module provides (use, for instance, thesearch_api_test_db
module to get some config to work with) and make sure that exactly the ones we expect to be submittable actually are.In any case, thanks again!
Would be great to resolve this. - 🇺🇸United States averagejoe3000 Swanzey, NH
That makes sense to me, I went back and forth on whether to do the submodule or not.
I can take a pass at writing the tests. Thanks for pointing me in the right direction on them, writing tests is still new to me.
- 🇺🇸United States averagejoe3000 Swanzey, NH
Tests have been added. The pipeline is failing, but I'm unsure if due to my new tests or something else.
Looking at the logs all PHPUnit tests passed (and is showing the 5 new tests I added as passing), but the failure seems to happen at "Uploading artifacts as "archive" to coordinator".