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

Auto-run workflows associated with Signals and auto-parameterize with Entity Type values #3128

Merged
merged 21 commits into from Mar 24, 2023

Conversation

wssheldon
Copy link
Contributor

@wssheldon wssheldon commented Mar 17, 2023

We parameterize workflows/notebooks with values from entities by assigning the entity type name as the parameter value and then checking if that name exists in the entities for a consumed signal.

Configure Workflows for a Signal Definition

Screenshot 2023-03-23 at 3 04 44 PM

Create Workflows using Entity Types in a Dialog

Screenshot 2023-03-23 at 3 06 47 PM

Creating signal..
Enter instance flow..
Looking for signal_instance.signal.entity_types=[<EntityType #6>]
signal_instance.signal.workflows=[<Workflow #42>]
Running workflow=<Workflow #42>
instance=<WorkflowInstance #48>
entities=[<Entity #2>]
workflow.parameters=[{'key': 'apps', 'value': 'MetaflowARNTest'}]
Got value='MetaflowARNTest' for p={'key': 'apps', 'value': 'MetaflowARNTest'}
Got entity.entity_type.name='MetaflowARNTest' for value='MetaflowARNTest'
params={'apps': 'arn:aws:iam::123456789012:role/Test'}

@wssheldon wssheldon added the enhancement New feature or request label Mar 17, 2023
@wssheldon wssheldon marked this pull request as ready for review March 23, 2023 22:01
@wssheldon wssheldon requested a review from kevgliss March 23, 2023 22:12
@@ -103,7 +103,7 @@ def test_filter_actions_deduplicate(session, signal, project):
assert signal_instance_2.filter_action == SignalFilterAction.deduplicate


def test_filter_actions_snooze(session, signal, project):
def test_filter_actions_snooze(session, entity, signal, project):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kevgliss FYI

to resolve:

psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "entity_pkey"
DETAIL:  Key (id)=(10) already exists.

In case there's some deeper issue I am not seeing.

@wssheldon wssheldon merged commit c0d21c1 into master Mar 24, 2023
7 checks passed
@wssheldon wssheldon deleted the enhancement/notebook-params branch March 24, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants