Fixes 30704: Gate agent wizard Next on form readiness and clear the stuck dashboard service loader - #30705
Open
aniketkatkar97 wants to merge 3 commits into
Open
Fixes 30704: Gate agent wizard Next on form readiness and clear the stuck dashboard service loader#30705aniketkatkar97 wants to merge 3 commits into
aniketkatkar97 wants to merge 3 commits into
Conversation
…e loader Fixes #30704 The Add/Edit agent wizard's footer `next-button` had no disabled state, so pressing it before the lazily loaded RJSF templates resolved called `submit()` against a null form ref and silently did nothing. Report step readiness from inside the Suspense boundary and disable the button until the form is mounted. Also suppress the stray RJSF default submit button that appeared because a falsy `children` expression reads as "no children". `fetchDashboardsDataModel` never cleared `isServiceLoading`, so switching tabs on a dashboard service left the still-mounted entity tab's table spinner running for the rest of the page's life. On the Playwright side, add `waitForIngestionWorkflowForm` and use it at every step-1 advance, scope the agent-tab loader waits the way `addIngestionPipeline` already does, move the dbt config source onto the react-aria `oneOf` select, and replace the two `submit-btn` clicks that no longer resolve. `selectOneOfOption` now opens the select by clicking its wrapper instead of react-aria's visually hidden native combobox, which never opened the listbox. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
`fetchDashboardsDataModel` only feeds the Data Model tab's count label, but it was also driving `isServiceLoading` and, on error, the entity list paging — both of which belong to `getOtherDetails`. Sharing the flag meant whichever request settled first decided the entity table's spinner, so a fast count query could clear it while the entity list was still in flight. Dropping the writes fixes the stuck spinner without introducing that race, and is simpler than clearing the flag in a `finally`. Co-Authored-By: Claude <noreply@anthropic.com>
Code Review ✅ ApprovedGates the agent wizard Next button on lazy-loaded form readiness and ensures dashboard service loading states clear correctly when switching tabs. 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 |
Contributor
|
ShaileshParmar11
approved these changes
Jul 30, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Describe your changes:
Fixes #30704
ServiceIngestion.spec.tswas failing on the nightly AUT run. I pulled the retained traces (16 zips) and found four distinct failure signatures, not one flake — two genuine product bugs plus two stale selectors. Because the affected blocks aretest.describe.serial, one root cause takes out a whole service suite (e.g. Superset never reachesUpdate schedule optionsbecauseUpdate description…dies first).getByTestId('schedular-schedule')times out (60 s)next-buttonsilently no-ops while the RJSF form is suspendedexpect(loader).toHaveCount(0)stuck at 1 (30 s)fetchDashboardsDataModelnever clearsisServiceLoading#root/dbtConfigSource__oneof_selecttimes outoneOfselect replaced by a react-aria SelectDonetimes out (180 s)CollateSaaSrunner never completes theRestworkflow — infra, out of scope1.
next-buttonis a dead click while the Configure Ingestion form lazy-loads.AddIngestionPage/EditIngestionPagerender the footer'snext-buttonwith no disabled state; pressing it callsaddIngestionRef.current?.submit()→workflowFormRef.current?.submit()→formRef.current?.submit().IngestionWorkflowFormwraps its RJSF<Form>in<Suspense>and passes bareReact.lazytemplates, so until those chunks resolveformRef.currentisnullandsubmit()does nothing — no toast, no validation error, the wizard just stays on step 1. The trace is unambiguous:edit-buttonat t=391905,next-buttonat t=392080 (175 ms later), wizard data fetches landing at t=392102 — after the click. Regressed in #28569, which moved the advance button out of the form (it used to be a nativehtmlType="submit", which could not race a ref).IngestionWorkflowFormnow reports readiness from a smallFormReadyNotifierrendered inside the Suspense boundary (so its effect can only fire once every lazy template has resolved),AddIngestionforwards that up asonStepReadyChange, and both host pages disablenext-buttonuntil the active step is ready — mirroring thefooterNextDisabledpatternEmbeddedAddServicePagealready uses. Step 2 (ScheduleIntervalStep) is a static import, so it reports ready immediately.While in there:
{!hideFooter && (…)}evaluates tofalse, and RJSF treats falsy children as "no children" (children ? children : <SubmitButton/>), so it was injecting its own stray "Submit" button into the wizard next to the real footer. Suppressed viaui:submitButtonOptions: { norender: true }.2. Dashboard services leave a table spinner running forever.
ServiceDetailsPage.fetchDashboardsDataModelsetisServiceLoading(true)with nofinally, unlike its siblinggetOtherDetails. Its effect re-runs onactiveTab, andgetOtherDetailsearly-returns on a non-entity tab, so switching Dashboards → Agents left the flag stuck on. antdTabskeeps the visited pane mounted, so the Dashboards<Table loading>spinner stayed DOM-attached for the rest of the page's life. Invisible to the user, but fatal to any page-wide[data-testid="loader"]assertion — and dashboard-service-specific, which is exactly why only Superset and Metabase failed.3. Playwright fixes. New
waitForIngestionWorkflowFormhelper (mirrors the existingwaitForServiceConnectionForm) used at every step-1 advance;openAgentScheduleStepextracted from the four duplicated blocks inupdateScheduleOptions; the agent-tab loader waits inupdateDescriptionForIngestedTablesscoped the wayaddIngestionPipelinealready does it; the dbt config source moved onto the existingselectOneOfOptionhelper; and the two[data-testid="submit-btn"]clicks replaced withnext-button— that testid does not exist in this wizard (verified against@rjsf/core5.24.13Form.render; the button rendered there is RJSF's default and carries no testid).selectOneOfOptionitself had a latent bug found while dry-running: its Select branch preferred clicking react-aria's visually hidden nativecombobox(withforce: true), which never opens the listbox. Only the tabs branch was exercised by passing tests. It now clicks the wrapper — the patternServiceBaseClass.createServicealready uses successfully for the ingestion-runner select — and scopes options to the visible popover.Type of change:
High-level design:
The wizard footer lives in the host page while the form it submits lives three levels down behind a Suspense boundary, so "is this step submittable" has to travel upwards. Rather than reach into the ref, readiness is reported as a plain callback chain:
FormReadyNotifieris a sibling of<Form>rather than one of its children on purpose — RJSF'schildrenslot doubles as the submit-button override, and putting anything there changes button rendering. Being inside the boundary is what makes the signal correct: any suspending template defers the whole subtree, so the effect cannot fire early.Alternatives rejected:
d82b7cf0cc).No schema, API, or migration impact. The new props are optional, so the third
AddIngestion-shaped consumer (EmbeddedAddServicePage, which already has its own gate) is unaffected.Tests:
Use cases covered
oneOfselect.Unit tests
src/components/Settings/Services/AddIngestion/AddIngestion.test.tsx— the configure step reports ready only after the workflow form mounts; the schedule step reports ready immediately.src/pages/AddIngestionPage/AddIngestionPage.test.tsx—next-buttonstays disabled until the active step reports ready.src/pages/ServiceDetailsPage/ServiceDetailsPage.test.tsx— the entity tab is not left loading after moving off it, on both the resolved and rejected data-model-count paths.yarn test src/components/Settings/Services src/pages/AddIngestionPage src/pages/ServiceDetailsPage→ 28 suites, 322 tests passing.ServiceDetailsPagetest was confirmed to actually fail without the fix (data-service-loading="true") before being kept.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/nightly/ServiceIngestion.spec.ts— newEdit agent wizard step navigationdescribe: creates a MySQL service + deployed metadata pipeline via API, opens the edit wizard, and asserts Next reaches the schedule step. No ingestion runtime needed, so it is a cheap regression guard for the 60 s timeout.playwright/utils/serviceIngestion.ts,playwright/utils/serviceFormUtils.ts,playwright/support/entity/ingestion/{ServiceBaseClass,MySqlIngestionClass,PostgresIngestionClass,RedshiftWithDBTIngestionClass}.ts— helper and selector fixes described above.Manual testing performed
The Playwright changes target the nightly AUT environment (Redshift / Superset / BigQuery credentials), which I do not have locally, so the E2E suite has not been executed on this branch — it needs a nightly run to confirm. What was verified locally:
yarn test …— 28 suites / 322 tests green, and the loader test verified RED without thefinally.npx tsc --noEmit— no new errors on the changed files (the one pre-existing AJV validator variance error inIngestionWorkflowForm.tsxreproduces on a stashed tree).make ui-checkstyle-changed— exit 0, no reformat diff.next-button(playwright/utils/autoClassification.ts,playwright/utils/profilerForm.ts,playwright/e2e/Features/StorageMetadataAgentForm.spec.ts) to confirm each already waits on the form before advancing, so the new disabled state cannot hang them.UI screen recording / screenshots:
No visual change — the only user-visible difference is that the wizard's Next button is briefly disabled instead of dead while the form loads, and a stray RJSF "Submit" button no longer appears next to the footer. Trace evidence for the original failure, from the nightly run:
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (No schema changes.)
For UI changes: I attached a screen recording and/or screenshots above. (Explained above — no visual change.)
I have added tests (unit / integration / Playwright as applicable) and listed them above.
I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.
🤖 Generated with Claude Code
Greptile Summary
This PR improves ingestion-wizard synchronization and separates dashboard count loading from entity-table loading.
Confidence Score: 4/5
The PR is not yet safe to merge because returning to the configure step can still expose an enabled Next button before the remounted form is ready.
The readiness state is only changed from false to true and survives the conditional unmount of the workflow form, so navigating from configure to schedule and back can reuse a stale ready signal; clicking Next during the new Suspense interval follows optional-chained null refs and silently performs no submission. The dashboard loader issue is resolved because the count request no longer owns the shared entity loading or paging state.
Files Needing Attention: openmetadata-ui/src/main/resources/ui/src/components/Settings/Services/AddIngestion/AddIngestion.component.tsx
Important Files Changed
Reviews (3): Last reviewed commit: "fix(ui): stop the data model count fetch..." | Re-trigger Greptile