-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipes within recipes overwrite variables configuration #6717
Comments
Yes easy to fix for this one but see below, i think that more things need to be fixed.
Not just because there is a nested recipe, but yes if recipes are executed concurently (e.g. through the admin UI) on the same instance. Otherwise, if only one recipe is executed, all steps are executed asynchronously in their own scope but the whole flow of a given recipe (including nested ones) is intended to be sequential. About the recipe executor i did some updates related to the usage of the shell scopes but didn't get a closer look on other things, after a quick look it seems that there are other issues, e.g on each step scope we resolve Also, if you run multiple times some recipes the
Yes it is now unrelated because it just revealed another issue that i fixed without changing any code related to recipes, see my last comment in #6648 whose i changed the title. As a reminder, maybe a recipe should be an exclusive task but in a future PR, here just thread safe, idem e.g. for workflow singletons, exclusive background tasks, but these are all pending things (as many other ones) since a while because my distributed PR is already too big ;) and may need another pending PR to continue working on it. Finally, re-running the blog recipe fails on |
So only the Then i think this is the recipe executor that would need to hold, e.g. in a concurrent dictionary, the additional providers tied to a given recipe executionId key, then when calling the scripting manager I'll try to work on it tomorrow |
Yes, there are a few things in here. (so not so simple)
Agree.
Probably, but for later as you say.
Yes, we discussed this, and agreed setup recipes were only intended to be ran once. Otherwise they cannot be idempotent. Cool, leaving you to see what works best. For info I made some other changes here to the executor #6421 but that pr is not ready, and will be refactored, so better to fix these issues here, and separately. |
Good idea but as it is implemented the |
When running a recipe inside a recipe with the
Recipes
step thevariables
section /_variablesMethodProvider
is overwritten with the values from the inner recipe.Example
This happens because the
IRecipeExecutor
is a Singleton, and assigns thevariableMethodsProvider
to a private variable as it reads therecipe.json
, so on the second recipe run it overwrites the value.This should be easy to fix, probably with a dictionary wrapping the
variablesMethodsProviders
for each recipe, keyed to the execution id, which is always a new guid.Hmm, does it need to be concurrent?
@jtkech you are fixing some recipe issues at the moment, but I think this is unrelated / a different issue.
The text was updated successfully, but these errors were encountered: