Skip to content

Commit e4675bb

Browse files
committed
fix(FR-2646): align RoleDetailDrawer queries with updated schema
Resolves FR-2646 — GraphQL schema update broke RoleDetailDrawer. Changes: - data/schema.graphql: sync with backend 26.4.3+ (RoleAssignmentFilter.roleId became UUIDFilter; several new filter fields on unrelated inputs). - RoleDetailDrawer.tsx: wrap roleId in { equals: localRoleId } to conform to UUIDFilter (fixes TS2559 compile error). - RoleAssignmentTab.tsx: same wrap in the refetch path. Not caught by TypeScript because GraphQLFilter is [key: string]: any, but it would fail at runtime against the updated schema. - RoleScopeTab.tsx: alias the inner adminRole(id: $roleId) to scopeRole. The parent RoleDetailDrawerQuery also calls adminRole(id: $id) at the top level; the server validator flags the two as conflicting even though they resolve to the same id. Aliasing eliminates the conflict; two data-access sites updated accordingly. Verification: - bash scripts/verify.sh → === ALL PASS ===
1 parent b941120 commit e4675bb

4 files changed

Lines changed: 96 additions & 39 deletions

File tree

data/schema.graphql

Lines changed: 91 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ type AdminGetSSHKeypairPayload
260260
}
261261

262262
"""
263-
Added in UNRELEASED. Payload for admin bulk revision refresh mutation result.
263+
Added in 26.4.3. Payload for admin bulk revision refresh mutation result.
264264
"""
265265
type AdminRefreshDeploymentRevisionsPayload
266266
@join__type(graph: STRAWBERRY)
@@ -1682,7 +1682,7 @@ type AutoScalingRule implements Node
16821682
lastTriggeredAt: DateTime
16831683

16841684
"""
1685-
Added in UNRELEASED. The Prometheus query preset used for metric-based auto-scaling.
1685+
Added in 26.4.3. The Prometheus query preset used for metric-based auto-scaling.
16861686
"""
16871687
queryPreset: QueryDefinition
16881688
}
@@ -4669,6 +4669,26 @@ input DeploymentFilter
46694669
openToPublic: Boolean = null
46704670
tags: StringFilter = null
46714671
endpointUrl: StringFilter = null
4672+
4673+
"""Added in 26.4.3. Filter by domain name."""
4674+
domainName: StringFilter = null
4675+
4676+
"""Added in 26.4.3. Filter by project ID."""
4677+
projectId: UUIDFilter = null
4678+
4679+
"""Added in 26.4.3. Filter by resource group name."""
4680+
resourceGroup: StringFilter = null
4681+
4682+
"""Added in 26.4.3. Filter by the user who created the deployment."""
4683+
createdUserId: UUIDFilter = null
4684+
4685+
"""Added in 26.4.3. Filter by deployment creation datetime."""
4686+
createdAt: DateTimeFilter = null
4687+
4688+
"""
4689+
Added in 26.4.3. Filter by deployment destruction datetime. Supports IS NULL / IS NOT NULL.
4690+
"""
4691+
destroyedAt: NullableDateTimeFilter = null
46724692
AND: [DeploymentFilter!] = null
46734693
OR: [DeploymentFilter!] = null
46744694
NOT: [DeploymentFilter!] = null
@@ -4693,7 +4713,7 @@ type DeploymentHistory implements Node
46934713
createdAt: DateTime!
46944714
updatedAt: DateTime!
46954715

4696-
"""Added in UNRELEASED. The deployment this history record belongs to."""
4716+
"""Added in 26.4.3. The deployment this history record belongs to."""
46974717
deployment: ModelDeployment
46984718
}
46994719

@@ -4768,7 +4788,11 @@ enum DeploymentOrderField
47684788
{
47694789
NAME @join__enumValue(graph: STRAWBERRY)
47704790
CREATED_AT @join__enumValue(graph: STRAWBERRY)
4771-
UPDATED_AT @join__enumValue(graph: STRAWBERRY)
4791+
DESTROYED_AT @join__enumValue(graph: STRAWBERRY)
4792+
DOMAIN @join__enumValue(graph: STRAWBERRY)
4793+
PROJECT @join__enumValue(graph: STRAWBERRY)
4794+
RESOURCE_GROUP @join__enumValue(graph: STRAWBERRY)
4795+
TAG @join__enumValue(graph: STRAWBERRY)
47724796
}
47734797

