Finalize \Drupal\automatic_updates\Development\Converter script to update core MR

Created on 15 February 2023, over 1 year ago
Updated 16 March 2023, over 1 year ago

Problem/Motivation

We have a script that converts our module into a core merge request but it has not been update or ran in long time

It was used to create the commits on ✨ [PP-1] Add Alpha level Experimental Automatic Updates module Needs review

but since we are now planning to first do an MR just for Package Manager it will need to be updated.

We can test it here πŸ“Œ [ignore] Test Package manager core merge Needs work

Steps to reproduce

Proposed resolution

Conversion script changes

  1. https://www.drupal.org/pift-ci-job/2596238 β†’

    Since Automatic UPdates tests rely package manager test fixtures but the folders are in the same parent directory we need to somehow automatically fix things like this

    1) Drupal\Tests\auto_updates\Functional\AvailableUpdatesReportTest::testReportLinks
    Failed asserting that file "/var/www/html/core/modules/auto_updates/tests/src/Functional/../../../package_manager/tests/fixtures/release-history/drupal.9.8.2.xml" exists.
    
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
    /var/www/html/core/modules/auto_updates/tests/src/Functional/AutoUpdatesFunctionalTestBase.php:145
    /var/www/html/core/modules/auto_updates/tests/src/Functional/AutoUpdatesFunctionalTestBase.php:73
    /var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:545
    /var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:364
    /var/www/html/core/modules/auto_updates/tests/src/Functional/AutoUpdatesFunctionalTestBase.php:55
    /var/www/html/core/modules/auto_updates/tests/src/Functional/AvailableUpdatesReportTest.php:35
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    
  2. Per @catch ComposerFixtureCreator should be moved core/scripts. This means we should also make ComposerFixtureCreator run without changes needed to composer.json so we don't have to update core's composer.json. At least while the module is alpha maybe we could later but really not needed.

How to run the conversion

  1. checkout this repo to the MR branch - 3341974-convert-script
  2. In a different directory make a clone for Drupal core and checkout the MR branch, 2977515-package-manager-mr , from πŸ“Œ [ignore] Test Package manager core merge Needs work
  3. from the base of the Automatic Updates repo from 1) run composer core-convert /path/to/core/clone 2977515-package-manager-mr 3341974-convert-script
  4. If the script was succesful it should have made a new commit on the core clone
  5. Push the new commit, like any other MR commit
  6. Wait and check the test run on πŸ“Œ [ignore] Test Package manager core merge Needs work
  7. Find test failures you can fix by making changes to AutoUpdates repo, can do simple ones in this issue, larger ones will need their own issue. For small changes on this issue we can make incremental merges into 3.0.x, ping @tedbow about this

    Changes made to scripts/src/Converter.php can wait till the next merge as no other issue should be working on this file
    Changes to other are probably easier to merge in often to 3.0.x because other issue will be editing those files

  8. Go back to step 3

How update to update our dependencies

The script does not add or update our composer dependencies that we need to add to core. this is done manually on the core merge request
see https://www.drupal.org/about/core/policies/core-dependency-policies/mana... β†’

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024