feat: add Data Fabric roles and directory services#473
Conversation
Review summaryFour inline comments posted. Two additional checklist items from the post-implementation verification checklist in Missing: integration tests
Both Missing:
The new |
256693b to
49ed7eb
Compare
Review summaryTwo new findings this run: 1. 2. |
Review summaryThree new findings this pass (prior four threads are open and unchanged): New inline comments posted:
|
dab1d8b to
d0e4c3e
Compare
Review summaryThree new findings this pass: 1. 2. 3. |
f4223ca to
c80d2a9
Compare
Review summaryOne new finding this run: src/utils/constants/common.ts line 64 — DIRECTORY_PAGINATION.ITEMS_FIELD and TOTAL_COUNT_FIELD only handle lowercase results/totalCount, while extractDirectoryItems() and extractTotalCount() (used by list()) also handle Results/TotalCount. If the live API sends PascalCase fields, getAll() silently returns [] while list() returns the correct data. The presence of both casings in RawDataFabricDirectoryListResponse suggests the actual API response format was not verified before the PR was written. |
Review summaryOne new finding this pass:
|
8fde337 to
fed2aa0
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
fed2aa0 to
91a3837
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
| * Revokes all direct Data Fabric roles from one or more principals. | ||
| * | ||
| * The Data Fabric API removes all role assignments for each supplied external | ||
| * ID. Use this when a principal should no longer have direct Data Fabric |
There was a problem hiding this comment.
question: API allows only to revoke all roles? cant we revoke a particular role?
There was a problem hiding this comment.
@Sarath1018 The UI revokes roles using the POST /datafabric_/api/Directory/Role. You pass the roles you want the end state to be.
revokeRoles is to match the UI behavior /datafabric_/api/Directory/RevokeRole for removing all roles since the above endpoint doesn't allow empty array.
91a3837 to
1072ca7
Compare
| const ciOptionalIntegrationExcludes = process.env.CI === "true" | ||
| && process.env.DATA_FABRIC_ACCESS_INTEGRATION !== "true" | ||
| ? ["tests/integration/shared/data-fabric/access.integration.test.ts"] | ||
| : []; |
There was a problem hiding this comment.
This CI-aware file exclusion is functionally equivalent to describe.skipIf and has the same problem the convention prohibits:
Do not use
describe.skipfor missing config — those require abeforeAllguard or athrow.
When DATA_FABRIC_ACCESS_INTEGRATION is not set in CI, the file is silently excluded from the test run. The beforeAll guard in access.integration.test.ts never fires, so CI passes while the tests are not exercised at all. That is exactly the silent-skip behaviour the convention was written to prevent.
The beforeAll + throw in the test file is already the correct gate. Remove the config-level exclusion and rely solely on it:
| const ciOptionalIntegrationExcludes = process.env.CI === "true" | |
| && process.env.DATA_FABRIC_ACCESS_INTEGRATION !== "true" | |
| ? ["tests/integration/shared/data-fabric/access.integration.test.ts"] | |
| : []; |
Then in vitest.integration.config.ts:
| const ciOptionalIntegrationExcludes = process.env.CI === "true" | |
| && process.env.DATA_FABRIC_ACCESS_INTEGRATION !== "true" | |
| ? ["tests/integration/shared/data-fabric/access.integration.test.ts"] | |
| : []; | |
| exclude: [ | |
| "tests/integration/shared/maestro/**", | |
| ], |
When DATA_FABRIC_ACCESS_INTEGRATION is absent in CI, the beforeAll throw will make the suite fail visibly — which is the intended behaviour so someone notices the test is not being exercised.
Review summaryOne new finding this run:
|
| export * from './choicesets.test'; | ||
| export * from './roles.test'; | ||
| export * from './directory.test'; |
There was a problem hiding this comment.
nit: Can we drop the changes to the test-barrel index.ts files as they dont serve any purpose
| # Enable Data Fabric role and directory access integration tests. | ||
| # Requires DataFabric.Data.Read and DataFabric.Data.Write on the configured token/app. | ||
| DATA_FABRIC_ACCESS_INTEGRATION=false |
There was a problem hiding this comment.
Lets not use this approach to not run integration tests.
Use describe.skip by commenting 403 reason by mentioning the scopes issue.
1072ca7 to
68b7aac
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|



Summary
DataFabricRolesandDataFabricDirectoryservices to the SDK surface.UiPathlegacy accessors and export them from the Data Fabric module.Testing
UiPathservice wiring test updated to verify the new accessors are exposed.