I did not find any test setup to create unit or integration tests. So my only test was replacing the Metaflow library with my fork and ensuring the sensors would be deleted. Before the change, they were not.
Here are the logs for the same flow used in the issue description. As expected, this time the sensors were deleted. I have also checked the Kubernetes resources.
argo-workflows delete
Metaflow 2.12.0 executing MyTestFlow for user:g.pereira.3
Project: my_test_project, Branch: user.g.pereira.3
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Deleting workflow mytestproject.user.g.pereira.3.mytestflow...
Deleting sensor mytestproject.user.g.pereira.3.mytestflow...
Deleting Kubernetes resources may take a while. Deploying the flow again to Argo Workflows while the delete is in-flight will fail.
In-flight executions will not be affected. If necessary, terminate them manually.
Flow used for testing
from metaflow import FlowSpec, step, project, trigger
@project(name="my_test_project")
@trigger(event="test_airflow_trigger")
class MyTestFlow(FlowSpec):
@step
def start(self):
self.next(self.end)
This fixes issue #1870.
Tests
I did not find any test setup to create unit or integration tests. So my only test was replacing the Metaflow library with my fork and ensuring the sensors would be deleted. Before the change, they were not.
Here are the logs for the same flow used in the issue description. As expected, this time the sensors were deleted. I have also checked the Kubernetes resources.
argo-workflows delete
@project(name="my_test_project") @trigger(event="test_airflow_trigger") class MyTestFlow(FlowSpec): @step def start(self): self.next(self.end)
if name == "main": MyTestFlow()