Repository navigation
fix(ui): untrack generated natsConnection.json to unblock UI Checkstyle - #32138
Conversation
src/jsons/connectionSchemas/** is generated output: .gitignore:100 ignores the tree, and `yarn parse-schema` (postinstall -> build-check) rmSyncs and rewrites it on every install. #32122 force-added the NATS connection schema into it, in prettier's formatting rather than the `JSON.stringify(obj, null, 2)` form parseSchemas.js emits. The two formats can never agree - JSON.stringify always expands arrays and never writes a trailing newline - so every CI run regenerates the file, dirties the working tree before any check executes, and fails whichever `git status --porcelain` gate in ui-checkstyle.yml runs first: "ESLint + Prettier (src)" for PRs touching src/**, "Licence Header" for everything else. Merge-queue UI Checkstyle has been red since the NATS commit landed. Untrack the file - it is rebuilt at install time, and the spec source under openmetadata-spec/ stays committed - and mirror ESLint's `src/jsons/connectionSchemas/**` ignore into .prettierignore so prettier cannot rewrite generated schemas again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
runParsers() in parseSchemas.js regenerates connectionSchemas/connections, ingestionSchemas, governanceSchemas, applicationSchemas and configuration. The first pass listed only three, leaving governanceSchemas/ and configuration/ open to the same prettier-vs-JSON.stringify conflict. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsUntracks the generated ✅ 1 resolved✅ Bug: .prettierignore misses generated governanceSchemas/configuration dirs
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
CI hotfix — no issue filed,
mainis currently red, so this carries theskip-pr-checkslabel to bypass the linked-issue gate. Happy to file a tracking issue retroactively if
maintainers want it recorded.
UI Checkstylehas been failing on every PR since #32122 (NATS JetStream connector) merged. That PR force-added a generated file into git:That whole tree is generated output.
.gitignore:100(#UI - Dereferenced Schemas) ignores it, andyarn parse-schema— which runs on every install viapostinstall→build-check—rmSyncssrc/jsons/connectionSchemas/connectionsand rewrites the whole tree fromopenmetadata-spec/.The committed copy is prettier-formatted, not the
JSON.stringify(obj, null, 2)formparseSchemas.jswrites. It ended up that way because.prettierignoredid not excludesrc/jsons/(ESLint does —eslint.config.mjsignoressrc/jsons/connectionSchemas/**), so the NATS PR's own checkstyle run reformatted the file and the reformatted output was committed.The two formats can never agree —
JSON.stringifyalways expands arrays and never emits a trailing newline:100 diff lines in total, plus the trailing newline.
Result: on every CI run
yarn installregenerates the file → the working tree is dirty before any check executes → whichevergit status --porcelaingate inui-checkstyle.ymlruns first fails:src/**/*.{ts,tsx,js,jsx,json}package.json/yarn.lock)Evidence — #32136, a
fast-uridependency bump with zero UI source changes, whose licence step loggedInserted license into 0 file(s)and still exited 1:Merge-queue
UI Checkstyleruns flipped from green to red at2026-08-27T00:38Z, the minute the NATS commit landed.This PR:
git rm --cached). It stays on disk and is rebuilt at install time; the spec sourceopenmetadata-spec/.../messaging/natsConnection.jsonremains committed, andMessagingServiceUtils.tsdynamic-imports the generated path exactly like every other connector. Nothing about the NATS connector itself changes..prettierignore(src/jsons/{connectionSchemas,ingestionSchemas,applicationSchemas}/) so prettier cannot fightparse-schemaagain if a generated schema is ever committed.Note: #32131 attempted a fix by re-running prettier on the file — that could not hold, since
parse-schemarewrites it on the next install. It was closed without merging.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
UI Checkstylepasses on a PR that touches only non-srcUI files (previously failed at Licence Header)UI Checkstylepasses on a PR that touchessrc/**(previously failed at ESLint + Prettier (src))yarn parse-schemaUnit tests
Not applicable — no logic changed. This removes a file from git tracking and adds three
.prettierignoreentries.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
git ls-files openmetadata-ui/src/main/resources/ui/src/jsons→ now returns only the two hand-authored files (profilerSettings.json,ssoSchemas/ssoConfigurationUISchema.json).git check-ignore -v <path>→ now matches.gitignore:100, confirming the file is back under the ignore rule.JSON.stringify(…, null, 2)bytesparse-schemaemits, then rangit status --porcelain— no entry for it. Before this change the same step reported it as modified, which is precisely what CI was tripping on.UI screen recording / screenshots:
Not applicable.
Checklist:
.gitignore+.prettierignoreare the guard; CI going green on this PR is the test.)🤖 Generated with Claude Code
Greptile Summary
This CI hotfix removes a generated NATS connection schema from version control and prevents Prettier from modifying generated schema output.
natsConnection.jsonwhile retaining its committed source schema and install-time generation path.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
parseSchemas.js, preventing formatting from dirtying regenerated output.Reviews (2): Last reviewed commit: "fix(ui): cover all five parse-schema out..." | Re-trigger Greptile