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

[BUG] [Metadata Step] Hay objetos que se intentan agregar con otro oid del que existe previamente en detection #376

Closed
dirodriguezm opened this issue Jan 10, 2024 · 2 comments · Fixed by #377 or #378
Assignees
Labels
bug Something isn't working

Comments

@dirodriguezm
Copy link
Contributor

dirodriguezm commented Jan 10, 2024

Una idea de solución:

  1. Capturar el error sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation)
  2. Revisar si la detección (por candid) ya existe en detection con otro oid
  3. Reemplazar oid por el que ya existe y reinsertar
  4. Si la detección no existe, lanzar el error no más y el step va a esperar hasta que se inserte la detección

EDIT: Este no es un error. Es algo de ZTF. Sucede que el candid por si solo no es único. Hay que usar un indice con oid y candid juntos. Esto implica cambios en el schema de mongodb y además los steps de la pipeline que hacen "dropduplicates" por candid.

@dirodriguezm dirodriguezm added the bug Something isn't working label Jan 10, 2024
@dirodriguezm dirodriguezm moved this to 🆕 New in ALeRCE Project Jan 10, 2024
@dirodriguezm dirodriguezm linked a pull request Jan 11, 2024 that will close this issue
6 tasks
@dirodriguezm dirodriguezm moved this from 🆕 New to 👀 In review in ALeRCE Project Jan 12, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in ALeRCE Project Jan 12, 2024
@dirodriguezm
Copy link
Contributor Author

Revisar inserciones y updates en scribe que sean solo por candid.

@dirodriguezm dirodriguezm moved this from ✅ Done to 🏗 In progress in ALeRCE Project Jan 17, 2024
@dirodriguezm dirodriguezm reopened this Jan 17, 2024
@dirodriguezm
Copy link
Contributor Author

Revisar inserciones y updates en scribe que sean solo por candid.

Ya estaba agregado

@dirodriguezm dirodriguezm linked a pull request Jan 17, 2024 that will close this issue
6 tasks
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in ALeRCE Project Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants