Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the cron key is in the configuration system. However it seems like it more rightly belongs in the state system. It is generated new on every site install, and there is no real use case for deploying the same cron key around a set of sites. When I tried to think through a use case with msonnabaum, he felt that this was not realistic. This would require
- Removing cron_key from system.cron.yml
- Changing the config() calls to state() calls
Comment | File | Size | Author |
---|---|---|---|
#19 | cron_key_to_state-1821530-19.patch | 6.9 KB | LinL |
#18 | cron_key_to_state-1821530-18.patch | 6.98 KB | LinL |
#17 | cron_key_to_state-1821530-17.patch | 6.98 KB | LinL |
#16 | cron_key_to_state-1821530-16.patch | 6.99 KB | LinL |
#9 | cron_key_to_state-1821530-9.patch | 6.95 KB | alexpott |
Comments
Comment #1
LinL CreditAttribution: LinL commentedComment #3
msonnabaum CreditAttribution: msonnabaum commentedAgreed. This does not seem like config. Good use case for state.
Comment #4
msonnabaum CreditAttribution: msonnabaum commentedoops.
Comment #5
LinL CreditAttribution: LinL commentedMissed one, here's another go.
Comment #6
LinL CreditAttribution: LinL commentedComment #7
alexpottTagging...
Comment #8
BerdirSame here, I think this should now use the state update helper function.
Comment #9
alexpottPatch attached makes change suggested in #8 and adds test.
Comment #10
alexpottTesting...
Comment #11
BerdirLooks good, RTBC if it passes the tests.
@Core maintainers: We've RTBC'd quite a few of these conversion issues today. When committing, make sure that update numbers don't clash and if they do, either fix that or set it to needs work. You can alternatively also run update.php before commiting to be sure that everything's fine.
Comment #12
catch#9: cron_key_to_state-1821530-9.patch queued for re-testing.
Comment #14
Berdir#9: cron_key_to_state-1821530-9.patch queued for re-testing.
Comment #15
gddGreen!
Comment #16
LinL CreditAttribution: LinL commentedRe-roll, patch no longer applied.
Comment #17
LinL CreditAttribution: LinL commentedAnd again. Last one had an extra space.
Comment #18
LinL CreditAttribution: LinL commentedUpdating system_update_N
Comment #19
LinL CreditAttribution: LinL commentedRe-roll, patch no longer applied.
Comment #21
LinL CreditAttribution: LinL commented#19: cron_key_to_state-1821530-19.patch queued for re-testing.
Comment #22
gddBack to RTBC here
Comment #23
catchThanks! Committed/pushed to 8.x.