Skip to content

[UIActions] Embeddable and data plugin triggers/actions race condition #90929

@Dosant

Description

@Dosant

Kibana version: master, 7.x

Steps to reproduce:

This is hard to catch race conditions. Appeared in builds.

saved objects tagging - functional tests table listing before all hook in table listing

This would happen when data plugin setup is called before embeddable plugin setup:

  1. Embeddable registers a trigger:
    uiActions.registerTrigger(valueClickTrigger);
  2. Data plugin attaches an action to a trigger:
    uiActions.addTriggerAction(
    'VALUE_CLICK_TRIGGER',
    createValueClickAction(() => ({
    uiActions: startServices().plugins.uiActions,
    }))
    );

Data plugin and embeddable plugin do not have an explicit dependency on each other. So it could happen that the data plugin is loaded before the embeddable plugin and it is causing an error.

This is most likely a regression since #82791

possible solutions:

  1. Try to move registering actions to a start phase in data plugin
  2. Make data depend on embeddable?
  3. move those triggers to data plugin?

Metadata

Metadata

Assignees

Labels

Feature:UIActionsUI actions. These are client side only, not related to the server side actions..blockerbugFixes for quality problems that affect the customer experiencev7.12.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions