Recipe install command prints out to stdout and not error, but RecipeTestTrait::applyRecipe() only prints out error output

Created on 9 November 2024, 10 months ago

Problem/Motivation

Maybe only for the directory not found error.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

recipe system

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

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

Merge Requests

Comments & Activities

  • Issue created by @berdir
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    Confirmed that it's apparently only the "foo is not a directory" message that's not an error.

  • πŸ‡­πŸ‡ΊHungary mxr576 Hungary

    I have also run into this problem that an error only appeared on STDOUT and not on STDERR but that has not been reported by Recipe installer.

  • πŸ‡­πŸ‡ΊHungary mxr576 Hungary

    With original implementation it was extremely painful for us figuring out that part of the Drupal 11.2.0 update an assert breaks in our code since the assertion error was only visible on stdout. "Failed asserting that 1 is identical to 0." was also not really helpful, so it got also improved in the MR.

    STDOUT:
    [notice] A backup checkpoint was not created because nothing has changed since the "Backup before the 'Foo' recipe." checkpoint was created.
    AssertionError: assert(property_exists($index, 'original')) in assert() (line 51 of /mnt/files/local_mount/drupal/modules/foo/src/Bar.php).
    
    
    STDERR:
    0/7 [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]
    Applying recipe
    
    1/7 [β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]
    Installed Image module.
    
    2/7 [β–“β–“β–“β–“β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]
    Installed Comment module.
    
    3/7 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]
    Installed Database Search module.
    
    4/7 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘]
    Installed Database Search Defaults module.
    
    
    Failed asserting that 1 is identical to 0.
    /mnt/files/local_mount/build/web/core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeTestTrait.php:89
    /mnt/files/local_mount/drupal/recipes/Foo/tests/src/Funtional/BarTest.php:54
    
  • πŸ‡­πŸ‡ΊHungary mxr576 Hungary
  • Pipeline finished with Success
    22 days ago
    #567282
  • πŸ‡­πŸ‡ΊHungary attila.fekete

    Looks good, tested.

  • Pipeline finished with Success
    18 days ago
    Total: 579s
    #570031
  • πŸ‡­πŸ‡ΊHungary mxr576 Hungary

    The patch saved the day today again, because it helped with identifying a missing dependency inside a recipe that was completely hidden before the patch, what we have seen is just 1 !== 0 and recipe application failed.

    Process exit code mismatch.
    Expected: 0
    Actual: 1
    
    STDOUT:
    Error: Call to a member function getConfigDependencyName() on null in Drupal\Core\Entity\EntityDisplayBase->calculateDependencies() (line 302 of /var/www/html/build/web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php).
    
    • alexpott β†’ committed c70b7685 on 11.2.x
      Issue #3486481 by mxr576, berdir: Recipe install command prints out to...
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Committed edbbe5c and pushed to 11.x. Thanks!
    Committed c70b768 and pushed to 11.2.x. Thanks!

    More information to help people makes sense.

    • alexpott β†’ committed edbbe5c1 on 11.x
      Issue #3486481 by mxr576, berdir: Recipe install command prints out to...
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024