-
Notifications
You must be signed in to change notification settings - Fork 125
[RHDX-291] Set required cron interval ImageCache External #3502
[RHDX-291] Set required cron interval ImageCache External #3502
Conversation
There is a required cron interval config keyvalue that we apparently had never set for the ImageCache External module. I tested this against the 1.1 and 1.2 releases locally and it _seemed_ like the field was required in both releases. I am not sure, at least at this point in my debugging, why we started to encounter these cron failures at this point, instead of at an earlier date whenever this required value was introduced to the contrib module. Setting a value resolves the error that arises during cron execution though. I will verify this on the PR build once a build either fails or completes successfully by reviewing the logs and testing the command(s) against the commandline of the PR environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jordanpagewhite The issue seems to be that there is a conflict between whatever the ImageCacheExternal 1.2 module version does in its new cron function and what the SimpleSitemapXML module at version 2.12 does in its cron function.
We have a floating version dependency in composer.lock
for the ImageCacheExternal module which has silently upgraded prod
from 1.1
to 1.2
, hence why we're now seeing this problem. The 1.1
version of the ImageCacheExternal module does not have the cron function AFAICT, so this new configuration option is not valid (or ignored there).
The problem only starts to manifest after the ImageCacheExternal has cached some images into /sites/default/files/external
. If this directory is empty, then the problem does not manifest i.e. the ImageCacheExternal cron function to clear the cache has nothing to do. This is why our deployments are still working when they execute cron as part of the deployment: we manually clear the /sites/default/files/external
directory to remove cached images. I can replicate the failure on your PR by running drush cron
after there are images in the /sites/default/files/external
directory.
So changes I would suggest here:
- Update
composer.json
to lock ImageCacheExternal to1.2
and disallow floating versions - Set the
imagecache_external_cron_flush_frequency
value to0
rather than1
so that the ImageCacheExternal cron function is disabled (we manually clear that directory) - Log an issue with the ImageCacheExternal module for the following warnings that I see in the cron output when I run
drush cron
:
[notice] Starting execution of imagecache_external_cron(), execution of history_cron() took 4.65ms.
[warning] array_chunk(): Size parameter expected to be greater than 0 imagecache_external.module:374
[warning] count(): Parameter must be an array or an object that implements Countable imagecache_external.module:375
[warning] Invalid argument supplied for foreach() imagecache_external.module:378
[warning] count(): Parameter must be an array or an object that implements Countable form.inc:767
[notice] Imagecache caches have been flushed
And then to follow-up, I think we should update the SimpleSitemapXML module to a supported version. I would suggest we log an issue against 2.12
, but it's EOL and no longer supported.
cheers,
Rob
@jordanpagewhite I've logged an issue with the ImageCacheExternal project here: https://www.drupal.org/project/imagecache_external/issues/3113027 |
We do not want imagecache external to run its cron processes since there is currently a conflict, it seems, with the simple sitemap cron processes that results in errors / a failure.
Thank you @robpblake ! I see now that I tricked myself in missing that locally by manually clearing the image cache. I have pushed up a commit to update the config value to 0, and I will push up another in a few minutes with updated composer file(s). Thanks again |
retest this please |
Verified:
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a required cron interval config keyvalue that we apparently had
never set for the ImageCache External module. I tested this against the
1.1 and 1.2 releases locally and it seemed like the field was required
in both releases. I am not sure, at least at this point in my debugging,
why we started to encounter these cron failures at this point, instead
of at an earlier date whenever this required value was introduced to the
contrib module. Setting a value resolves the error that arises during
cron execution though. I will verify this on the PR build once a build
either fails or completes successfully by reviewing the logs and testing
the command(s) against the commandline of the PR environment.
JIRA Issue Link
Verification Process
Builds succesfully
Tests are green
login to Drupal and view the logs at /admin/reports/dblog and ensure that there aren't any cron errors reported
Connect to the PR terminal (https://github.com/redhat-developer/developers.redhat.com/tree/master/previews#connecting-to-drupal-in-your-preview-environment) and run
drush cron
and verify that it completes successfully without this specific error being reported. There is a 'known issue' error that presents during cron execution here (https://projects.engineering.redhat.com/browse/RHDX-155).