47744798
"""Added in 25.19.0. Deployment policy configuration."""
@@ -4844,7 +4868,7 @@ type DeploymentRevisionPreset implements Node
48444868
"""Timestamp of the last modification to this deployment preset."""
48454869
updatedAt: DateTime
48464870

4847-
"""Added in UNRELEASED. The runtime variant this preset is designed for."""
4871+
"""Added in 26.4.3. The runtime variant this preset is designed for."""
48484872
runtimeVariant: RuntimeVariant
48494873

48504874
"""Added in 26.4.2. Resource slot allocations for this preset."""
@@ -6144,7 +6168,7 @@ type EntityRef implements Node
61446168
entity: EntityNode
61456169

61466170
"""
6147-
Added in UNRELEASED. The resolved scope object in which the entity is registered.
6171+
Added in 26.4.3. The resolved scope object in which the entity is registered.
61486172
"""
61496173
scope: EntityNode
61506174
}
@@ -7346,7 +7370,7 @@ type KernelV2 implements Node
73467370
"""Added in 26.2.0. The agent running this kernel."""
73477371
agent: AgentV2
73487372

7349-
"""Added in UNRELEASED. The image used by this kernel."""
7373+
"""Added in 26.4.3. The image used by this kernel."""
73507374
image: ImageV2
73517375

73527376
"""Added in 26.2.0. The user who owns this kernel."""
@@ -7674,7 +7698,7 @@ type KeyPairGQL implements Node
76747698
"""UUID of the user who owns this keypair."""
76757699
userId: UUID!
76767700

7677-
"""Added in UNRELEASED. The user who owns this keypair."""
7701+
"""Added in 26.4.3. The user who owns this keypair."""
76787702
user: UserV2
76797703
}
76807704

@@ -8168,10 +8192,10 @@ type LoginHistoryV2 implements Node
81688192
"""Timestamp when the login attempt occurred."""
81698193
createdAt: DateTime!
81708194

8171-
"""Added in UNRELEASED. The user who attempted to log in."""
8195+
"""Added in 26.4.3. The user who attempted to log in."""
81728196
user: UserV2
81738197

8174-
"""Added in UNRELEASED. The domain at the time of the login attempt."""
8198+
"""Added in 26.4.3. The domain at the time of the login attempt."""
81758199
domain: DomainV2
81768200
}
81778201

@@ -8282,7 +8306,7 @@ type LoginSessionV2 implements Node
82828306
"""Timestamp when the session was invalidated."""
82838307
invalidatedAt: DateTime
82848308

8285-
"""Added in UNRELEASED. The user who owns this login session."""
8309+
"""Added in 26.4.3. The user who owns this login session."""
82868310
user: UserV2
82878311
}
82888312

@@ -8506,13 +8530,13 @@ type ModelCardV2 implements Node
85068530
"""
85078531
vfolder: VFolder
85088532

8509-
"""Added in UNRELEASED. The domain this model card belongs to."""
8533+
"""Added in 26.4.3. The domain this model card belongs to."""
85108534
domain: DomainV2
85118535

8512-
"""Added in UNRELEASED. The project this model card belongs to."""
8536+
"""Added in 26.4.3. The project this model card belongs to."""
85138537
project: ProjectV2
85148538

8515-
"""Added in UNRELEASED. The user who created this model card."""
8539+
"""Added in 26.4.3. The user who created this model card."""
85168540
creator: UserV2
85178541

85188542
"""
@@ -8706,17 +8730,17 @@ type ModelDeployment implements Node
87068730
createdUserId: ID!
87078731

