Create a config action to add a data source to an index

Created on 24 June 2024, 3 months ago
Updated 24 August 2024, 15 days ago

Problem/Motivation

Drupal 10.3 introduced a config actions API, and it would be very helpful to be able to do certain operations on Search API indexes with config actions. Chief among those would be adding a new data source. Let's add a dedicated config action for that.

โœจ Feature request
Status

Fixed

Version

1.0

Component

Framework

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
  • First commit to issue fork.
  • Merge request !151config action added โ†’ (Merged) created by narendraR
  • Pipeline finished with Failed
    2 months ago
    Total: 409s
    #207703
  • Pipeline finished with Failed
    2 months ago
    Total: 371s
    #207880
  • Pipeline finished with Success
    2 months ago
    Total: 424s
    #208343
  • Status changed to Needs review 2 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia narendraR Jaipur, India
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    drunken monkey โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    Thanks a lot for this suggestion, @phenaproxima, I was not aware of this addition to Drupal core, and thanks a lot, @narendraR, for already providing the necessary code and even a test!
    Even though we donโ€™t require Drupal 10.3 at the moment, it should probably be harmless to add this class already now since I suspect it will just be ignored as long as the ConfigAction plugin type is unknown. (I temporarily enabled testing against all supported Drupal versions, just to be on the safe side.)

    However, could you maybe link some documentation resources regarding recipes and config actions? Currently I can just guess on whether this is all supposed to work like this based on your code.

    Finally, I made some style changes to the MR, but nothing functional โ€“ that all seemed in order, as far as I understood it.
    So, thanks again! If you are happy with my changes (and the test bot is, too), I will merge this.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    @phenaproxima/@narendraR: Please give the latest version of the MR a try and tell me what you think.
    Also, would still appreciate links to some documentation.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia narendraR Jaipur, India

    Re #7,
    Changes looks good to me.

    https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/docs/config_actions.md has some details regarding config actions.

  • Status changed to Fixed 29 days ago
  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drunken monkey Vienna, Austria

    @narendrar: Thanks for reporting back, good to hear the changes look OK to you.
    Also thanks for the docs link, that cleared up things a bit more! (Although this, too, seems outdated and/or incomplete, as it only discusses the ActionMethod attribute, not ConfigAction.)

    Anyways, merged. Thanks again!

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

Production build 0.71.5 2024