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.

Issue fork search_api-3456728

Command icon Show commands

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

phenaproxima created an issue. See original summary.

narendraR made their first commit to this issue’s fork.

narendrar’s picture

Status: Active » Needs review

drunken monkey made their first commit to this issue’s fork.

drunken monkey’s picture

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.

drunken monkey’s picture

@phenaproxima/@narendraR: Please give the latest version of the MR a try and tell me what you think.

Also, I would still appreciate links to some documentation. I found this page, but this seems more like a WIP and maybe more meant for the people working on the Recipes themselves, not for contrib module maintainers. In particular, there are no details about config actions, just a reference to the Config Action contrib module.

narendrar’s picture

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.

drunken monkey’s picture

Status: Needs review » Fixed

@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!

Status: Fixed » Closed (fixed)

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