87088732
"""
8709-
Added in UNRELEASED. The current active revision of this deployment, resolved via DataLoader.
8733+
Added in 26.4.3. The current active revision of this deployment, resolved via DataLoader.
87108734
"""
87118735
currentRevision: ModelRevision
87128736

87138737
"""
8714-
Added in UNRELEASED. The revision currently being deployed (in progress, not yet active), resolved via DataLoader.
8738+
Added in 26.4.3. The revision currently being deployed (in progress, not yet active), resolved via DataLoader.
87158739
"""
87168740
deployingRevision: ModelRevision
87178741

87188742
"""
8719-
Added in UNRELEASED. The user who created this deployment, resolved via DataLoader.
8743+
Added in 26.4.3. The user who created this deployment, resolved via DataLoader.
87208744
"""
87218745
creator: UserV2
87228746

@@ -8769,15 +8793,15 @@ type ModelDeploymentMetadata
87698793
project: GroupNode! @deprecated(reason: "Use project_v2 instead.")
87708794

87718795
"""
8772-
Added in UNRELEASED. The project this deployment belongs to, resolved via DataLoader.
8796+
Added in 26.4.3. The project this deployment belongs to, resolved via DataLoader.
87738797
"""
87748798
projectV2: ProjectV2
87758799

87768800
"""The domain of this entity."""
87778801
domain: DomainNode! @deprecated(reason: "Use domain_v2 instead.")
87788802

87798803
"""
8780-
Added in UNRELEASED. The domain this deployment belongs to, resolved via DataLoader.
8804+
Added in 26.4.3. The domain this deployment belongs to, resolved via DataLoader.
87818805
"""
87828806
domainV2: DomainV2
87838807
projectId: ID!
@@ -9006,7 +9030,7 @@ type ModelReplica implements Node
90069030
session: ComputeSessionNode! @deprecated(reason: "Use session_v2 instead.")
90079031

90089032
"""
9009-
Added in UNRELEASED. The compute session running this replica, resolved via DataLoader.
9033+
Added in 26.4.3. The compute session running this replica, resolved via DataLoader.
90109034
"""
90119035
sessionV2: SessionV2
90129036

@@ -9078,7 +9102,7 @@ type ModelRevision implements Node
90789102
image: ImageNode! @deprecated(reason: "Use image_v2 instead.")
90799103

90809104
"""
9081-
Added in UNRELEASED. The container image used by this revision, resolved via DataLoader.
9105+
Added in 26.4.3. The container image used by this revision, resolved via DataLoader.
90829106
"""
90839107
imageV2: ImageV2
90849108

