Skip to content

feat(FR-2592): replace service-definition.toml with deployment-config.yaml#6754

Open
agatha197 wants to merge 1 commit intomainfrom
04-16-feat_fr-2592_replace_service-definition.toml_with_deployment-config.yaml
Open

feat(FR-2592): replace service-definition.toml with deployment-config.yaml#6754
agatha197 wants to merge 1 commit intomainfrom
04-16-feat_fr-2592_replace_service-definition.toml_with_deployment-config.yaml

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 16, 2026

Resolves #6750 (FR-2592)

Summary

  • Replace all references to service-definition.toml with deployment-config.yaml across the frontend codebase
  • Switch from TOML parsing (smol-toml) to YAML parsing (yaml) in the service launcher hook
  • Rename the schema file from service-definition.schema.json to deployment-config.schema.json
  • Update the editor schema mapping to use YAML validation instead of TOML validation
  • Update E2E test fixtures to use YAML format and the new filename
  • Update i18n strings across all 21 language files to reference the new filename

Verification

scripts/verify.sh passes: Relay, Lint, Format, TypeScript all PASS.

Copilot AI review requested due to automatic review settings April 16, 2026 08:35
@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization labels Apr 16, 2026
@github-actions github-actions Bot added the size:XL 500~ LoC label Apr 16, 2026
Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@agatha197
Copy link
Copy Markdown
Contributor Author

Security & Code Review -- PR #6754

Summary

