Skip to content
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

bugfix: properly deletes Argo Events trigger sensors when @project is used #1871

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

gabriel-rp
Copy link
Contributor

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
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)

    @step
    def end(self):
        pass


if __name__ == "__main__":
    MyTestFlow()

@saikonen saikonen merged commit 0d71c61 into Netflix:master Jun 3, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants