feat(ui): validate confidence and sample-count in Auto Classification agent form - #30893
feat(ui): validate confidence and sample-count in Auto Classification agent form#30893Rohit0301 wants to merge 1 commit into
Conversation
… in Auto Classification agent form - Add minimum/maximum constraints to confidence (0–100) and minimum to sampleDataCount (≥1) in all three auto-classification pipeline JSON schemas (database, messaging, storage). - Add maximum error handler to transformErrors so RJSF surfaces a localised message when confidence exceeds 100. - Add value-must-be-less-than-or-equal i18n key with translations for all 19 non-English locales. - Add Playwright form-validation tests in StorageMetadataAgentForm.spec.ts. Co-Authored-By: Claude Sonnet 4.6 <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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🔴 Playwright Results — workflow failedValidated commit ✅ 761 passed · ❌ 2 failed · 🟡 1 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ❌ unmet · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 56m 33s ⏱️ Max setup 3m 10s · max shard execution 19m 51s · max shard-job elapsed before upload 23m 2s · reporting 6s 🌐 199.24 requests/attempt · 2.50 app boots/UI scenario · 7.39% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ ApprovedAdds schema-first validation and i18n error handlers to the Auto Classification agent form to enforce confidence and sample count constraints, backed by new Playwright E2E tests. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
❌ UI Checkstyle Failed❌ Playwright - ESLint + Prettier + Organise ImportsOne or more Playwright test files have linting or formatting issues. Affected files
🔍 ESLint findings in this PR's files — ESLint report could not be read — see the job log.Errors block the build. Warnings do not yet — they are rules whose backlog is still No machine-readable report was produced. Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
|



Describe your changes:
Fixes #
I added form-level validation to the Auto Classification agent configuration wizard because users could previously enter values like 1000 for the confidence field (0–100 range) or negative numbers for sample row count (must be ≥ 1), and the wizard would silently proceed.
The fix is schema-first:
minimum/maximumconstraints are added to the three auto-classification JSON schemas (database, messaging, storage), which RJSF+AJV8 enforces automatically — invalid values now block the "Next" button and show an inline error message. Amaximumerror handler was added totransformErrorswith a new i18n key (value-must-be-less-than-or-equal) translated into all 19 non-English locales.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../ui/playwright/for UI changes.openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/StorageMetadataAgentForm.spec.tsManual testing performed
1000in the Confidence field and clicked Next — inline error appeared, wizard stayed on config step-1in Sample Data Rows Count and clicked Next — inline error appeared, wizard stayed on config stepUI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.