Expose Index and Server methods as config actions

Created on 29 October 2024, 5 months ago

Problem/Motivation

Expose existing methods of Index and Server classes as config actions.

Feature request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

🇩🇪Germany a.dmitriiev

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

Merge Requests

Comments & Activities

  • Issue created by @a.dmitriiev
  • Pipeline finished with Success
    5 months ago
    Total: 325s
    #324024
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    Looks super simple in code, I think we should just do this.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    I agree with @borisson_, this looks great. Thanks!
    Merged. Thanks again!

  • 🇦🇹Austria drunken monkey Vienna, Austria
  • 🇺🇸United States thejimbirch Cape Cod, Massachusetts

    This is so cool! I believe this is the first contib config action.

    1. As a general best practice in recipes, we strive to make recipes/config actions non-destructive. Will removeDatasource, removeProcessor, and removeField present the possibility of a recipe breaking a site? What would those actions be used for?

    2. Could we get a change order for this issue? As the first config actions in the contrib space. It would help with documentation in the Recipes Initiative and set precedent for other contrib modules to follow.

    Something like this (Note: I am not sure that is how the actions work)

    ## Search Index
    
    ### `setOption/SetOptions` - Set index option(s)
    
    Singular:
    ```
    config:
      action:
        search_api.index.example:
          SetOption:
            cron_limit: 50
    ```
    
    Plural:
    ```
    config:
      action:
        search_api.index.example:
          SetOptions:
            cron_limit: 50
            index_directly: true
            track_changes_in_references: true
    ```
    
    ### `removeDatasource` - Remove datasource from index
    
    ...
    
    ### `removeProcessor` - Remove processor from index
    
    ...
    
    ### `renameField` - Rename index field
    
    ...
    
    ### `removeField` - Remove field from index
    
    ...
    
    ## Search Server
    
    ### `setBackendConfig` - Set backend config
    
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    I think this issue was supposed to be marked as fixed?

  • 🇦🇹Austria drunken monkey Vienna, Austria

    1. As a general best practice in recipes, we strive to make recipes/config actions non-destructive. Will removeDatasource, removeProcessor, and removeField present the possibility of a recipe breaking a site? What would those actions be used for?

    Yes, those all have the potential to break a site or cause security problems.

    2. Could we get a change order for this issue? As the first config actions in the contrib space. It would help with documentation in the Recipes Initiative and set precedent for other contrib modules to follow.

    That doesn’t seem like something we normally use change records for, as it’s just a new functionality.
    Wouldn’t a documentation page make more sense? I’d support adding a page to our existing documentation , maybe under “Developer documentation”. However, I don’t think I understand recipes and config actions enough to write this myself.

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

Production build 0.71.5 2024