Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293910

Changes to service definitions can cause fatal errors until services cache is cleared

$
0
0

Problem/Motivation

Sometimes, contrib (and custom) modules need to change their service definitions. For example, an additional argument may need to be passed, which can change the function/service definition:
https://www.drupal.org/node/2826466
http://cgit.drupalcode.org/webform/commit/webform.services.yml?id=173030...
http://cgit.drupalcode.org/acquia_contenthub/commit/?id=3d5f6890a86e1f53...

Service definition are stored in the cache_container table, however when a code change to a service definition is deployed, a site may be broken until the cache_container table is rebuilt.

Proposed resolution

I'd like to know if this has been a problem for anyone, and if it should be considered a bug, or a limitation. While it's easy enough to clear the cache_container cache during a deploy, this becomes more of a problem when you have a number of multisites.

Ideally, there would be no downtime during a deploy under this circumstance, but minimising the downtime would also be desirable, as would not relying on deploy processes to handle this.

Remaining tasks

- Decide if this is expected behaviour, and if we should accept a small amount of downtime during deploys where a service definition is changed
- Decide if it's possible to have no downtime, or if we should aim to minimise downtime
- Decide who is responsible for clearing the services cache? (contrib, core, or deployment scripts)

Here is where the cache was originally moved to the DB if it's relevant: https://www.drupal.org/node/2497243
This is trying the solve the issue of new services (rather than alterations to existing services): https://www.drupal.org/node/2863986


Viewing all articles
Browse latest Browse all 293910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>