Repository navigation
How to grant a non-admin role the ability to create custom SQL tests and test-suite pipelines? #37119
How to grant a non-admin role the ability to create custom SQL tests and test-suite pipelines?Environment
What we wantWe need a role — call it "Data Quality Author" — that lets a group of data
They must not get admin: no user/role/policy management, no service Today Test Library is documented as admin-only, so point 1 already looks What happensWe granted all permissions on Test Suites (and TestCase) to a custom role The same user works fine if we make them an admin. What we suspectThis looks like #29542, which was reported against 1.12.6:
That issue was fixed by #31141 on The workaround reported there — grant Questions
Workaround we use todayAn admin pre-creates and enables the custom SQL definitions in Test Library; Related
|
Replies: 1 comment 1 reply
|
I went through the Why the dropdown is empty #29542 is probably not it. On 1.12.3 the form already sends
So as that user, I'd look at what the request returns in the browser's network tab, and check whether the user or one of their teams has DomainOnlyAccessRole. Listing only needs 1. Permissions What the API checks on 1.12.3:
The table's executable suite is created for you (as the ingestion bot) when the first test case is added, so the normal Add Test flow doesn't need Test Suite permissions at all. The UI only creates the pipeline if it sees So a minimal set would be:
2. Trigger On 1.12.3, 3. Is Test Library admin-only? Not in the 1.12.3 code, whatever the docs page says. The route opens for admins or anyone with view permission on Test Definition (AuthenticatedAppRouter.tsx#L599-L611). Inside, the Add button needs 4. Letting non-admins author custom SQL That follows from 3: give the DQ authors |
I went through the
1.12.3-releasecode for this, and a few of the assumptions don't hold on that version, which changes the answer a bit.Why the dropdown is empty
#29542 is probably not it. On 1.12.3 the form already sends
entityType=COLUMN/TABLE: the enum member is calledColumn, but its value is"COLUMN". Two other things in that request matter (TestCaseFormV1.tsx#L655-L677):GET /api/v1/dataQuality/testDefinitionsis caught and the list is set to[], so a 403 looks exactly like "no test types".EntityUtil.addDomainQueryParam(EntityUtil.java#L1054-L1071). If the user has DomainOnlyAccessRole and no domain assigned, it overwrites theentityTypef…