-
Notifications
You must be signed in to change notification settings - Fork 192
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
Document that CALL and RETURN links are not considered in 'with_ancestors' queries. #3881
Comments
CALL
and RETURN
links are not considered in with_ancestors
and _descendants
.
Yes, this is the expcted result. I wouldn't follow CALL links exactly because they are not part of the data provenance, to be consistent with everywhere else (e.g. logic when exporting, deleting, ...). |
This bit me the other day. I want to query all the WorkChainNodes that are an ancestor of a given structure node. I can usually use with_incomming, but not always (I sometimes transform the structure prior to launching). Definitely would be nice to have a with_call_ancestors. |
Yeah, I've come across a few cases where this would be nice.. usually there is some workaround with using Following only If I understand things correctly, only I think it would make sense to add an option ( |
I might be misunderstanding, but this does not seem correct. You say you are looking for
Your use case shouldn't have anything to do with call links though. When you say you "transform" the structure prior to launching, do you mean you pass it through some
Yes, this should be correct. I think it makes sense indeed to think about an additional keyword that can target these sub graphs. |
I might be getting confused with the terminology. Basically in a4 using 'descendant_of' works (i.e. identifies WorkChains that are the descendants of a given structure node). In v1.3 neither 'with_ancestors' [I think this is the one I should use] nor 'with_descendents' work anymore, but "with_incomming" does. I'm not sure why this is the case, only that it is the case.
I'm not sure why 'with_incoming' works and nothing else does, I thought it was related to this issue, but I could be wrong.
Yes, exactly, might not have been the best design choice, but I made it a long time ago and I have a reasonable size set of legacy data that it would be nice to support.
You're right that this would probably be a better way to have designed it. Going in the future I could do something like this, but it would be nice to be able to support legacy calculations I made long ago. |
Yes, it's related to this issue, but not because of the CALL links: The link between the structure and workchain is of type INPUT_WORK. While
Eh, I think both are valid design choices. If you have an existing large-ish workchain there might be edge cases where you want to "clean up" your structure before passing it in without making it an entire new super-workchain. In any case, I think querying should be able to answer these kinds of questions. There are two things here:
|
When querying with the
with_ancestors
orwith_descendants
option, the "logical provenance" links (CALL
andRETURN
) are not taken into account - probably because cycles would lead to an "infinite" number of possible paths.This should, however, be clearly documented in the
QueryBuilder
documentation. Currently, it just produces empty query results.Maybe
CALL
links could even be allowed, since onlyRETURN
can break causality.To demonstrate the behavior, consider the following simple example:
The following query will find the
do_nothing_calc
node:whereas using
with_ancestors
does not:The text was updated successfully, but these errors were encountered: