- Assigned to jurgenhaas
- @jurgenhaas opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 3:34pm 28 January 2023 - π©πͺGermany jurgenhaas Gottmadingen
This MR keeps all the ECA related cache actions in place and adds 3 equivalent actions for "raw cache" operations.
- π©πͺGermany mxh Offenburg
Back then we had a discussion on what scope ECA should support when dealing with certain backends (cache, state etc.). It's somewhere in the issue queue where I implemented all these actions. We agreed on the limited scope, so that we don't get into unforseen trouble. I advise to not support "just everything". Touching raw data of other components outside of ECA is a high risk on opening a Box of Pandora.
Since, a developer could access them by creating a custom module anyway.
For such a case, it makes sense that a developer takes care of it, either with a custom module or a specific custom action that takes care of it properly.
- π©πͺGermany jurgenhaas Gottmadingen
The discussion was at https://www.drupal.org/project/eca/issues/3277898#comment-14516498 β back in May 2022:
Q: This is caching in an ECA "sandbox", i.e. we do not grant access to other caches in the Drupal instance, correct?
A: Yes correct, this mechanic is supposed for ECA-related stuff only. Affecting other caches can quickly break a site's performance which may lead to downtimes etc. Touching other caching parts of Drupal should be a developer's task.
I'd think that we've learned a lot ever since. ECA is here to replace custom code for those who prefer to do that. And most of the stuff in ECA is capable enough to break sites. Especially because it allows to switch to user 1 where it is possible to delete in fact every entity without limitation.
That said, it might become a requirement to introduce some sort of permission system to protect the usage of certain plugins during the modelling phase, i.e. to only grant access to certain plugins for users with special permissions. Very much like the
restrict access: true
property on permissions. - πΊπΈUnited States eswiderski
Agree @jurgenhaas.
@mxh It seems like we'd be limiting ECA's scope just for this use case. If a vision for ECA is to indeed empower non-developers and alleviate custom development, then this would be extremely powerful. Personally, ECA has already allowed me to eliminate 30-40 modules. But also realize the project needs some guardrails.
That stated, ECA is life-changing without this capability...and completely respect both of your pov's. Just my $0.02.
- Status changed to RTBC
almost 2 years ago 1:14pm 1 February 2023 - π©πͺGermany danielspeicher Steisslingen
For me, the features are very helpful.
-
jurgenhaas β
committed 3dc0c4c7 on 1.2.x
Issue #3333644 by jurgenhaas, eswiderski, danielspeicher, mxh: Extend...
-
jurgenhaas β
committed 3dc0c4c7 on 1.2.x
- Status changed to Fixed
almost 2 years ago 1:44pm 1 February 2023 - π©πͺGermany jurgenhaas Gottmadingen
Taking this one carefully and being fully aware of the responsibility we take, I think it's reasonable to accept this MR with 3 pro and 1 con advice.
- Status changed to Needs work
almost 2 years ago 2:46pm 1 February 2023 - π©πͺGermany mxh Offenburg
Furthermore, no tests were added to the new actions yet. In general, adding automated tests to new plugins is always recommended.
- Assigned to mxh
- @mxh opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 2:34pm 3 February 2023 - π©πͺGermany mxh Offenburg
MR303 fixes the failing test, as the trait had a wrong copy-paste from the previous logic. I had to adjust that accordingly, otherwise our cache configured actions behave differently when using 1.2.x branch (cache invalidation currently doesn't work at all).
#16 still remains open.
-
jurgenhaas β
committed 85df0f81 on 1.2.x authored by
mxh β
Issue #3333644 by jurgenhaas, mxh, eswiderski, danielspeicher: Extend...
-
jurgenhaas β
committed 85df0f81 on 1.2.x authored by
mxh β
- Assigned to jurgenhaas
- Status changed to Needs work
almost 2 years ago 9:59am 5 February 2023 - π©πͺGermany jurgenhaas Gottmadingen
Oh, I see my mistake. Thanks for finding and fixing this. I've merged this after a small adaption in
\Drupal\eca_cache\Plugin\Action\EcaCacheTrait::getCacheKey
for better readability.Assigning the issue to myself for work on the missing tests.
- @jurgenhaas opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 2:38pm 12 February 2023 - π©πͺGermany jurgenhaas Gottmadingen
Tests for the extended cache actions are ready for review.
- Status changed to RTBC
over 1 year ago 9:56am 15 February 2023 - π©πͺGermany danielspeicher Steisslingen
Test was added, which is pretty nice.
-
jurgenhaas β
committed 7751fe0b on 1.2.x
Issue #3333644 by jurgenhaas, mxh, eswiderski, danielspeicher: Extend...
-
jurgenhaas β
committed 7751fe0b on 1.2.x
- Status changed to Fixed
over 1 year ago 1:15pm 15 February 2023 - π©πͺGermany jurgenhaas Gottmadingen
Great, thanks a lot. This is now also merged and closed.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
about 1 year ago 7:14pm 22 September 2023 - πΊπΈUnited States eswiderski
Can we merge this into one of the newer dev branches?
- π©πͺGermany jurgenhaas Gottmadingen
@eswiderski this got merged into the latest dev release back in February already. As it is a new feature, it won't go back into 1.1.x, though. If you need to make it available in 1.1.x for one of your installations, you needed to patch your installation.
- πΊπΈUnited States eswiderski
Ok, was it merged into 1.1.x-dev and 1.2.x-dev? I'm not seeing any difference behavior in 1.1.x-dev.
- π©πͺGermany jurgenhaas Gottmadingen
No, it's only merged into 1.2.x (which is now 2.0.x) and won't get into 1.1.x because it's a new feature and not a bug fix.
- πΊπΈUnited States eswiderski
Ahh, ok thank you! I was still using 1.2.x-dev.