Discovery run fails at ConnectionTest on the first run after a restart: per-connection field rows are not loaded
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TSQL
- スター
- 32
- フォーク
- 7
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 504
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MemberJunction/MJ のほかの issue
-
DBAutoDoc: export --state-file writes SQL Server SQL for a PostgreSQL database, ignoring --providerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
MemberJunction/MJ#7094 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
MemberJunction/MJ#6971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MemberJunction/MJ#6947 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MemberJunction/MJ#6800 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MemberJunction/MJ#6746 ·
メンテナーはふだん 1 日以内に返信
MemberJunction/MJ の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OHDSI/Data2Evidence#3815 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
roc-lang/basic-webserver#277 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4995 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fidelity
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hosts対応中かも @huanghaoyuanhhy が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zilliztech/milvus-backup#1418 ·
メンテナーはふだん 1 日以内に返信