Page MenuHomeElementl

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

Authored by cdecarolis on May 25 2021, 4:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 14, 6:40 PM
Unknown Object (File)
Sat, May 13, 6:39 AM
Unknown Object (File)
May 7 2023, 12:28 PM
Unknown Object (File)
Mar 20 2023, 7:15 AM
Unknown Object (File)
Mar 5 2023, 10:43 AM
Unknown Object (File)
Feb 20 2023, 9:05 AM
Unknown Object (File)
Feb 13 2023, 4:21 AM
Unknown Object (File)
Feb 12 2023, 7:26 PM
Subscribers
None

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