- Issue created by @ankitv18
- ๐บ๐ธUnited States markie Albuquerque, NM
Setting this as a blocker for the 2.2.0 release.
- ๐บ๐ธUnited States ultimike Florida, USA
@ankitv18 - I _think_ I understand what you mean, but not entirely 100% sure.
In walking through all this during DrupalEasy office hours, we understand that it is not possible to upgrade from Drupal core 10.0.* to Drupal 11 (next major), which is why you're suggesting we update the "drupal-10.0.8-smart_trim-2.0.php.gz" test fixture to be based on Drupal core 10.3.x.
But, Drupal 11 has been the "next major" for quite some time now, so I'm not sure I understand why this is suddenly an issue.
For example, on April 22, 2024, it was failing - see [here](https://git.drupalcode.org/project/smart_trim/-/pipelines/153603). But, on February 25, 2024, it was passing - see [here](https://git.drupalcode.org/issue/smart_trim-3423678/-/pipelines/103540). In both cases, "next major" was Drupal 11, no?
...a few minutes pass...
Heh, we just figured it out. It turns out all all core updates prior to 10.3 were removed from Drupal 11 on April 19, 2024 - see [here]( https://www.drupal.org/project/drupal/issues/3439769 ๐ Remove all the pre-10.3.0 updates hooks Fixed ).
Therefore, no need for @ankitv18 to answer my question, as we have answered it for ourselves ๐
Bottom line - yes, we need a new fixture based on Drupal 10.3.whatever and Smart Trim 2.0.0. The easiest way to create this fixture (database dump) is probably to:
- Start with a fresh Drupal 10.3.whatever code base
- Import the existing fixture (smart_trim/tests/fixtures/update/drupal-10.0.8-smart_trim-2.0.php.gz)
- Run database updates
- Export database (as .gz, not as .zip!)
- Update line 26 of smart_trim/tests/src/Functional/Update/SmartTrimUpdateMoreTest.php
- Run test locally to ensure all is working.
- Commit changes
Did we miss anything?
-mike
- Status changed to Needs review
4 months ago 6:59pm 16 August 2024 - ๐บ๐ธUnited States ultimike Florida, USA
Hopefully, this is now all set.
During DrupalEasy office hours today, we updated the text fixture - it was a great learning experience for all of us, and definitely a team effort. I have asked those to participated to leave a comment below so that they can receive credit as well.
๐ค๐ผthat all tests pass.
Some notes along the way:
To import the old database fixture, we first deleted all the tables from the database, then used the following command to import (from the "web" directory):
php ./core/scripts/db-tools.php import ./modules/contrib/smart_trim/tests/fixtures/update/drupal-10.0.8-smart_trim-2.0.php
Prior to running the database updates for Drupal core, we checked out the 2.0.0 branch of Smart Trim (otherwise we would have run the database updates that are meant to be tested). After we ran the updates, we checked out the -dev for Smart Trim.
To re-create the fixture, we used (again from the web directory):
php ./core/scripts/db-tools.php dump-database-d8-mysql > modules/contrib/smart_trim/tests/fixtures/update/drupal-10.3.2-smart_trim-2.0.php
, then we used "gzip" to compress the file.-mike
- First commit to issue fork.
- ๐ฎ๐ชIreland lostcarpark
Mike had to run so I created the Merge Request.
Next Major test passed, but previous minor and previous major failed - this makes sense to me since we were trying to load a D10.3 DB into older Drupal versions.
Added conditional logic to
setDatabaseDumpFiles()
function, to check the Drupal version, and load the previous fixture file if lower than 10.3.2.All tests now pass. I'm not sure how it manages to pass for previous major, but I guess the 10.0 DB must be close enough to 9.5 that it doesn't break anything.
Should be ready for review.
-
markie โ
committed 25408d92 on 2.x authored by
lostcarpark โ
Issue #3464532 by ankitv18, lostcarpark, ultimike: Update fixtures for...
-
markie โ
committed 25408d92 on 2.x authored by
lostcarpark โ
- Status changed to Fixed
4 months ago 9:36pm 16 August 2024 - ๐บ๐ธUnited States markie Albuquerque, NM
Thanks for the information on creating fixtures. Merged in the latest and tagging for 2.2.0
Automatically closed - issue fixed for 2 weeks with no activity.