Discovery run fails at ConnectionTest on the first run after a restart: per-connection field rows are not loaded
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Read packages/Integration/engine/src/IntegrationConnectorCreationPipeline.ts, especially runInternal, LoadCatalogScope, and stageConnectionTest, then trace IntegrationEngineBase.GetIntegrationObjectFields and the connection's catalog rows. Reproduce with a connection that has field rows after restarting MJAPI and running discovery before sync. Done when ConnectionTest handles cold per-connection field rows without falsely reporting a connection failure.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version: 6.2.2 (LTS). The same code is on the next branch.
What happens
A discovery run (the connector creation pipeline) fails at the ConnectionTest stage on the first run after the MJAPI process starts. The run fails in some milliseconds and makes no call to the external system. A later run in the same process passes, after a sync of the same connection has run.
Example from a connector that reads the fields of its first object to build a small test query:
ConnectionTest failed: [elevate] The Report API door rejected a minimal query for resource "AccountingCode", and reported no reason.
The message points the operator to the site URL and the API key, but the two are correct.
Cause
In packages/Integration/engine/src/IntegrationConnectorCreationPipeline.ts, runInternal calls LoadCatalogScope and then stageConnectionTest. LoadCatalogScope loads the objects and the dependency edges of the connection. It does not load field rows.
When the connection already has its own catalog rows, the connector gets the connection's own objects inside the scope. In TestConnection the connector calls GetCachedFields for one of these objects. In IntegrationEngineBase.GetIntegrationObjectFields the field rows of that object are not warm, and RequireWarmFields is not set for this scope, so assertWarm does not throw. The function continues to the resident index, which has no rows for a per-connection object id, and returns an empty list.
The connector then has no column to query and reports a failed connection.
Why it does not show on each run
- A sync calls WarmCatalogObject for each object it reads. The warm rows stay in the process until the row budget removes them. A discovery run that starts after a sync of the same connection finds the rows and passes.
- A connection with no catalog rows of its own gets the shared declared objects, and their fields are resident.
- A connector that does not read fields in TestConnection is not affected.
So the failure shows only when a discovery run is the first work for that connection after a restart, or after the rows are removed from the cache.
Steps to reproduce
- Use a connection that already has rows in CompanyIntegrationObject and CompanyIntegrationObjectField.
- Use a connector whose TestConnection reads GetCachedFields of an object.
- Restart MJAPI.
- Start a discovery run for the connection before a sync of that connection runs.
Suggested correction
- Before stageConnectionTest, warm the field rows of the object or objects that the connector reads in TestConnection. One option is to warm the first active object of the connection. A second option is to give the connector an async step to name the objects it needs.
- Or run the ConnectionTest stage with RequireWarmFields set, so a read of cold field rows throws PER_CONNECTION_CATALOG_OBJECT_COLD and does not return an empty list. This makes the cause visible but does not make the test pass.
The same condition applies to the IntegrationTestConnection resolver if it calls TestConnection inside a catalog scope without warm field rows. I did not test that path.
- Lenguaje dominante
- TSQL
- Estrellas
- 32
- Forks
- 7
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 504
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MemberJunction/MJ
-
DBAutoDoc: export --state-file writes SQL Server SQL for a PostgreSQL database, ignoring --providerAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
MemberJunction/MJ#7094 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
MemberJunction/MJ#6971 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MemberJunction/MJ#6947 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MemberJunction/MJ#6800 ·
Los mantenedores suelen responder en 1 día
-
Convention: saved-query discoverability follows Status — Approved is canon, Pending is a draftAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MemberJunction/MJ#6746 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MemberJunction/MJ
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OHDSI/Data2Evidence#3815 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
roc-lang/basic-webserver#277 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
redhat-developer/rhdh-plugin-export-overlays#4995 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
fidelity
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsPosiblemente ocupada @huanghaoyuanhhy la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zilliztech/milvus-backup#1418 ·
Los mantenedores suelen responder en 1 día