RSU commits the host's additionalSchemaInfo copy over the repository's file, deleting other integrations' soft keys
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github, typescript
調査の方向性
Start with packages/SchemaEngine/src/RuntimeSchemaManager.ts, especially writeAdditionalSchemaInfo, collectAllRSUFiles, and apiCreateTreeFromFiles; trace how RSU reads the host copy and builds its commit from baseSha. Check how to read the target branch’s file through the GitHub API and preserve sections outside the integration being processed. Done means RSU retains the other schemas and sections, reports invalid or missing base data, and refuses unsafe writes; the issue names no tests to run.
索引モデルが issue の本文から書いたものです。
説明
Summary
An RSU run that installs or refreshes one integration can replace the whole configured additionalSchemaInfo file in the instance's repository with just that integration's tables. All other soft primary keys, soft foreign keys, value lists and schema-level sections are deleted from git.
Where
packages/SchemaEngine/src/RuntimeSchemaManager.ts (lts/6.2; the same logic is in 6.1.6):
writeAdditionalSchemaInfo(about lines 1952–2006) merges the incoming tables into the copy of the file on the MJAPI host's disk. When that file is missing, or can't be read or parsed, it silently starts from{}(thecatch {}aroundJSON.parse).collectAllRSUFiles(about lines 2647–2650) then adds that host file to the RSU commit, andapiCreateTreeFromFiles(base_tree, about line 2568) replaces the repository's blob with it.
How it happens
A deployment that doesn't ship the file to the host leaves the host with no copy. The MJ Central MJAPI deploy zip, for example, doesn't include metadata/. So every RSU run merges into an empty object and commits only its own integration's tables. In one instance, three runs in a row each replaced the file:
- the first removed two schemas' curated keys (hundreds of foreign keys, thousands of value lists);
- the later two removed a third schema.
The applied keys survived in the database only because CodeGen on 6.1 adds keys and never removes them. With 6.2's retractRemovedSoftKeys turned on, the next CodeGen would have retracted them.
Expected
An RSU run changes only the tables of the integration it processes; every other section of the file in the repository stays as it was.
Proposed fix
- Merge into the target branch's file at the commit RSU builds on (
baseSha), read through the GitHub API, not the host's copy. - Refuse to commit when the merged result drops a schema or section that the base file has, unless the run is explicitly authoritative for it.
- Don't treat a missing, unreadable or unparsable file as
{}: report it, and fail the write step when the base file isn't empty. - Optionally, have the MJ Central MJAPI deploy ship the configured
additionalSchemaInfofile, so the host's copy exists. That is not enough on its own: the host's copy is only as new as the last deploy.
Workaround
Ship the file in the instance's MJAPI deploy, and deploy after any hand edit to it. The affected instance did this, and restored the file from git history.
- 主要言語
- 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
-
Fish Audio Live calls fail to start: `Unknown callback "onNotice"` from @fishaudio/agent-client対応中かも @NEAL3K が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
milind-soni/OpenMausBot#8345 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
w3c/feedvalidator#204 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
open-mmlab/mmcv#3352 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100