@@ -9115,6 +9139,21 @@ input ModelRevisionFilter
91159139
{
91169140
revisionNumber: IntFilter = null
91179141
deploymentId: ID = null
9142+
9143+
"""Added in 26.4.3. Filter by container image ID."""
9144+
imageId: UUIDFilter = null
9145+
9146+
"""Added in 26.4.3. Filter by model VFolder ID."""
9147+
modelVfolderId: UUIDFilter = null
9148+
9149+
"""Added in 26.4.3. Filter by resource group name."""
9150+
resourceGroup: StringFilter = null
9151+
9152+
"""Added in 26.4.3. Filter by cluster mode (SINGLE_NODE / MULTI_NODE)."""
9153+
clusterMode: StringFilter = null
9154+
9155+
"""Added in 26.4.3. Filter by revision creation datetime."""
9156+
createdAt: DateTimeFilter = null
91189157
AND: [ModelRevisionFilter!] = null
91199158
OR: [ModelRevisionFilter!] = null
91209159
NOT: [ModelRevisionFilter!] = null
@@ -9134,6 +9173,9 @@ enum ModelRevisionOrderField
91349173
{
91359174
REVISION_NUMBER @join__enumValue(graph: STRAWBERRY)
91369175
CREATED_AT @join__enumValue(graph: STRAWBERRY)
9176+
RESOURCE_GROUP @join__enumValue(graph: STRAWBERRY)
9177+
CLUSTER_MODE @join__enumValue(graph: STRAWBERRY)
9178+
RUNTIME_VARIANT @join__enumValue(graph: STRAWBERRY)
91379179
}
91389180

91399181
"""
@@ -10199,7 +10241,7 @@ type Mutation
1019910241
addModelRevision(input: AddRevisionInput!, options: AddRevisionOptions = null): AddRevisionPayload! @join__field(graph: STRAWBERRY)
1020010242

1020110243
"""
10202-
Added in UNRELEASED. Rebuild and activate a fresh revision for every active deployment (superadmin). Used to repair deployments whose current revision has stale or missing model_definition after backing store migrations.
10244+
Added in 26.4.3. Rebuild and activate a fresh revision for every active deployment (superadmin). Used to repair deployments whose current revision has stale or missing model_definition after backing store migrations.
1020310245
"""
1020410246
adminRefreshDeploymentRevisions: AdminRefreshDeploymentRevisionsPayload! @join__field(graph: STRAWBERRY)
1020510247

@@ -10762,6 +10804,11 @@ type Mutation
1076210804
"""Added in 26.4.2. Permanently purge a virtual folder."""
1076310805
purgeVfolderV2(vfolderId: UUID!): PurgeVFolderV2Payload! @join__field(graph: STRAWBERRY)
1076410806

10807+
"""
10808+
Added in UNRELEASED. Restore a trashed virtual folder. RBAC enforced via scope chain.
10809+
"""
10810+
restoreVFolder(vfolderId: UUID!): RestoreVFolderPayload! @join__field(graph: STRAWBERRY)
10811+
1076510812
"""Added in 26.4.2. Deploy a deployment directly from a model VFolder."""
1076610813
deployVfolderV2(vfolderId: UUID!, input: DeployVFolderV2Input!): DeployVFolderV2Payload! @join__field(graph: STRAWBERRY)
1076710814

@@ -11084,7 +11131,7 @@ input NotificationRuleTypeFilter
1108411131
}
1108511132

1108611133
"""
11087-
Added in UNRELEASED. Filter for nullable datetime fields with IS NULL / IS NOT NULL support.
11134+
Added in 26.4.3. Filter for nullable datetime fields with IS NULL / IS NOT NULL support.
1108811135
"""
1108911136
input NullableDateTimeFilter
1109011137
@join__type(graph: STRAWBERRY)
@@ -13082,7 +13129,7 @@ type Query
1308213129
projectSessionsV2(scope: ProjectSessionV2Scope!, filter: SessionV2Filter = null, orderBy: [SessionV2OrderBy!] = null, before: String = null, after: String = null, first: Int = null, last: Int = null, limit: Int = null, offset: Int = null): SessionV2Connection! @join__field(graph: STRAWBERRY)
1308313130

1308413131
"""
13085-
Added in UNRELEASED. Query a single session by ID. Returns an error if not found.
13132+
Added in 26.4.3. Query a single session by ID. Returns an error if not found.
1308613133
"""
1308713134
sessionV2(id: UUID!): SessionV2 @join__field(graph: STRAWBERRY)
1308813135

@@ -13555,7 +13602,7 @@ type QueryDefinition implements Node
1355513602
"""Last update timestamp."""
1355613603
updatedAt: DateTime!
1355713604

13558-
"""Added in UNRELEASED. Resolved category entity."""
13605+
"""Added in 26.4.3. Resolved category entity."""
1355913606
category: QueryPresetCategory
1356013607
}
1356113608

@@ -14387,7 +14434,7 @@ type ResourcePresetV2 implements Node
1438714434
"""Resource group name. Null means global preset."""
1438814435
resourceGroupName: String
1438914436

14390-
"""Added in UNRELEASED. The resource group this preset belongs to."""
14437+
"""Added in 26.4.3. The resource group this preset belongs to."""
1439114438
resourceGroup: ResourceGroup
1439214439
}
1439314440

@@ -14597,7 +14644,17 @@ type RestoreArtifactsPayload
1459714644
}
1459814645

1459914646
"""
14600-
Added in UNRELEASED. Per-deployment result of an admin bulk revision refresh.
14647+
Added in UNRELEASED. Payload returned after restoring a virtual folder from trash.
14648+
"""
14649+
type RestoreVFolderPayload
14650+
@join__type(graph: STRAWBERRY)
14651+
{
14652+
"""ID of the restored virtual folder"""
14653+
id: UUID!
14654+
}
14655+
14656+
"""
14657+
Added in 26.4.3. Per-deployment result of an admin bulk revision refresh.
1460114658
"""
1460214659
type RevisionRefreshResult
1460314660
@join__type(graph: STRAWBERRY)
@@ -14784,7 +14841,7 @@ type RoleAssignment implements Node
1478414841
"""The assigned user."""
1478514842
user: UserV2
1478614843

14787-
"""Added in UNRELEASED. The user who granted this role assignment."""
14844+
"""Added in 26.4.3. The user who granted this role assignment."""
1478814845
grantedByUser: UserV2
1478914846
}
1479014847

@@ -14815,7 +14872,7 @@ type RoleAssignmentEdge
1481514872
input RoleAssignmentFilter
1481614873
@join__type(graph: STRAWBERRY)
1481714874
{
14818-
roleId: UUID = null
14875+
roleId: UUIDFilter = null
1481914876
role: RoleAssignmentRoleNestedFilter = null
1482014877
permission: PermissionNestedFilter = null
1482114878
username: StringFilter = null
@@ -15013,7 +15070,7 @@ type Route implements Node
1501315070
session: ID @deprecated(reason: "Use session_v2 instead.")
1501415071

1501515072
"""
15016-
Added in UNRELEASED. The compute session associated with this route, resolved via DataLoader.
15073+
Added in 26.4.3. The compute session associated with this route, resolved via DataLoader.
1501715074
"""
1501815075
sessionV2: SessionV2
1501915076

@@ -15089,10 +15146,10 @@ type RouteHistory implements Node
1508915146
createdAt: DateTime!
1509015147
updatedAt: DateTime!
1509115148

15092-
"""Added in UNRELEASED. The route this history record belongs to."""
15149+
"""Added in 26.4.3. The route this history record belongs to."""
1509315150
route: Route
1509415151

15095-
"""Added in UNRELEASED. The deployment this history record belongs to."""
15152+
"""Added in 26.4.3. The deployment this history record belongs to."""
1509615153
deployment: ModelDeployment
1509715154
}
1509815155

@@ -16036,7 +16093,7 @@ type SessionSchedulingHistory implements Node
1603616093
createdAt: DateTime!
1603716094
updatedAt: DateTime!
1603816095

16039-
"""Added in UNRELEASED. The session this history record belongs to."""
16096+
"""Added in 26.4.3. The session this history record belongs to."""
1604016097
session: SessionV2
1604116098
}
1604216099

@@ -16163,7 +16220,7 @@ type SessionV2 implements Node
1616316220
resourceGroup: ResourceGroup
1616416221

1616516222
"""
16166-
Added in UNRELEASED. The images used by this session. Multiple images are possible in multi-kernel (cluster) sessions.
16223+
Added in 26.4.3. The images used by this session. Multiple images are possible in multi-kernel (cluster) sessions.
1616716224
"""
1616816225
images: ImageV2Connection!
1616916226

react/src/components/RoleAssignmentTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const RoleAssignmentTab: React.FC<RoleAssignmentTabProps> = ({
207207
refetch(
208208
{
209209
filter: {
210-
roleId,
210+
roleId: { equals: roleId },
211211
...(overrides?.filter !== undefined
212212
? overrides.filter
213213
: queryParams.filter),

react/src/components/RoleDetailDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const RoleDetailDrawerInner: React.FC<RoleDetailDrawerInnerProps> = ({
121121
`,
122122
{
123123
id: localRoleId,
124-
assignmentFilter: { roleId: localRoleId },
124+
assignmentFilter: { roleId: { equals: localRoleId } },
125125
permissionFilter: { roleId: localRoleId },
126126
scopeFilter: null,
127127
scopeOrderBy: null,

0 commit comments

Comments
 (0)