Closed (fixed)
Project:
Smart Trim
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2024 at 18:28 UTC
Updated:
30 Aug 2024 at 21:39 UTC
Jump to comment: Most recent
In file SmartTrimUpdateMoreTest fixture is mapped D10.0.8 which won't run on the next major.
See: https://git.drupalcode.org/issue/smart_trim-3464515/-/jobs/2268117#L463
Update the fixtures with latest on i.e 10.3.0
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
markie commentedSetting this as a blocker for the 2.2.0 release.
Comment #3
markie commentedComment #4
ultimike@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).
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:
Did we miss anything?
-mike
Comment #5
ultimikeHopefully, 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.phpPrior 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
Comment #8
lostcarpark commentedMike 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.
Comment #10
markie commentedThanks for the information on creating fixtures. Merged in the latest and tagging for 2.2.0