Repository navigation
Fixes #35580: Show AI Automations on every service type and fix drive asset reads and writes - #35582
Conversation
… not only databases
… folder accepts worksheet writes
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
| Count | Rule |
|---|---|
| 45 | react-hooks/exhaustive-deps |
| 1 | openmetadata-imports/review-sequential-api-calls |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Settings/Services/Ingestion/Ingestion.component.tsx:74:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'serviceCategory'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:378:8 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'location.search'. Either exclude it or remove the dependency array. Outer scope values like 'location.search' |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:407:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'serviceCategory'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:433:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:445:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setFilters'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:469:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'getEntityPermissionByFqn'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:488:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:528:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'handlePageChange', 'navigate', and 'setFilters'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:556:40 |
openmetadata-imports/review-sequential-api-calls |
Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:640:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'ingestionPaging'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:755:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:769:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:788:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:829:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:843:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:859:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:875:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:889:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:904:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:926:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handleFilesPagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:951:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handleSpreadsheetsPagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1015:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1058:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'navigate' and 'setFilters'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1080:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'followers', 'serviceDetails', and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1105:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'serviceDetails' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1277:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1390:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1447:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'handleShowDeleted' and 'showDeleted'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1457:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1484:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1491:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'serviceCategory'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1520:8 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1548:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getOtherDetails'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1603:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchDashboardsDataModel', 'fileSearchValue', and 'spreadSheetSearchValue'. Either include them or remove the de |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1668:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchServiceDetails'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1674:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchServicePermission' and 'isOpenMetadataService'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1688:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'currentIngestionPage', 'getAllIngestionWorkflows', 'ingestionPagingCursor?.pageSize', 'isOpenMetadataService', a |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1700:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'collateAgentPagingCursor?.pageSize' and 'fetchCollateAgentsList'. Either include them or remove the dependency a |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1704:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchWorkflowInstanceStates'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1731:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'fetchCollateAgentsList'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1770:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'ingestionPaging'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:1863:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:2046:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'pagingInfo', 'setFilters', and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:2096:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'permissions'. Either include it or remove the dependency array. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:2096:25 |
react-hooks/exhaustive-deps |
React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked. |
| 🟡 | src/pages/ServiceDetailsPage/ServiceDetailsPage.tsx:2101:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'serviceDetails.fullyQualifiedName'. Either exclude it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
Code Review ✅ Approved 2 closed / 2 findings🔴 High risk · Mapping file columns to ViewBasic broadens authorization, so users with basic access could see metadata previously requiring ViewAll. Extends AI Automations to every service type on the classic Agents tab, sends ✅ 2 closed✅ Quality: New serviceType param on /ai/automations has no decision record
✅ Quality: Non-database test asserts 'database' via a module-wide mock
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|
| } else { | ||
| directory.withChildren(null); | ||
| } | ||
| fetchAndSetStatistics(List.of(directory), fields); |
There was a problem hiding this comment.
i take it this method was already defined and we're just using it here right
There was a problem hiding this comment.



Describe your changes:
Fixes #35580
Four fixes that let AI Automations work on every service type and on drive assets. Companion to open-metadata/openmetadata-collate#7528, which extends AI Automations and AutoPilot to 19 asset types; the two PRs can merge in either order.
ServiceDetailsPage.tsx,Ingestion.component.tsx). The page's list call now also sends the service's type: service names are unique only within a type, and the Collate list endpoint rejects a name two types share without it. A server that predatesserviceTypeignores the parameter.SpreadsheetRepository.setFieldslooked the service up without naming its type, so it returned whichever row the database gave first, often the folder.WorksheetRepository.preparethen rejected every worksheet write with 400 "Spreadsheet ... does not belong to service ...". The lookup now namesdriveService, as the bulk path and the directory and file repositories already do.GET /drives/directories/{id}?fields=childrenfailed once any file in the folder was deleted. It now reuses the list path's child fetch, which skips them; the old per-child lookup is removed.FileResourcemapped no view operation tocolumns, so reading them needed ViewAll, while a worksheet's and a table's columns need ViewBasic. File columns arrived with the SFTP connector (SFTP Connector for Drive Service #25304) without the mapping.Type of change:
High-level design:
N/A, small change.
Tests:
Use cases covered
children,numberOfFiles,totalSizereturns the live file only.Unit tests
ServiceDetailsPage.test.tsxand theIngestionfolder, updated for the removed gate and the service type, 176 passed.ui-checkstyle:changed: clean.FileResourceViewOperationsTest(new):columnsmaps to ViewBasic andsampleDatastays ViewSampleData. It failed before the fix withcolumnsunmapped.DirectoryRepositoryandSpreadsheetRepositoryhave no unit test: both changes are in the single-entity read path, which needs the database relationships, so their tests are the two new ITs below, each seen failing before its fix.Backend integration tests
openmetadata-integration-tests/for the changed behavior.SpreadsheetResourceIT(test_spreadsheetInDirectory_resolvesDriveServiceAndAcceptsWorksheetWrites),DirectoryResourceIT(test_getWithChildren_skipsSoftDeletedChild). Both failed before the fix: the spreadsheet reported the folder's id as its service, and the folder GET returned 404 "file instance for ... not found".SpreadsheetResourceITandDirectoryResourceITin full, 443 tests, 0 failures.WorksheetResourceITandFileResourceITin full: 1 failure,test_listWorksheetsBySpreadsheet, which passes alone; it expects its worksheets in the first 100 of all worksheets and fails once the class has created more.Local Java test run: PASSED
d0ac488a521a(baseorigin/main)Ingestion integration tests
Playwright (UI) tests
Not run: the OSS Playwright specs need an OpenMetadata server, and the local stack runs Collate. The changed pages were exercised in the companion Collate PR's Playwright run and in the manual checks below.
Manual testing performed
serviceType, no error. Same check for a database service and a dashboard service that share a name: each loaded its own list.driveServiceand accepted a worksheet PATCH (200). A folder with one live and one soft-deleted file returned 200 with only the live file,numberOfFiles1. All test assets hard-deleted afterwards.UI screen recording:
oss-pr-recording.webm
Recorded against the local Collate stack built with this branch at
aa8811efc23(the later merge of main changes none of the code shown), classic mode, admin: the Agents tab, Collate AI sub-tab, of the PowerBI, Kafka and dbt Cloud services, each listing its AutoPilot agents. The cards show "No status" because the classic page never passes run history to the widget, on main as well.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.