-
Notifications
You must be signed in to change notification settings - Fork 781
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
feature: add validation for what flow the run_id belongs to #1452
feature: add validation for what flow the run_id belongs to #1452
Conversation
# Project and branch are stored in the workflow template name so this is the easiest comparison to perform. | ||
if workflow_name != deployed_workflow_template_name: | ||
raise MetaflowException( | ||
"The run_id *%s* belongs to the workflow *%s*, not to the workflow *%s*\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't communicate to the user how deployed_workflow_template_name
is imputed. Can we check for project_name
and branch_name
and compare them with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more robust checks that separately verify that the user is targeting the correct branch and project, and notifying which one is not matching the deployed workflow. Do the changes seem adequate?
…and branch_name, accounting for --name. refactor Argo resource name sanitization
* first draft of suspend/unsuspend for argo * rename run_id arg to name * move exception for workflow not found * move argo workflow name validation to cli * decouple pause method * add production token validation * feature: add validation for what flow the run_id belongs to (#1452) * add validation for what flow the run_id belongs to * test using workflow production token for authorization directly. * rework run_id validation to perform separate checks for project_name and branch_name, accounting for --name. refactor Argo resource name sanitization
* first draft of suspend/unsuspend for argo * rename run_id arg to name * move exception for workflow not found * move argo workflow name validation to cli * decouple pause method * add production token validation * feature: add validation for what flow the run_id belongs to (#1452) * add validation for what flow the run_id belongs to * test using workflow production token for authorization directly. * rework run_id validation to perform separate checks for project_name and branch_name, accounting for --name. refactor Argo resource name sanitization
The new CLI commands for argo-workflows that accept a
run_id
have had a pending issue regarding production token authorization, and lacking any guard against passing an arbitrary run_id to a flow file that the user has a valid production token for.This PR introduces checks for