- 🇵🇱Poland alorenc Wolsztyn, 🇵🇱
We are creating entities programmatically and we hit "When there are two different legal document versions created at the same second." case.
Maybe better replace that to "return $entity->bundle() . '_' . microtime(TRUE);"? Still far from perfection but slightly less likely we will get a fatal error. - 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Why not fixing it once for ever? I mean to move to serial. But the update path will not be easy (probably)
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Anyway, there's no 4.0.x stable release yet. So, maybe, we afford to break backwards compatibility. Still need to check whether 4.0.x is aligned with 3.0.x
- @alorenc opened merge request.
- @claudiucristea opened merge request.
- last update
over 1 year ago CI aborted - last update
over 1 year ago 17 pass, 4 fail - last update
over 1 year ago 17 pass, 4 fail - last update
over 1 year ago 17 pass, 4 fail - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 17 pass, 4 fail - last update
over 1 year ago 17 pass - last update
over 1 year ago 17 pass - Status changed to Needs review
over 1 year ago 3:53pm 12 May 2023 - 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Few notes for reviewer:
- This conversion is extremely complex. I couldn't fined any documentation or example on how to change the entity ID type (in this case from string to serial).
- After several tries to use the entity definition update service, I've gave up and chose to do direct queries against the database.
- There are no tests. I tried to add but it was overkill and overwhelming. This should be tested manually (tagged as so)
- There's also an update path for views using the changed fields. However, I acknowledge that might not cover the whole situations out in the wild. At least, it covers the view provide by the module but also other views. For sure not all views that can be imagined based on the entities provided by this module. But such views are quite easy to be fixed from the UI by site builders, if case.
- We're doing this change in
4.0.x
, which is a module's new major version. That means any disruption is acceptable, including not having a 100% update path. Projects are responsible to adapt, even to provide additional update paths if they need.
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 17 pass, 4 fail - last update
over 1 year ago 17 pass, 3 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 16 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 16 fail - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 17 pass, 1 fail - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Republishing reviewer notes:
- This conversion is extremely complex. I couldn't find any documentation or example on how to change the entity ID type (in this case from string to serial).
- After several tries to use the entity definition update service, I've gave up and chose to do direct queries against the database. Still used the entity definition update service where it was possible.
- Added update path test coverage. However, this should be tested also manually (tagged as so).
- There's also an update path for views using the changed fields. I acknowledge that it might not cover the whole situations out in the wild. At least, it covers the view provided by the module but also other views. For sure not all views that can be imagined based on the entities from this module. But such views are quite easy to be fixed from the UI by site builders, if case.
- We're doing this change in 4.0.x, which is a module's new major version. That means any disruption is acceptable, including not having a 100% update path. Projects are responsible to adapt, even to provide additional update paths if they need.
- Initially I've encountered an edge case failure, which is documented in
entity_legal_update_last_removed()
. I know, my workaround doesn't look so goods but it's efective. If you want to see the failure just move the code fromentity_legal_update_last_removed()
(the lines insideif (...)
) intoentity_legal_update_9002()
. - The update path has been tested with MySQL and PostgreSQL. If there are projects with other DB drivers we're more than happy to accept patches that are improving the update path.
- 🇬🇷Greece idimopoulos
Adding https://www.drupal.org/project/entity_legal/issues/3358135 🐛 Missing query access check WSOD Closed: duplicate as a related issue only because that issue is more specific to something that was already fixed in the current one without being in the scope.
- last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - last update
over 1 year ago 18 pass - Status changed to RTBC
over 1 year ago 11:44am 23 May 2023 -
claudiu.cristea →
committed 22fd03fd on 4.0.x
Issue #3163562 by claudiu.cristea, alorenc, leymannx, alex.stanciu:...
-
claudiu.cristea →
committed 22fd03fd on 4.0.x
- Status changed to Fixed
over 1 year ago 11:58am 23 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.