# ask-ai

Henry Tareque

03/04/2024, 9:22 PM
I have a run failure sensor that runs and works successfully locally, but when its running in dagster cloud, it does not successfully trigger on failures. Any ideas why?


03/04/2024, 9:22 PM
If your run failure sensor works locally but not in Dagster Cloud, there could be several reasons for this discrepancy. Here are some steps you can take to troubleshoot the issue, based on the documentation: 1. Verify Sensor Configuration: Ensure that your sensor is configured correctly in Dagster Cloud. This includes checking that the sensor is active and that any environment variables or settings required by the sensor are properly set in the cloud environment. 2. Check the Event Log: Go to the Run page for the run that failed and check the event log at the bottom for any entries related to the sensor. Look for entries like "Sending Slack alerts" if you are using Slack for notifications. If there is no such line, ensure that your alert policy is turned on and that the job matches the alert policy's tags. 3. Slack API Call Failures: If you see an event for "Sending Slack alerts" but no alert appeared in your channel, it could be that the Slack API rejected the call made by Dagster Cloud. Look for an event like "Slack alert failed to send" and check the details for why the API call failed. Common reasons include not installing the Dagster Cloud Slack app or not adding it to the channel where you want to receive alerts. 4. Check for Errors: If there are any errors in the event log related to the sensor, these will provide clues as to what might be going wrong. 5. Dagster Daemon: Ensure that the Dagster daemon is running correctly in Dagster Cloud. The daemon is responsible for running scheduled jobs and sensors, and if it's not running, your sensor won't trigger. 6. Monitor All Runs: If your sensor is set to monitor all runs, ensure that it is not also configured with a
parameter, as this could raise an error. 7. Deployment Differences: Consider any differences between your local environment and Dagster Cloud that might affect the sensor's operation. This could include differences in permissions, network configurations, or dependencies. If after checking these steps you still cannot identify the issue, you may want to consult the Dagster Cloud documentation or reach out to Dagster support for further assistance.