Philip Strnad
07/10/2023, 9:56 PMinstigators
table which caused the error - I removed those records, restarted the daemon and everything was fine again. I figured maybe there had been some inconsistent state or bad records in the DB, but since the daemon was running fine I moved on. A few days ago after another deployment with various changes I got the same error again - except that this time removing those records results in other errors.
TypeError: unhashable type: 'list'
Stack Trace:
File "/Users/philipstrnad/python-virtual-environments/dagster/lib/python3.9/site-packages/dagster/_daemon/daemon.py", line 82, in run_daemon_loop
result = check.opt_inst(next(daemon_generator), SerializableErrorInfo)
File "/Users/philipstrnad/python-virtual-environments/dagster/lib/python3.9/site-packages/dagster/_daemon/daemon.py", line 234, in core_loop
yield from execute_scheduler_iteration_loop(
File "/Users/philipstrnad/python-virtual-environments/dagster/lib/python3.9/site-packages/dagster/_scheduler/scheduler.py", line 140, in execute_scheduler_iteration_loop
yield from launch_scheduled_runs(
File "/Users/philipstrnad/python-virtual-environments/dagster/lib/python3.9/site-packages/dagster/_scheduler/scheduler.py", line 226, in launch_scheduled_runs
states_to_delete = {
File "/Users/philipstrnad/python-virtual-environments/dagster/lib/python3.9/site-packages/dagster/_scheduler/scheduler.py", line 227, in <setcomp>
schedule_state
More details and questions in thread...Philip Strnad
07/10/2023, 9:56 PMPhilip Strnad
07/10/2023, 9:56 PMMat Pataki
07/11/2023, 5:58 PMVasco Villas-Boas
08/07/2023, 3:05 PMVasco Villas-Boas
08/07/2023, 8:02 PMPhilip Strnad
08/17/2023, 10:23 PMjobs
and instigators
table. If you're still having issues I could dig up the details, I made notes somewhere.Philip Strnad
08/17/2023, 10:23 PMTim Weelinck
09/05/2023, 3:55 PMPieter Custers
09/05/2023, 4:34 PM# Remove any schedule states that were previously created with AUTOMATICALLY_RUNNING
# and can no longer be found in the workspace (so that if they are later added
# back again, their timestamps will start at the correct place)
I got this from dagster/_scheduler/scheduler.py
where the error message originatesdaniel
09/05/2023, 4:46 PMPieter Custers
09/05/2023, 4:48 PMdaniel
09/05/2023, 4:49 PMPieter Custers
09/05/2023, 5:24 PMdaniel
09/05/2023, 7:15 PMdaniel
09/05/2023, 7:27 PMPhilip Strnad
09/05/2023, 9:48 PMPhilip Strnad
09/05/2023, 9:52 PMfor selector_id, schedule_state in all_schedule_states.items():
if selector_id not in schedules and schedule_state.status == InstigatorStatus.AUTOMATICALLY_RUNNING:
print(schedule_state.selector_id)
Then used those selector_id's to delete from instigators table and jobs table (although there you have to map selector_id to job name first). Anyway, sounds like you can probably avoid doing this since it seems like there's a fix now?daniel
09/05/2023, 9:52 PMPieter Custers
09/06/2023, 6:38 AMPieter Custers
09/06/2023, 6:40 AMselect *
from public.instigators
where (instigator_body::json -> 'job_specific_data' -> 'cron_schedule')::varchar like '%[%'