Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

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


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
@wssheldon wssheldon deleted the enhancement/notebook-params branch March 24, 2023 22:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants