@@ -170,6 +170,7 @@ async def trigger_update_python_computed_attributes(
170170 "object_id" : node .id ,
171171 "computed_attribute_name" : computed_attribute_name ,
172172 "computed_attribute_kind" : computed_attribute_kind ,
173+ "context" : context ,
173174 },
174175 )
175176
@@ -315,6 +316,7 @@ async def trigger_update_jinja2_computed_attributes(
315316 "computed_attribute_kind" : computed_attribute_kind ,
316317 "node_kind" : computed_attribute_kind ,
317318 "object_id" : node .id ,
319+ "context" : context ,
318320 },
319321 )
320322
@@ -383,6 +385,13 @@ async def computed_attribute_setup(
383385 "computed_attribute_name" : computed_attribute .attribute .name ,
384386 "computed_attribute_kind" : computed_attribute .kind ,
385387 "updated_fields" : "{{ event.payload['fields'] | tojson }}" ,
388+ "context" : {
389+ "__prefect_kind" : "json" ,
390+ "value" : {
391+ "__prefect_kind" : "jinja" ,
392+ "template" : "{{ event.payload['context'] | tojson }}" ,
393+ },
394+ },
386395 },
387396 job_variables = {},
388397 )
@@ -407,6 +416,7 @@ async def computed_attribute_setup(
407416 "branch_name" : registry .default_branch ,
408417 "computed_attribute_name" : computed_attribute .attribute .name ,
409418 "computed_attribute_kind" : computed_attribute .kind ,
419+ "context" : context ,
410420 },
411421 )
412422
@@ -448,6 +458,13 @@ async def computed_attribute_setup(
448458 "computed_attribute_name" : computed_attribute .attribute .name ,
449459 "computed_attribute_kind" : computed_attribute .kind ,
450460 "updated_fields" : "{{ event.payload['fields'] | tojson }}" ,
461+ "context" : {
462+ "__prefect_kind" : "json" ,
463+ "value" : {
464+ "__prefect_kind" : "jinja" ,
465+ "template" : "{{ event.payload['context'] | tojson }}" ,
466+ },
467+ },
451468 },
452469 job_variables = {},
453470 )
@@ -474,6 +491,7 @@ async def computed_attribute_setup(
474491 "branch_name" : branch_name ,
475492 "computed_attribute_name" : computed_attribute .attribute .name ,
476493 "computed_attribute_kind" : computed_attribute .kind ,
494+ "context" : context ,
477495 },
478496 )
479497
@@ -565,6 +583,13 @@ async def computed_attribute_setup_python(
565583 "object_id" : "{{ event.resource['infrahub.node.id'] }}" ,
566584 "computed_attribute_name" : computed_attribute .computed_attribute .attribute .name ,
567585 "computed_attribute_kind" : computed_attribute .computed_attribute .kind ,
586+ "context" : {
587+ "__prefect_kind" : "json" ,
588+ "value" : {
589+ "__prefect_kind" : "jinja" ,
590+ "template" : "{{ event.payload['context'] | tojson }}" ,
591+ },
592+ },
568593 },
569594 job_variables = {},
570595 )
@@ -613,6 +638,13 @@ async def computed_attribute_setup_python(
613638 "branch_name" : "{{ event.resource['infrahub.branch.name'] }}" ,
614639 "node_kind" : "{{ event.resource['infrahub.node.kind'] }}" ,
615640 "object_id" : "{{ event.resource['infrahub.node.id'] }}" ,
641+ "context" : {
642+ "__prefect_kind" : "json" ,
643+ "value" : {
644+ "__prefect_kind" : "jinja" ,
645+ "template" : "{{ event.payload['context'] | tojson }}" ,
646+ },
647+ },
616648 },
617649 job_variables = {},
618650 )
@@ -641,6 +673,7 @@ async def computed_attribute_setup_python(
641673 "branch_name" : branch_name ,
642674 "computed_attribute_name" : computed_attribute .computed_attribute .attribute .name ,
643675 "computed_attribute_kind" : computed_attribute .computed_attribute .kind ,
676+ "context" : context ,
644677 },
645678 )
646679
0 commit comments