Rerun job with failed hosts fails with "Stack level too deep" in the log.
|Target version:||foreman_remote_execution 1.3.1|
|Triaged:||Fixed in Releases:|
|Bugzilla link:||1406489||Found in Releases:|
Started as a reproducer for https://bugzilla.redhat.com/show_bug.cgi?id=1406489
The test didn't reproduce the issue, but it's already written.
Fixes #18316 - Changed scoped_search query to :in for hosts enum
When asking to target a specific set of hosts (like in case of failed
hosts), a `name = X or name = Y...` query was generated. This query
caused a very deep stack recursion in scoped_search AST. This commit
changes the query to `name ^ (X, Y...)` that will not require the same
treatment in AST.
#3 Updated by Shimon Shtein over 1 year ago
After an investigation, I was able to reproduce the issue. The problem was in query syntax: originally rerun query was generating a huge OR statement like: "name = X or name = Y...". This query could not be loaded into AST inside scoped_search without blowing up the stack.