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

student attempt at implementing termination of step function execution #1596

Conversation

mikesteroonie
Copy link

It seemed like there was an open issue with regards to the lack of implementation of the termination of a step function and I made an attempt to implement it. Would love feedback / help in getting this implemented!! Im still learning so I appreciate any and all feedback :)

@@ -82,8 +82,18 @@ def list_executions(self, state_machine_arn, states):
)

def terminate_execution(self, state_machine_arn, execution_arn):
# TODO
pass
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still needs a counterpart in the step_functions_cli.py so the function can be called through the CLI. You can see how the command has been implemented in argo_workflows_cli.py for some example on the plumbing.

Another thing that needs to be implemented for this feature is a validate_run_id (again, similar to argo CLI) which checks that the run_id the user has provided belongs to the correct flow/project/user and has a matching token.
This is to guard against being able to issue arbitrary commands such as

python anyflow.py step-functions terminate not-my-run-id

@madhur-ob
Copy link
Collaborator

Closing since #1695 was merged.

@madhur-ob madhur-ob closed this Feb 5, 2024
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.

3 participants