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

USAGOV-1612 Setup a config split to improve developer workflow and disable devel module on production #1670

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

mdranove
Copy link
Contributor

@mdranove mdranove commented Jun 27, 2024

Jira Task

https://cm-jira.usa.gov/browse/USAGOV-1612

Description

Require and enable config_split module. Configure it to setup a dev split with:

  1. A complete split on the Devel module.
  2. A partial split on the autologout.settings to target the timeout and max_timeout config keys.

Disable this split by default, and explicitly enable the split in settings.local.php.

Additionally, enable the admin_toolbar_search module.

Type of Changes

  • [ X ] New Feature
  • Bugfix
  • Frontend (Twig, Sass, JS)
    • Add screenshot showing what it should look like
  • [ X ] Drupal Config (requires "drush cim" TWICE)
  • [ X ] New Modules (requires rebuild)
  • Infrastructure
    • CMS
    • WAF
    • Egress
    • Tools
  • Other

Testing Instructions

Note that the configuration must be imported twice for the config_split to fully take effect.

On local environments:

  1. Navigate to /admin/config/people/autologout.
  2. The Timeout and Max Timeout values are set to 10000
  3. Navigate to /admin/config/development/devel.
  4. The Variables Dumper setting has the "symfony var dumper" radio option selected

On dev/stg/prod

  1. Navigate to /admin/config/people/autologout.
  2. The Timeout and Max Timeout values are set to 1800
  3. Navigate to /admin/modules. Local the devel module
  4. The box is unchecked, indicating that the module is not installed.
  5. Find the new admin toolbar search bar.
  6. Use it to locate some items in the admin configuration.
  7. The admin toolbar search works as expected, and there are no php errors on the configuration pages you visit.

Requires New Config

  • [ X ] Yes
  • No

Requires New Content

  • Yes
  • [ X ] No

Security Review

  • [ X ] Adds/updates software (including a library or Drupal module)
  • Communication with external service
  • Changes permissions or workflow
  • Requires SSPP updates

Reviewer Reminders

  • Reviewed code changes
  • Reviewed functionality
  • Security review complete or not required

Post PR Approval Instructions

Follow these steps as soon as you merge the new changes.

  1. Go to the USAGov Circle CI project.
  2. Find the commit of this pull request.
  3. Build and deploy the changes.
  4. Update the Jira ticket by changing the ticket status to Review in Test and add a comment. State whether the change is already visible on cms-dev.usa.gov and beta-dev.usa.gov, or if the deployment is still in process.

mdranove and others added 3 commits June 26, 2024 13:32
…prove-local-setup: Create a config split to uninstall devel module from higher environments and increase the autologout timer settings on lower environments.
…settings files in dev directory. Remove reference to devel module in menu_breadcrumb.settings.yml.
Copy link
Member

@akf akf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into an issue trying to import config on this one:

Configuration <em class="placeholder">user.role.content_administrator</em> depends on the <em class="placeholder">Devel</em> module that will not be installed after import. in Drupal\Core\Config\ConfigImporter->validate() (line 814 of /var/www/web/core/lib/Drupal/Core/Config/ConfigImporter.php). ```

Sure enough, the "Content Administrator" role currently has the "access devel information" role. I will ask around about whether anyone on the content team is actually using this (and why). If they're not, I'd like to have you do a PR to remove that permission, and put this one on hold until we've gotten that in front of people to make sure they're not using it. 

(If content administrators are using devel, that's another story, because they don't have local development!) 

Otherwise, it looks good. I was able to test the "dev/stage/prod" experience, roughly, by changing the local dev config setting to FALSE, so I think it'll be good. 

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