Problem/Motivation

The update status is tracked by checklistapi.progress.thunder_updater.yml but configuration must not contain state information, as documented in several docs: https://www.drupal.org/docs/8/api/configuration-api

This causes that in a common workflow export + git commit + import can deploy the status as update completed without have been run the updates.

Proposed resolution

Use state API instead of configuration in thunder_updater

Comments

quiron created an issue. See original summary.

sun’s picture

Yes. Thanks for creating this issue, @quiron.

daniel.bosen’s picture

Thanks for reporting! At first glance I would guess, this is a checklist api issue? Independend of that, isn't the real issue, that you do not call the update hooks on production in your workflow?
Even if the checklistapi would save its status in the State API, that would not solve the problem, that you import configuration to production, that expects update hooks to be executed. And I am not talking about the rather unimportand checklist configuration, but about the whole configuration. What we could provide is a general warning when we see that update hooks have not been executed, which is always bad.
Otherwise I am with you, it looks like checklistapi should propably save its status in state API, but maybe it is a better idea to discuss that in the checklist api issue cue.

quiron’s picture

Thanks for answering!

Issue created to Checklist API plugin: https://www.drupal.org/project/checklistapi/issues/2944103

And about the updates execution, of course, we run it, the point is that the update results have to be exported too (p.e. module (dis/)activation), but as you said this isn't the real bug.

Anyway, the idea of the warning looks good to me.

daniel.bosen’s picture

Usually we found this order to be necessary to update anything in Drupal 8:

On dev installation (assuming active configuration and config files are in sync):

  1. update modules
  2. update database (drush updb)
  3. export config
  4. commit file changes

On deploy to production:

  1. update code
  2. update database
  3. import config (this should only update config, that is not due to update hooks)
chr.fritsch’s picture

chr.fritsch’s picture

Status: Active » Postponed

Postponed on a new checklist API release.

chr.fritsch’s picture

Project: Thunder » Update helper
Version: 8.x-2.13 » 8.x-1.x-dev
Status: Postponed » Active

This is now an update_helper issue because everything is moved there.

mtodor’s picture

Status: Active » Needs review

There is PR for update helper that would migrate progress storage from config to state.

Here: https://github.com/BurdaMagazinOrg/module-update_helper/pull/10

mtodor’s picture

Status: Needs review » Fixed

This PR is merged long time ago and also released, so the issue can be closed.

Thanks, everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.