https://dagster.io/ logo
#ask-ai
Title
# ask-ai
p

Peter Lim

03/01/2024, 1:26 AM
why is my sensor not yielding RunRequest and just skipping?
s

Scout

03/01/2024, 1:26 AM
There could be several reasons why your sensor is not yielding
RunRequest
objects and is instead skipping. Here are some common scenarios to consider based on the documentation: 1. Sensor Evaluation Logic: Your sensor's evaluation function might be designed in such a way that it does not find the conditions met to yield a
RunRequest
. For example, if your sensor is checking for the presence of new files in a directory and no new files are found, it might yield a
SkipReason
instead of a
RunRequest
. 2. SkipReason: If your sensor function is yielding a
SkipReason
, it means that the sensor has determined there is no work to be done at the moment. This could be due to the logic within the sensor that checks certain conditions and decides to skip the run if those conditions are not met. 3. Errors in Sensor Logic: There might be errors or exceptions in your sensor's logic that are causing it to skip. Ensure that your sensor code is free of errors and that all conditions for yielding a
RunRequest
are being met. 4. Sensor Configuration: Check your sensor configuration, such as
minimum_interval_seconds
, to ensure that the sensor is not being evaluated too frequently or infrequently based on your requirements. 5. Cursor Usage: If your sensor uses cursors to track progress, ensure that the cursor is being managed correctly. An incorrectly managed cursor could cause the sensor to skip when it should not. 6. Sensor Timeouts: If a sensor evaluation function takes more than 60 seconds to return its results, the sensor evaluation will time out, and the Dagster daemon will move on to the next sensor without submitting any runs. Make sure your sensor logic completes within this timeframe. 7. Dagster Version: There have been issues reported where custom skip messages were not displayed correctly in the UI when a sensor has both
yield
and
return
statements. Ensure you are using a version of Dagster where this issue has been addressed if it applies to your case. If you are still unable to determine why your sensor is skipping instead of yielding
RunRequest
objects, you may want to add logging to your sensor evaluation function to get more insight into its behavior during execution. Additionally, reviewing the sensor's code and ensuring that the conditions for yielding a
RunRequest
are correct and being met during evaluation will be crucial in troubleshooting the issue.
4 Views