dataiku / dataiku/dataiku-api-client-python
get_graph() RecursionError: maximum recursion depth exceeded
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 44
- Forks
- 29
- Merge moyen
- 3 h 34 min
- PR mergées (30 j)
- 2
Description
my conf:
ubuntu v 22. lts
Dataiku On Premise v 13.1.2
Exemple
The get_graph method in the DSSProjectFlow class does not support flows that have loops, causing a RecursionError when trying to get the flow graph for such projects.
function's reference : https://developer.dataiku.com/latest/api-reference/python/flow.html#dataikuapi.dss.flow.DSSProjectFlow.get_graph
Steps to Reproduce
- Create a project in Dataiku where a recipe has a dataset as output (last stage in the flow) but used as input of another recipe. Both input and output, forming a loop.
- Use the API to get the flow graph:
import dataiku client = dataiku.api_client() project = client.get_project("YOUR_PROJECT_KEY") flow = project.get_flow() graph = flow.get_graph() # This line causes the RecursionError below
DSSProjectFlowGraph.get_items_in_traversal_order..add_from(graph_node)
776 predecessor_node = self.nodes[predecessor_ref]
777 if not in_set(predecessor_node):
--> 778 add_from(predecessor_node)
780 # Then add ourselves
781 if not in_set(graph_node):
DSSProjectFlowGraph.get_items_in_traversal_order..add_from(graph_node)
775 for predecessor_ref in graph_node["predecessors"]:
776 predecessor_node = self.nodes[predecessor_ref]
--> 777 if not in_set(predecessor_node):
778 add_from(predecessor_node)
780 # Then add ourselves
DSSProjectFlowGraph.get_items_in_traversal_order..in_set(obj)
767 def in_set(obj):
768 for candidate in ret:
--> 769 if candidate["type"] == obj["type"] and candidate["ref"] == obj["ref"]:
770 return True
771 return False
RecursionError: maximum recursion depth exceeded in comparison
As a result, flows using data to rewrite the same directory become problematic only in certain cases
output dataset > used as intermediate dataset of a recipe upstream of this output dataset.
but not problematic in other cases, such as;
input folder > used as output folder at the end of the flow.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par DSSProjectFlow.get_graph et le traceback de DSSProjectFlowGraph.get_items_in_traversal_order, en utilisant la reproduction fournie du flux en boucle. Vérifiez que get_graph s’achève pour un projet dont le dataset de sortie est réutilisé en amont, et ajoutez une couverture montrant que la boucle ne provoque plus de RecursionError.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100