This PR replaces service-definition.toml with deployment-config.yaml across the frontend. The core code changes (parser swap, schema mapping, E2E tests, i18n) are well-executed. No security vulnerabilities were found. The YAML parsing uses the yaml npm package v2.x parse() function, which is safe by default (no code execution, unlike Python's yaml.load()).


Findings

[HIGH] Stray worktree lockfile committed

File: pnpm-lock.worktree-agent-ad7bd5f1.yaml (32,105 lines added)

This is a pnpm worktree artifact that should not be in the PR. It inflates the PR by 32K+ lines and would pollute the repository if merged. This file must be removed before merge.


[MEDIUM] Incomplete i18n migration for ServiceDefinitionRequired key

Files: 16 language files under resources/i18n/

The ServiceDefinitionParseError key was correctly updated to reference deployment-config.yaml in all languages. However, the ServiceDefinitionRequired key still references the old TOML filename in 16 out of 21 languages. Only en, ja, ko, ru, and th were updated.

Languages still referencing the old filename:

  • de.json: "Service-Definition.toml-Datei ist erforderlich."
  • el.json: "Απαιτείται αρχείο Service-Definition.toml."
  • es.json: "Service-DeFinition.TOML File es necesario."
  • fi.json: "Palvelu-definition.Toml-tiedosto tarvitaan."
  • fr.json: "Le fichier service-definition.toml est necessaire."
  • id.json: "File layanan-definisi.toml diperlukan."
  • it.json: "E necessario il file Service Definition.Toml."
  • mn.json: "...toml файл шаардлагатай байна."
  • ms.json: "Fail definisi.toml perkhidmatan diperlukan."
  • pl.json: "Potrzebny jest plik serwis-definition.toml."
  • pt.json: "e necessario o arquivo de servico de definicao.toml."
  • pt-BR.json: "e necessario o arquivo de servico de definicao.toml."
  • tr.json: "Service-Definition.toml dosyasi gereklidir."
  • vi.json: "Can dinh nghia dich vu.TOML."
  • zh-CN.json: "需要服务定义。toml文件。"
  • zh-TW.json: "需要服務定義.toml文件。"

These should all be updated to reference deployment-config.yaml.


[LOW] Documentation not updated

Files: Multiple files under packages/backend.ai-webui-docs/src/

The user-facing documentation (en, ko, ja, th) still references service-definition.toml extensively. While this may be intentional if documentation is updated separately, it creates inconsistency with the codebase. The docs reference the old filename in admin menu guides and model serving guides across all supported doc languages.


[LOW] Dead code: 'toml' type in SchemaMapping

File: react/src/components/VFolderTextFileEditorModal.tsx (line 69, 365)

The SchemaMapping type union still includes 'toml' and there is a code branch handling mapping.type === 'toml' (lines 365-370), but no entry in definitionSchemaMap uses type: 'toml' anymore. This is dead code for the schema validation path. Not urgent since it doesn't affect behavior, but could be cleaned up.


Security Assessment

Check Status
YAML parsing safety (yaml.parse vs unsafe yaml.load) PASS -- uses safe parse() from yaml npm v2.x
Injection vulnerabilities (SQL, Command, XSS) PASS -- no injection vectors found
Hardcoded secrets/API keys PASS -- none found
eval() / dangerouslySetInnerHTML PASS -- not used
Input validation at boundaries PASS -- parse errors are caught and surfaced to user
CORS / security headers N/A -- no server-side changes

Required Actions Before Merge

  1. Remove pnpm-lock.worktree-agent-ad7bd5f1.yaml from the PR
  2. Update ServiceDefinitionRequired i18n key in the 16 remaining language files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.65% (-0% 🔻)
1738/20102
🔴 Branches
7.85% (-0% 🔻)
1104/14068
🔴 Functions 5.19% 283/5452
🔴 Lines
8.35% (-0% 🔻)
1630/19521

Test suite run success

847 tests passing in 38 suites.

Report generated by 🧪jest coverage report action from e87750e

@agatha197 agatha197 force-pushed the 04-16-feat_fr-2592_replace_service-definition.toml_with_deployment-config.yaml branch from 3350c75 to c306e4c Compare April 16, 2026 08:41
@github-actions github-actions Bot added type:enhance Add new features size:L 100~500 LoC and removed size:XL 500~ LoC labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the model-serving “definition file” workflow by replacing the legacy service-definition.toml artifact with deployment-config.yaml across UI logic, schema validation, E2E fixtures, and localized user-facing messages.

Changes:

  • Switch service-definition parsing in the service launch flow from TOML to YAML and update required filename checks to deployment-config.yaml.
  • Add a JSON Schema for deployment-config.yaml and wire it into the VFolder text editor validation map.
  • Update multiple locale JSONs and E2E fixtures to reflect the new filename and YAML content format.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
resources/i18n/en.json Update user-facing messages to reference deployment-config.yaml instead of service-definition.toml.
resources/i18n/zh-TW.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/zh-CN.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/vi.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/tr.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/th.json Update related messages to reference deployment-config.yaml.
resources/i18n/ru.json Update related messages to reference deployment-config.yaml.
resources/i18n/pt.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/pt-BR.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/pl.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/ms.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/mn.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/ko.json Update related messages to reference deployment-config.yaml.
resources/i18n/ja.json Update related messages to reference deployment-config.yaml.
resources/i18n/it.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/id.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/fr.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/fi.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/es.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/de.json Update related messages; still has one remaining *.toml reference (see comments).
resources/i18n/el.json Update related messages; still has one remaining *.toml reference (see comments).
resources/deployment-config.schema.json Introduce schema for deployment config validation (metadata currently inconsistent; see comments).
react/src/hooks/useModelServiceLauncher.ts Switch download/parse from TOML to YAML and update filename checks to deployment-config.yaml.
react/src/components/VFolderTextFileEditorModal.tsx Point schema validation map from the old service-definition schema to the new deployment-config schema.
react/src/components/LegacyModelTryContentButton.tsx Update inline docs and required-file checks to deployment-config.yaml.
e2e/serving/serving-deploy-lifecycle.spec.ts Update uploaded fixture name/content from TOML to YAML for lifecycle coverage.
Comments suppressed due to low confidence (1)

resources/deployment-config.schema.json:6

  • Schema metadata is inconsistent with the new filename: $id still points to service-definition.schema.json, and the title/description still describe the old “Service Definition” JSON file. Update $id, title, and description to reflect deployment-config.schema.json / deployment-config.yaml so tooling and editors don’t report misleading schema identity.

Comment thread resources/i18n/ms.json Outdated
Comment thread resources/i18n/it.json Outdated
Comment thread resources/i18n/es.json Outdated
Comment thread resources/i18n/zh-CN.json Outdated
Comment thread resources/i18n/mn.json Outdated
Comment thread resources/i18n/pl.json Outdated
Comment thread react/src/hooks/useModelServiceLauncher.ts Outdated
Comment thread resources/i18n/zh-TW.json Outdated
Comment thread resources/i18n/tr.json Outdated
Comment thread resources/i18n/pt-BR.json Outdated
@agatha197 agatha197 force-pushed the 04-16-feat_fr-2592_replace_service-definition.toml_with_deployment-config.yaml branch from c306e4c to bb946b1 Compare April 16, 2026 09:01
@agatha197 agatha197 requested a review from Copilot April 16, 2026 09:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 9 comments.

Comment thread resources/i18n/vi.json Outdated
Comment thread resources/i18n/pt.json Outdated
Comment thread resources/i18n/ms.json Outdated
Comment thread resources/i18n/pl.json Outdated
Comment thread resources/i18n/fi.json Outdated
Comment thread resources/i18n/es.json Outdated
Comment thread resources/i18n/vi.json Outdated
Comment thread resources/i18n/pt-BR.json Outdated
Comment thread resources/i18n/id.json Outdated
@agatha197 agatha197 force-pushed the 04-16-feat_fr-2592_replace_service-definition.toml_with_deployment-config.yaml branch from bb946b1 to e87750e Compare April 16, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC type:enhance Add new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace service-definition.toml with deployment-config.yaml

2 participants