Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call assignModuleRoles during config import. #241

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

Polynya
Copy link
Contributor

@Polynya Polynya commented Aug 15, 2024

See #240

Installing LocalGov Publications using config import fails because localgov_roles_modules_installed() tries to add permissions before they exist - the new content type hasn't been imported yet. This probably applies to other LGD modules that create new content types.

What does this change?

Change localgov_roles_modules_installed() to do nothing if $is_syncing is true.

How to test

ddev drush si localgov -y
ddev export-db --file=lgd.sql.gz
ddev drush en localgov_publications
ddev drush cex
ddev import-db --file=lgd.sql.gz
ddev drush deploy

How can we measure success?

No errors running drush deploy.

The workaround is to run drush config-import again but isn't great when running pipelines. Also, is there a risk that the error stops other processes running which won't be attempted on the next config import?

Have we considered potential risks?

Can we assume that all permissions have been set already in config?

@finnlewis
Copy link
Member

Makes sense to @ekes and @stephen-cox ! :)

Thanks @Polynya !

@finnlewis finnlewis merged commit fdd7570 into 2.x Aug 20, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants