I seem to be running into a circular dependency issue in the scenario where my new build has a new module (B), new code in an existing module (A) that depends on the new module (B) and new config being imported for the new module (B).
In the past I have handled this with creating and deploying two independent builds, one where I deploy the new modules and enable them, and in the second build, deploy code that requires the new modules and the config for the new modules.
Is there a better way to handle this?
The change in Module A is that one of the services in Module A requires a service from Module B.
I have already added dependency to the new module B in module_A.info.yml file but that does not help as the module is already installed.
drush en module_b
does not work and it gives the error.
The service "module_A_service" has a dependency on a non-existent service "module_B_service".
The config import that is in the build has core.extensions updated to enable module_B when it is imported but config import with drush cim
is failing with the same error as above.