From 36c4371d86be413434a3f1e964df099815ce801a Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Mon, 28 Nov 2022 12:50:12 -0600 Subject: [PATCH] updating end2end tests from boilerplate (#497) Signed-off-by: Dan Rammer Signed-off-by: Dan Rammer --- boilerplate/flyte/end2end/run-tests.py | 36 +++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) mode change 100755 => 100644 boilerplate/flyte/end2end/run-tests.py diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py old mode 100755 new mode 100644 index b868be57f..b48f2be9d --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -21,8 +21,14 @@ # inputs. This is so we can progressively cover all priorities in the original flytesnacks manifest, # starting with "core". FLYTESNACKS_WORKFLOW_GROUPS: Mapping[str, List[Tuple[str, dict]]] = { + "lite": [ + ("core.flyte_basics.hello_world.my_wf", {}), + ("core.flyte_basics.lp.go_greet", {"day_of_week": "5", "number": 3, "am": True}), + ], "core": [ - ("core.control_flow.chain_entities.chain_workflows_wf", {}), + ("core.flyte_basics.deck.wf", {}), + # The chain_workflows example in flytesnacks expects to be running in a sandbox. + # ("core.control_flow.chain_entities.chain_workflows_wf", {}), ("core.control_flow.dynamics.wf", {"s1": "Pear", "s2": "Earth"}), ("core.control_flow.map_task.my_map_workflow", {"a": [1, 2, 3, 4, 5]}), # Workflows that use nested executions cannot be launched via flyteremote. @@ -52,7 +58,7 @@ # ("core.type_system.enums.enum_wf", {"c": "red"}), ("core.type_system.schema.df_wf", {"a": 42}), ("core.type_system.typed_schema.wf", {}), - ("my.imperative.workflow.example", {"in1": "hello", "in2": "foo"}), + #("my.imperative.workflow.example", {"in1": "hello", "in2": "foo"}), ], "integrations-k8s-spark": [ ("k8s_spark.pyspark_pi.my_spark", {"triggered_date": datetime.datetime.now()}), @@ -63,9 +69,9 @@ "integrations-kftensorflow": [ ("kftensorflow.tf_mnist.mnist_tensorflow_workflow", {}), ], - "integrations-pod": [ - ("pod.pod.pod_workflow", {}), - ], + # "integrations-pod": [ + # ("pod.pod.pod_workflow", {}), + # ], "integrations-pandera_examples": [ ("pandera_examples.basic_schema_example.process_data", {}), # TODO: investigate type mismatch float -> numpy.float64 @@ -98,10 +104,15 @@ def executions_finished(executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecu return True def sync_executions(remote: FlyteRemote, executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecution]]): - for executions in executions_by_wfgroup.values(): - for execution in executions: - print(f"About to sync execution_id={execution.id.name}") - remote.sync(execution) + try: + for executions in executions_by_wfgroup.values(): + for execution in executions: + print(f"About to sync execution_id={execution.id.name}") + remote.sync(execution) + except: + print("GOT TO THE EXCEPT") + print("COUNT THIS!") + def report_executions(executions_by_wfgroup: Dict[str, List[FlyteWorkflowExecution]]): for executions in executions_by_wfgroup.values(): @@ -185,10 +196,11 @@ def run( f"{flytesnacks_release_tag}/cookbook/flyte_tests_manifest.json" r = requests.get(manifest_url) parsed_manifest = r.json() + workflow_groups = [] + workflow_groups = ["lite"] if "lite" in priorities else [ + group["name"] for group in parsed_manifest if group["priority"] in priorities + ] - workflow_groups = [ - group["name"] for group in parsed_manifest if group["priority"] in priorities - ] results = [] valid_workgroups = [] for workflow_group in workflow_groups: