Create a source plugin that exposes recipes in the file system

Created on 9 May 2024, about 2 months ago
Updated 26 June 2024, 2 days ago

Problem/Motivation

We want Project Browser to be able to facilitate discovering recipes! Let's create a source plugin that shows recipes already in the DRUPAL_ROOT/recipes directory, and allows them to be applied right from the UI.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

  • Issue created by @phenaproxima
  • 🇺🇸United States phenaproxima Massachusetts
  • Status changed to Postponed about 2 months ago
  • 🇺🇸United States phenaproxima Massachusetts
  • Merge request !473Resolve #3446257 "Recipe source" → (Closed) created by phenaproxima
  • Pipeline finished with Failed
    about 2 months ago
    Total: 415s
    #168904
  • Pipeline finished with Failed
    about 2 months ago
    #168917
  • 🇺🇸United States jnicola

    So per our conversations all over the place, this issue gets merged for the RecipeDiscovery class Expand Drupal\Core\Recipe\RecipeDiscovery to allow discovering available recipes, likely for use in Project Browser Active , we can refactor the fetching of Recipes.

    I do think we would also want to then remove/alter the methods getRecipeDescription in favor of just $recipe->description.

    As for the project image, we may want to add a method to the Recipe Object itself to fetch the image associated with the recipe instead of putting the logic in here.

    Keep this all single purpose to just exposing Discovered Recipes to Project Browser?

  • Status changed to Active about 2 months ago
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Success
    about 2 months ago
    #171983
  • Pipeline finished with Canceled
    about 2 months ago
    #171985
  • Pipeline finished with Failed
    about 2 months ago
    Total: 375s
    #171987
  • Pipeline finished with Failed
    about 1 month ago
    Total: 382s
    #172448
  • Pipeline finished with Failed
    about 1 month ago
    Total: 447s
    #172460
  • Pipeline finished with Failed
    about 1 month ago
    Total: 138s
    #172516
  • Pipeline finished with Failed
    about 1 month ago
    Total: 353s
    #172519
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    We need some tests for this - among other things we need to be able to prevent changes that reintroduce "this is a module" assumptions. The issue that preceded this, 🐛 "View Commands" button assumes project is a DO module (and that a project has commands) Fixed , probably should have had tests but we chose to wait until this issue so the tests were based on an actual plugin (faster to write and more representative of IRL scenarios!)

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    There's an error occurring in the logs as well, the "Content Type: example" recipe does not have a 'name' property, so logo: $this->getRecipeLogo($path, $recipe['name']) in the plugin is hitting an error with that recipe.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 391s
    #172663
  • Pipeline finished with Success
    about 1 month ago
    Total: 389s
    #172676
  • Status changed to Needs review about 1 month ago
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    about 1 month ago
    Total: 537s
    #172696
  • Pipeline finished with Failed
    about 1 month ago
    Total: 505s
    #172723
  • Pipeline finished with Failed
    about 1 month ago
    Total: 448s
    #173374
  • Pipeline finished with Failed
    about 1 month ago
    Total: 396s
    #173395
  • First commit to issue fork.
  • 🇦🇺Australia sime Canberra

    Rebased

  • Pipeline finished with Failed
    about 1 month ago
    Total: 505s
    #175998
  • Pipeline finished with Failed
    about 1 month ago
    Total: 311s
    #177344
  • Pipeline finished with Failed
    about 1 month ago
    Total: 183s
    #177351
  • Pipeline finished with Failed
    about 1 month ago
    #177369
  • Pipeline finished with Failed
    about 1 month ago
    Total: 281s
    #177380
  • Pipeline finished with Failed
    about 1 month ago
    Total: 451s
    #177418
  • 🇺🇸United States chrisfromredfin Portland, Maine
  • Assigned to phenaproxima
  • Status changed to Needs work 22 days ago
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    22 days ago
    Total: 364s
    #192284
  • Pipeline finished with Failed
    22 days ago
    Total: 339s
    #192853
  • Pipeline finished with Failed
    22 days ago
    Total: 388s
    #192862
  • 🇺🇸United States phenaproxima Massachusetts

    phenaproxima changed the visibility of the branch 3446257-v2 to hidden.

  • 🇺🇸United States phenaproxima Massachusetts

    phenaproxima changed the visibility of the branch 3446257-v2 to active.

  • Merge request !498Resolve #3446257 "V2" → (Merged) created by phenaproxima
  • Pipeline finished with Failed
    22 days ago
    Total: 518s
    #192987
  • Pipeline finished with Failed
    22 days ago
    Total: 404s
    #192995
  • Pipeline finished with Failed
    22 days ago
    Total: 368s
    #193003
  • Pipeline finished with Running
    22 days ago
    #193017
  • Pipeline finished with Failed
    22 days ago
    #193031
  • Pipeline finished with Failed
    22 days ago
    Total: 401s
    #193034
  • Pipeline finished with Failed
    22 days ago
    #193051
  • Pipeline finished with Failed
    22 days ago
    Total: 407s
    #193054
  • Pipeline finished with Running
    22 days ago
    #193067
  • Pipeline finished with Canceled
    22 days ago
    Total: 130s
    #193071
  • Pipeline finished with Canceled
    22 days ago
    Total: 120s
    #193074
  • Pipeline finished with Failed
    22 days ago
    Total: 363s
    #193077
  • Pipeline finished with Canceled
    22 days ago
    Total: 200s
    #193099
  • Pipeline finished with Failed
    22 days ago
    Total: 559s
    #193101
  • Pipeline finished with Failed
    22 days ago
    Total: 433s
    #193131
  • Pipeline finished with Failed
    22 days ago
    Total: 279s
    #193140
  • Pipeline finished with Failed
    22 days ago
    Total: 286s
    #193145
  • Pipeline finished with Canceled
    22 days ago
    #193148
  • Pipeline finished with Canceled
    22 days ago
    Total: 177s
    #193151
  • Pipeline finished with Failed
    22 days ago
    Total: 209s
    #193152
  • Pipeline finished with Failed
    22 days ago
    Total: 197s
    #193155
  • Pipeline finished with Failed
    22 days ago
    Total: 368s
    #193160
  • Pipeline finished with Failed
    22 days ago
    Total: 545s
    #193196
  • Pipeline finished with Success
    21 days ago
    Total: 593s
    #193199
  • Pipeline finished with Canceled
    21 days ago
    Total: 312s
    #193203
  • Pipeline finished with Canceled
    21 days ago
    Total: 8s
    #193204
  • Pipeline finished with Failed
    21 days ago
    Total: 399s
    #193206
  • Pipeline finished with Failed
    21 days ago
    Total: 2028s
    #193211
  • Pipeline finished with Canceled
    21 days ago
    Total: 128s
    #193229
  • Pipeline finished with Failed
    21 days ago
    Total: 474s
    #193230
  • Pipeline finished with Failed
    21 days ago
    Total: 398s
    #193631
  • Pipeline finished with Failed
    21 days ago
    Total: 519s
    #193640
  • Pipeline finished with Failed
    21 days ago
    Total: 283s
    #193655
  • Pipeline finished with Failed
    21 days ago
    Total: 393s
    #193659
  • Pipeline finished with Failed
    21 days ago
    Total: 510s
    #193670
  • Pipeline finished with Failed
    21 days ago
    #193690
  • Pipeline finished with Failed
    21 days ago
    Total: 385s
    #193694
  • Pipeline finished with Canceled
    21 days ago
    Total: 65s
    #193697
  • Pipeline finished with Failed
    21 days ago
    Total: 171s
    #193700
  • Pipeline finished with Failed
    21 days ago
    Total: 772s
    #193703
  • Pipeline finished with Failed
    21 days ago
    Total: 489s
    #193728
  • Pipeline finished with Failed
    21 days ago
    Total: 183s
    #193736
  • Pipeline finished with Canceled
    21 days ago
    Total: 34s
    #193739
  • Pipeline finished with Failed
    21 days ago
    Total: 238s
    #193740
  • Pipeline finished with Failed
    21 days ago
    Total: 398s
    #193745
  • Pipeline finished with Failed
    21 days ago
    Total: 381s
    #193755
  • Pipeline finished with Failed
    21 days ago
    Total: 238s
    #193758
  • Pipeline finished with Failed
    21 days ago
    Total: 367s
    #193762
  • Pipeline finished with Failed
    21 days ago
    Total: 640s
    #193827
  • Issue was unassigned.
  • Status changed to Needs review 21 days ago
  • 🇺🇸United States phenaproxima Massachusetts
  • 🇦🇺Australia sime Canberra

    I see you're starting to look at fixing phpstan.neon (and removed).

    I would appreciate a look at this ticket to do a clean reset on the phpstan configuration and get to level 1.
    https://www.drupal.org/project/project_browser/issues/3453101 📌 phpstan.neon.dist fixes - Get phpstan to level 1 RTBC

  • 🇦🇺Australia sime Canberra

    I did a test and you have no errors to ignore with the above MR, provided that you also are pinned to minimum drupal 10.3. No need for a baseline file.

  • 🇺🇸United States phenaproxima Massachusetts

    Re #20: baseline shmaseline, I just want PHPStan to shut the hell up. I truly dislike it, and find it generally obstructionist and not very useful (although I recognize I'm in the minority). Whatever gets the errors to go away so we can get this merged, I'm happy with. By all means take a crack at that. I RTBCed your other issue.

    I'd rather we didn't bump the minimum Drupal version in this issue; it's totally fine to conditionally support recipes if they're available (as you can see, it works perfectly well); but that's a decision for the maintainers. It would certainly allow me to simplify the code a little bit.

  • 🇦🇺Australia sime Canberra

    Happy to change that if you feel strongly about it, though.

    No strong opinion, it's just a pattern I haven't seen. The DX reviewer in me got stuck on this part of the code.

    By all means take a crack at that. I RTBCed your other issue.

    Yeah I'm happy to do that! I learn a lot from doing phpstan and like trying to make the config feel nice and well documented.

    So at the moment it PHPStan will fail on Drupal 10.2 because Recipe.php doesn't exist, I know how to fix this, will wait for linked 📌 phpstan.neon.dist fixes - Get phpstan to level 1 RTBC (thanks for the review!

  • Status changed to Postponed 18 days ago
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    18 days ago
    Total: 490s
    #195507
  • Status changed to Needs work 18 days ago
  • 🇺🇸United States phenaproxima Massachusetts

    I realized I still need to work on this, to get the manual terminal commands working properly.

  • Pipeline finished with Failed
    18 days ago
    Total: 414s
    #195547
  • Status changed to Needs review 18 days ago
  • 🇺🇸United States phenaproxima Massachusetts

    On second thought, adding support for the commands, properly, is very complicated and runs into the assumption that everything is a friggin' module. This will take some more deep work to sort out, and this MR is complex enough as it is.

  • Pipeline finished with Failed
    18 days ago
    Total: 709s
    #195723
  • Pipeline finished with Failed
    18 days ago
    Total: 261s
    #195750
  • Pipeline finished with Failed
    18 days ago
    Total: 503s
    #195753
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    18 days ago
    Total: 276s
    #195774
  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    18 days ago
    Total: 376s
    #195778
  • Pipeline finished with Success
    18 days ago
    Total: 419s
    #195785
  • Pipeline finished with Success
    18 days ago
    Total: 375s
    #195864
  • First commit to issue fork.
  • Pipeline finished with Failed
    17 days ago
    Total: 511s
    #196039
  • 🇺🇸United States phenaproxima Massachusetts

    @immaculatexavier, I'm not sure you tested that, because:

    a) Your commit didn't change the compiled JS bundle;
    b) and, if it had, many tests would have started failing, because the isPackageManagerRequired stuff that your change restored, was completely ripped out of the backend and frontend by my previous changes, for good reason.

    Therefore, I reverted the change. This is probably ready to go as-is; the categories thing is most likely out of scope here.

  • 🇺🇸United States phenaproxima Massachusetts
  • Pipeline finished with Failed
    17 days ago
    Total: 361s
    #196462
  • Pipeline finished with Canceled
    17 days ago
    Total: 21s
    #196485
  • Pipeline finished with Success
    17 days ago
    Total: 481s
    #196486
  • Pipeline finished with Failed
    17 days ago
    Total: 384s
    #196562
  • Pipeline finished with Failed
    17 days ago
    Total: 411s
    #196566
  • Pipeline finished with Failed
    17 days ago
    Total: 243s
    #196575
  • Pipeline finished with Success
    17 days ago
    Total: 682s
    #196577
  • Pipeline finished with Success
    17 days ago
    Total: 782s
    #196581
  • 🇦🇺Australia sime Canberra

    I'm psyched about this, the code is tight!

    I'll be proposing some phpstan simplification shortly, low key stuff.

  • Pipeline finished with Failed
    16 days ago
    Total: 512s
    #196788
  • Pipeline finished with Failed
    16 days ago
    Total: 1851s
    #196794
  • 🇦🇺Australia sime Canberra

    I'm just putting some phpstan in a different branch and playing with the best way to cover the Recipe stuff that also works for drupal 10.2. If this gets merged first I will just do a follow up issue.

  • Pipeline finished with Success
    16 days ago
    Total: 407s
    #197139
  • 🇦🇺Australia sime Canberra

    Small change to phpstan.neon. I would like to keep reportUnmatchedIgnoredErrors: true so that we are warned whenever an ignore is no longer required. I also made the ignores more terse.

  • Pipeline finished with Success
    16 days ago
    Total: 723s
    #197161
  • Pipeline finished with Failed
    16 days ago
    Total: 2379s
    #197115
  • Pipeline finished with Success
    16 days ago
    Total: 946s
    #197191
  • Pipeline finished with Failed
    16 days ago
    Total: 408s
    #197407
  • Pipeline finished with Success
    16 days ago
    Total: 405s
    #197415
  • Pipeline finished with Skipped
    16 days ago
    #197450
  • Status changed to Fixed 16 days ago
  • 🇺🇸United States chrisfromredfin Portland, Maine

    Umm, wow. Just wow. 🤩

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024