Skip to content

Commit

Permalink
Respect auto_materialize_use_sensors (#25769)
Browse files Browse the repository at this point in the history
## Summary & Motivation

If a user has this setting turned off, then we shouldn't construct a
sensor for them.

Note: this only impacts cases where the user code server is on a lower
dagster version than the host process, as in dagster>=1.9.0, the user
code server will be constructing this sensor anyway.

## How I Tested These Changes

## Changelog

Fixed issue which would cause a `default_automation_condition_sensor` to
be constructed for user code servers running on dagster version < 1.9.0
even if the legacy `auto_materialize: use_sensors` configuration setting
was set to `False`.
  • Loading branch information
OwenKephart authored and benpankow committed Nov 7, 2024
1 parent ca81311 commit 779a48b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def _sensors(self) -> Dict[str, "RemoteSensor"]:
for sensor_snap in self.repository_snap.sensors
}

if not self._instance.auto_materialize_use_sensors:
return sensor_datas

# if necessary, create a default automation condition sensor
# NOTE: if a user's code location is at a version >= 1.9, then this step should
# never be necessary, as this will be added in Definitions construction process
Expand Down

0 comments on commit 779a48b

Please sign in to comment.