-
Notifications
You must be signed in to change notification settings - Fork 787
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
Second stab at deploy time trigger on finish bugs #2212
base: master
Are you sure you want to change the base?
Conversation
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.
not sure which change causes this, but there is also an issue with the following example on argo workflows:
def flow_names_func(ctx):
return ["DeployTimeTriggerParams"]
@trigger_on_finish(flows=flow_names_func)
class DeployTimeTriggerOnFinishFlow2(FlowSpec):
as for whatever reason the trigger now becomes just a string, leading to:
argo_workflows.py", line 635, in _process_triggers
event.get("project") or current.get("project_name"),
AttributeError: 'str' object has no attribute 'get'
if "project" not in trigger: | ||
raise MetaflowException( | ||
f"Trigger: {trigger} parsed at deploy time is missing the *project* key." | ||
) | ||
if "project_branch" not in trigger: | ||
raise MetaflowException( | ||
f"Trigger: {trigger} parsed at deploy time is missing the *project_branch* key." | ||
) |
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.
this seems like a clear change in behaviour. previously partial dictionaries were accepted, though supplying a project without a branch lead to nothing being triggered. a dict with only a name used to be valid though
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.
Yes -- @talsperre , why are we forcing this now? It should be auto-filled with current project/branch if not provided right?
Can we add some unit tests for this logic? It's really complicated and hard to verify correctness just by eyeballing |
No description provided.