- Issue created by @altcom_neil
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,877 pass - Status changed to Needs work
4 months ago 3:23am 23 August 2024
The fetch config variables for the update module:
fetch:
url: ''
max_attempts: 2
timeout: 30
are not editable through the Update Manager settings page (/admin/reports/updates/settings) or anywhere else? The only way to update them is by editing the update.settings.yml file itself. Is this a conscious choice? Were they editable and then removed, or have they been added and the form elements not added to the admin page?
If for any reason your update.settings.yml is deleted and you recreate it by going to the admin page, configuring the update settings and saving, the fetch part of the config settings are missing. This means in parts of the code that are expecting integers, nulls are used instead. This could in the future lead to unexpected behaviour. Such as the code trying to limit fetch attempts:
$max_fetch_attempts = $this->updateSettings->get('fetch.max_attempts');
...
if (empty($this->failed[$fetch_url_base]) || $this->failed[$fetch_url_base] < $max_fetch_attempts) {
Or the code trying to limit the fetch time while the cron is running:
public function fetchData() {
$end = time() + $this->updateSettings->get('fetch.timeout');
if ($this->fetchQueue->numberOfItems()) {
// Delete any stored project data as that needs refreshing when
// update_calculate_project_data() is called.
$this->tempStore->delete('update_project_data');
}
while (time() < $end && ($item = $this->fetchQueue->claimItem())) {
$this->processFetchTask($item->data);
$this->fetchQueue->deleteItem($item);
}
}
Needs work
11.0 🔥