https://dagster.io/ logo
#ask-community
Title
# ask-community
k

Kalyan katamreddi

09/01/2022, 10:39 AM
Hi All, Facing below error while trying to stop the schedule. can anyone please let me know the reason and how we can resolve this? dagster._core.errors.DagsterInvariantViolationError: InstigatorState 1649848e0fa2f0130938a5e026a2daf9675b1ea8 is already present in storage File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/utils.py", line 68, in _fn return fn(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/fetch_schedules.py", line 44, in stop_schedule schedule_origin_id, schedule_selector_id, external_schedules.get(schedule_origin_id) File "/usr/local/lib/python3.7/site-packages/dagster/_core/instance/__init__.py", line 1825, in stop_schedule self, schedule_origin_id, schedule_selector_id, external_schedule File "/usr/local/lib/python3.7/site-packages/dagster/_core/scheduler/scheduler.py", line 144, in stop_schedule instance.add_instigator_state(stopped_state) File "/usr/local/lib/python3.7/site-packages/dagster/_core/instance/__init__.py", line 1936, in add_instigator_state return self._schedule_storage.add_instigator_state(state) File "/usr/local/lib/python3.7/site-packages/dagster/_core/storage/schedules/sql_schedule_storage.py", line 144, in add_instigator_state ) from exc The above exception was caused by the following exception: sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "jobs_job_origin_id_key" DETAIL: Key (job_origin_id)=(1649848e0fa2f0130938a5e026a2daf9675b1ea8) already exists. [SQL: INSERT INTO jobs (job_origin_id, repository_origin_id, status, job_type, job_body) VALUES (%(job_origin_id)s, %(repository_origin_id)s, %(status)s, %(job_type)s, %(job_body)s) RETURNING jobs.id] [parameters: {'job_origin_id': '1649848e0fa2f0130938a5e026a2daf9675b1ea8', 'repository_origin_id': '07554bdccff4ccb64d8f607167688f4a62a9e6d9', 'status': 'STOPPED', 'job_type': 'SCHEDULE', 'job_body': '{"__class__": "InstigatorState", "job_specific_data": {"__class__": "ScheduleInstigatorData", "cron_schedule": "00 03 * * *", "start_timestamp": null ... (380 characters truncated) ... ry_name": "kh_ingestion"}, "job_name": "schedule_1_ingest_to_snf_RAW_SAP_KST_BIC_PZDMDUNEU_job"}, "status": {"__enum__": "InstigatorStatus.STOPPED"}}'}]
2 Views