- Issue created by @ergonlogic
- last update
almost 2 years ago Composer require failure - @ergonlogic opened merge request.
-
ergonlogic →
committed 621a516c on 1.0.x
Issue #3357733: Provide Drush command to enforce configs
-
ergonlogic →
committed 621a516c on 1.0.x
- Status changed to Fixed
almost 2 years ago 4:14am 5 May 2023 -
ergonlogic →
committed eb341e09 on 1.0.x
Issue #3357733: Fix typo in composer.json.
-
ergonlogic →
committed eb341e09 on 1.0.x
-
ergonlogic →
committed 23fb0b80 on 1.0.x
Issue #3357733: Add dependency on Drush.
-
ergonlogic →
committed 23fb0b80 on 1.0.x
- Status changed to Needs review
almost 2 years ago 11:58am 8 May 2023 - last update
almost 2 years ago Composer require failure - last update
almost 2 years ago Composer require failure - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - @ergonlogic opened merge request.
- 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
Isn't 'needs review' the way to get tests to run?
- Assigned to ergonlogic
- 🇨🇦Canada ambient.impact Toronto
I think it's primarily now when a merge request is marked as ready. They also run again if additional commits are added to the merge request. That said, GitLab seems to think there aren't any changes in merge request 22, which is weird.
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - last update
almost 2 years ago Composer require failure - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
All that was needed here was to bump the Drush bootstrap level, so that the Drupal logger could take effect. That allowed be to remove the explicit call to
Drush::logger()
.However, Behat tests are now broken, so I'll try to figure that out.
- 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
8b8a5944 - Moved 'ce_test_drush_command' module to tests/modules
Drush can't seem to enable modules under
tests/modules
- Status changed to Needs work
almost 2 years ago 10:41pm 8 May 2023 - 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
All that was needed here was to bump the Drush bootstrap level, so that the Drupal logger could take effect. That allowed be to remove the explicit call to Drush::logger().
Actually, I was wrong here. The problem is that
drush cr
doesn't appear to allow us to log to Drush output using\Drupal::logger()
. That said,, our logging still shows up in the watchdog log, so I can check there in the tests. - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - last update
almost 2 years ago Composer require failure - Status changed to Needs review
almost 2 years ago 12:06am 10 May 2023 - 🇨🇦Canada ambient.impact Toronto
So I did a bit of digging as to why Drush can't seem to enable modules under the
tests/modules
path, and it looks like it's due to Drupal core excluding those from discovery by default. Basically, you have to uncomment$settings['extension_discovery_scan_tests'] = true;
in yoursettings.local.php
before doingdrush pm:install
- I've tested this locally and Drush does indeed now install modules fromtests/modules
once the setting is enabled. Is there a way to specify this stuff in Behat? Because if so, it might be a one liner and would allow the test module to live undertests/modules
to keep things tidy. - Status changed to Needs work
almost 2 years ago 12:07am 10 May 2023 - 🇨🇦Canada ambient.impact Toronto
As for the logging stuff, I reached out on the Drupal.org Slack and was pointed to the fact that Drush now supports adding custom loggers so that would be one way we could output stuff to console. Another way would be to add a hook to the Drush cache rebuild command and output our console messages that way. Either way, I'll open a follow up to not block this issue being merged.
- 🇨🇦Canada ambient.impact Toronto
As for the logging stuff, I reached out on the Drupal.org Slack and was pointed to the fact that Drush now supports adding custom loggers so that would be one way we could output stuff to console. Another way would be to add a hook to the Drush cache rebuild command and output our console messages that way. Either way, I'll open a follow up to not block this issue being merged.
- last update
almost 2 years ago Composer require failure - 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
In config-enforce-localdev, I committed our settings file, and added the bit that allows Drush to find modules under test dirs. This worked, and so I've also moved the test module here back where it belongs.
Let's follow up on the logging in ✨ Provide Drush command output when enforcing configuration via cache rebuild Active .
Since tests are now all passing, despite DrupalCI wierdness, I'm going to merge this branch, close the MRs and this ticket.
- Status changed to Fixed
almost 2 years ago 5:33pm 10 May 2023 -
ergonlogic →
committed 52081800 on 1.0.x
Issue #3357733: Move test modules back under tests directory.
-
ergonlogic →
committed 52081800 on 1.0.x
-
ergonlogic →
committed f53a0784 on 1.0.x
Issue #3357733: Fix logging from CLI (somewhat).
-
ergonlogic →
committed f53a0784 on 1.0.x
-
ergonlogic →
committed e63a0cea on 1.0.x
Issue #3357733: Move Drush command test module back where Drush can find...
-
ergonlogic →
committed e63a0cea on 1.0.x
-
ergonlogic →
committed d86d6939 on 1.0.x
Issue #3357733: Remove duplication of drush settings in composer.json.
-
ergonlogic →
committed d86d6939 on 1.0.x
-
ergonlogic →
committed 60585a16 on 1.0.x
Issue #3357733: Add test module for Drush command.
-
ergonlogic →
committed 60585a16 on 1.0.x
-
ergonlogic →
committed 66eed52d on 1.0.x
Issue #3357733: Add Drush command to enforce configs.
-
ergonlogic →
committed 66eed52d on 1.0.x
-
ergonlogic →
committed 99860794 on 1.0.x
Issue #3357733: Add Drush command boilerplate.
-
ergonlogic →
committed 99860794 on 1.0.x
- Assigned to ambient.impact
- Status changed to Active
almost 2 years ago 12:25am 11 May 2023 - 🇨🇦Canada ambient.impact Toronto
Is it alright if I remove the now unused
use Drush\Drush;
inconfig_enforce.module
and remove the explicit dependency on Drush from thecomposer.json
? - 🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦
I guess Drugs isn't strictly required. Maybe move it to suggest.
- 🇨🇦Canada ambient.impact Toronto
Sure, let me throw that together quickly.
-
Ambient.Impact →
committed e7953d0f on 1.0.x
Issue #3357733: composer.json: Move Drush from "require" to "suggest".
-
Ambient.Impact →
committed e7953d0f on 1.0.x
-
Ambient.Impact →
committed f34597f4 on 1.0.x
Issue #3357733: Removed unused 'use Drush/Drush' from .module file.
-
Ambient.Impact →
committed f34597f4 on 1.0.x
- Issue was unassigned.
- Status changed to Fixed
almost 2 years ago 2:10am 12 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.