Skip to content

Fix trigger on finish bugs, and refactor code#2218

Merged
saikonen merged 3 commits intomasterfrom
dev/fix-trigger-bugs
Jan 23, 2025
Merged

Fix trigger on finish bugs, and refactor code#2218
saikonen merged 3 commits intomasterfrom
dev/fix-trigger-bugs

Conversation

@talsperre
Copy link
Copy Markdown
Collaborator

No description provided.

saikonen
saikonen previously approved these changes Jan 22, 2025
Comment thread metaflow/plugins/events_decorator.py Outdated
run_objs.append(run_obj)
current._update_env({"trigger": Trigger.from_runs(run_objs)})

def _parse_static_triggers(self, flows):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is self needed here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's not needed - I can make it static.

# TODO: Also sanity check project and branch names
if not re.match(r"^[A-Za-z0-9_]+$", trigger["flow"]):
raise MetaflowException(
"Invalid flow name *%s* in *@trigger_on_finish* "
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we are missing this check in the PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's still there in the _parse_fq_name function here.

@saikonen saikonen merged commit 9f028e7 into master Jan 23, 2025
@saikonen saikonen deleted the dev/fix-trigger-bugs branch January 23, 2025 00:09
@saikonen saikonen mentioned this pull request Jan 23, 2025
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