Skip to content

Conversation

@krithika369
Copy link
Collaborator

@krithika369 krithika369 commented Jul 10, 2022

Bug

When a custom experiment engine's remote UI must be loaded, the current implementation of the ExperimentEngineLoaderComponent loads the remote entry file first and then the dynamic config, if any, sequentially. If both succeed, the children of the component (which would attempt to load the specific remote components from the remote engine UI) will be returned. Intermittently, the config loader fails to be mounted with the following warning:

Screenshot 2022-07-10 at 11 37 37 AM

As a result, the experiment engine's dynamic configs are not loaded which causes unexpected behaviours in the respective views - this can only be reset with a hard refresh. As an example, we see the below error with the turing-experiments engine, when viewing a router (the API host, which was supposed to have been retrieved from the dynamic configs is missing, and the dummy default value that's compiled into the UI build is taken).

Screenshot 2022-07-10 at 11 26 54 AM

Screenshot 2022-07-10 at 3 04 08 PM

Fix

The fix refactors the ExperimentEngineLoaderComponent so that the remote entry file as well as the config file of the custom experiment engine will be loaded using the same parent component which is also responsible for returning the children - this fixes the warning (and the subsequent error) and also has the advantage of parallel retrieval of the script files.

@krithika369 krithika369 marked this pull request as draft July 10, 2022 04:02
@krithika369 krithika369 marked this pull request as ready for review July 11, 2022 23:37
@krithika369 krithika369 requested a review from a team July 11, 2022 23:37
Copy link
Contributor

@leonlnj leonlnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@krithika369 krithika369 merged commit 7abe0a5 into caraml-dev:main Jul 12, 2022
@krithika369 krithika369 deleted the fix_dynamic_exp_engine_config_load branch July 12, 2022 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants