Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete job #814

Closed
sentry-io bot opened this issue May 2, 2023 · 2 comments · Fixed by #850
Closed

Cannot delete job #814

sentry-io bot opened this issue May 2, 2023 · 2 comments · Fixed by #850
Assignees
Labels
bug Newly identified bug

Comments

@sentry-io
Copy link

sentry-io bot commented May 2, 2023

Sentry Issue: LIGHTNING-2Z

Ecto.ConstraintError: constraint error when attempting to delete struct:

    * invocation_reasons_run_id_fkey (foreign_key_constraint)

If you would like to stop this constraint violation from raising an
exception and instead add it as an error to your changeset, please
call `foreign_key_constraint/3` on your changeset with the constraint
`:name` as an option.

The changeset defined the following constraints:

    * jobs_trigger_id_fkey (foreign_key_constraint)

  File "lib/ecto/repo/schema.ex", line 795, in anonymous fn/4 in Ecto.Repo.Schema.constraints_to_errors/3
  File "lib/enum.ex", line 1658, in Enum."-map/2-lists^map/1-0-"/2
  File "lib/ecto/repo/schema.ex", line 780, in Ecto.Repo.Schema.constraints_to_errors/3
  File "lib/ecto/repo/schema.ex", line 761, in Ecto.Repo.Schema.apply/4
  File "lib/ecto/repo/schema.ex", line 552, in anonymous fn/11 in Ecto.Repo.Schema.do_delete/4
...
(3 additional frame(s) were not displayed)

(Ecto.ConstraintError constraint error when attempting to delete struct:

    * invocation_reasons_run_id_fkey (foreign_key_constraint)

If you would like to stop this constraint violation from raising an
exception and instead add it as an error to your changeset, please
call `foreign_key_constraint/3` on your changeset with the constraint
`:name` as an option.

The changeset defined the following constraints:

    * jobs_trigger_id_fkey (foreign_key_constraint)
)
@taylordowns2000 taylordowns2000 added the bug Newly identified bug label May 2, 2023
@mtuchi
Copy link
Contributor

mtuchi commented May 8, 2023

@taylordowns2000 how can i reproduce this locally ? cc @amberrignell

@taylordowns2000
Copy link
Member

To reproduce:

  1. https://demo.openfn.org - login as AA
  2. OpenHIE Workflow - curl data to it with curl -H 'Content-Type: application/json' -d '{"a":42}' https://demo.openfn.org/i/cae544ab-03dc-4ccc-a09c-fb4edb255d7a
  3. wait for success, then retry the last "notify CHW" run from the previous success (see image)

image

4. Navigate to workflow, attempt to delete the notify CHW job

image

@mtuchi mtuchi self-assigned this May 9, 2023
@amberrignell amberrignell assigned elias-ba and unassigned mtuchi May 26, 2023
@elias-ba elias-ba linked a pull request May 26, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Newly identified bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants