Page MenuHomeElementl

Make instance_ref optional on SensorExecutionContext to enable build_sensor_context() without instance
ClosedPublic

Authored by cdecarolis on Tue, May 25, 4:35 PM.

Details

Summary

Making instance_ref optional allows us to not require build_sensor_context() to have an instance attached. This is a lot cleaner from the perspective of docs. The instance is never used in get_execution_data, and will only ever be None in the testing context. Added an error message to be explicit.

Test Plan

Added more unit tests for coverage

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable