rfellows commented on code in PR #11733:
URL: https://github.com/apache/nifi/pull/11733#discussion_r4145578317


##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/controller-service-entity.ts:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Bundle, Permissions } from '../rest-api.types';
+import { ComponentDTO, EmbeddedComponentEntityBase } from './component-entity';
+import { PropertyDescriptorDTO } from './property-descriptor-dto';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ControllerServiceDTO.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface ControllerServiceDTO extends ComponentDTO {
+    name: string;
+    type: string;
+    bundle: Bundle;
+    controllerServiceApis: ControllerServiceApiDTO[];
+    state: string;
+    bulletinLevel: string;
+    persistsState: boolean;
+    restricted: boolean;
+    deprecated: boolean;
+    extensionMissing: boolean;
+    multipleVersionsAvailable: boolean;
+    supportsSensitiveDynamicProperties: boolean;
+    properties: Record<string, string | null>;
+    descriptors: Record<string, PropertyDescriptorDTO>;
+    validationStatus: string;
+    comments?: string;
+    annotationData?: string;
+    customUiUrl?: string;
+    sensitiveDynamicPropertyNames?: string[];
+    referencingComponents?: ControllerServiceReferencingComponentEntity[];
+    validationErrors?: string[];
+}
+
+export interface ControllerServiceApiDTO {
+    type: string;
+    bundle: Bundle;
+}
+
+export interface ControllerServiceReferencingComponentEntity extends 
EmbeddedComponentEntityBase<ControllerServiceReferencingComponentDTO> {
+    operatePermissions: Permissions;
+}
+
+export interface ControllerServiceReferencingComponentDTO {
+    id: string;
+    groupId?: string;
+    name: string;
+    type?: string;
+    state?: string;
+    properties: Record<string, string | null>;
+    descriptors: Record<string, PropertyDescriptorDTO>;

Review Comment:
   These maps are omitted on valid `uiOnly` responses: 
`ApplicationResource.stripNonUiRelevantFields()` explicitly sets both 
`properties` and `descriptors` to null. Please make both fields optional so 
this response contract represents that path.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/port-entity.ts:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Permissions } from '../rest-api.types';
+import { PositionableComponentDTO, PositionableComponentEntityBase } from 
'./component-entity';
+
+export type PortType = 'INPUT_PORT' | 'OUTPUT_PORT';
+export type PortFunction = 'STANDARD' | 'FAILURE';
+
+/**
+ * Shared input/output port response, discriminated by portType.
+ *
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/PortEntity.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface PortEntity extends PositionableComponentEntityBase<PortDTO> {
+    operatePermissions: Permissions;
+    status?: PortStatusDTO;
+    portType: PortType;
+    allowRemoteAccess?: boolean;
+}
+
+export interface PortDTO extends PositionableComponentDTO {
+    state: string;
+    type: PortType;
+    portFunction: PortFunction;
+    concurrentlySchedulableTaskCount: number;
+    name: string;
+    comments?: string;
+    transmitting?: boolean;
+    allowRemoteAccess?: boolean;
+    validationErrors?: string[];
+}
+
+export interface PortStatusDTO {
+    id: string;
+    groupId: string;
+    transmitting: boolean;

Review Comment:
   `transmitting` is nullable for local ports. `AbstractEventAccess` only calls 
`setTransmitting(...)` when the port is a `PublicPort`; ordinary local 
input/output ports leave the boxed `Boolean` null. Please make this field 
optional.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/property-descriptor-dto.ts:
##########
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Bundle } from '../rest-api.types';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/PropertyDescriptorDTO.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface PropertyDescriptorDTO {
+    name: string;
+    displayName: string;
+    description?: string;
+    defaultValue?: string;
+    allowableValues?: AllowableValueEntity[];
+    required: boolean;
+    sensitive: boolean;
+    dynamic: boolean;
+    supportsEl: boolean;
+    expressionLanguageScope?: string;

Review Comment:
   `DtoFactory.createPropertyDescriptorDto()` unconditionally obtains the 
expression-language scope description and assigns it with 
`setExpressionLanguageScope(...)`. Under this response-contract model, this 
field should be required.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/process-group-entity.ts:
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Permissions } from '../rest-api.types';
+import { PositionableComponentDTO, PositionableComponentEntityBase } from 
'./component-entity';
+import { ConnectionDTO, ConnectionStatusSnapshotEntity } from 
'./connection-entity';
+import { ControllerServiceDTO } from './controller-service-entity';
+import { FunnelDTO } from './funnel-entity';
+import { LabelDTO } from './label-entity';
+import { PortDTO, PortStatusSnapshotEntity } from './port-entity';
+import { ProcessingPerformanceStatusDTO } from 
'./processing-performance-status-dto';
+import { ProcessorDTO, ProcessorStatusSnapshotEntity } from 
'./processor-entity';
+import { RegisteredFlowSnapshot } from './registered-flow-snapshot';
+import { RemoteProcessGroupDTO, RemoteProcessGroupStatusSnapshotEntity } from 
'./remote-process-group-entity';
+
+export type ResolvedExecutionEngine = 'STANDARD' | 'STATELESS';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ProcessGroupEntity.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface ProcessGroupEntity extends 
PositionableComponentEntityBase<ProcessGroupDTO> {
+    status?: ProcessGroupStatusDTO;
+    runningCount: number;
+    stoppedCount: number;
+    invalidCount: number;
+    disabledCount: number;
+    activeRemotePortCount: number;
+    inactiveRemotePortCount: number;
+    upToDateCount: number;
+    locallyModifiedCount: number;
+    staleCount: number;
+    locallyModifiedAndStaleCount: number;
+    syncFailureCount: number;
+    localInputPortCount: number;
+    localOutputPortCount: number;
+    publicInputPortCount: number;
+    publicOutputPortCount: number;
+    inputPortCount: number;
+    outputPortCount: number;
+    resolvedExecutionEngine: ResolvedExecutionEngine;
+    versionedFlowState?: string;
+    parameterContext?: ParameterContextReferenceEntity;
+    versionedFlowSnapshot?: RegisteredFlowSnapshot;
+    processGroupUpdateStrategy?: 'CURRENT_GROUP' | 
'CURRENT_GROUP_WITH_CHILDREN';

Review Comment:
   `ProcessGroupResource` parses this value using 
`ProcessGroupRecursivity.valueOf(...)`, whose valid values are 
`DIRECT_CHILDREN` and `ALL_DESCENDANTS`. The current literals would be rejected 
at runtime. Please change this union to `'DIRECT_CHILDREN' | 'ALL_DESCENDANTS'`.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/remote-process-group-entity.ts:
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Permissions } from '../rest-api.types';
+import { PositionableComponentDTO, PositionableComponentEntityBase } from 
'./component-entity';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/RemoteProcessGroupEntity.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface RemoteProcessGroupEntity extends 
PositionableComponentEntityBase<RemoteProcessGroupDTO> {
+    operatePermissions: Permissions;
+    status?: RemoteProcessGroupStatusDTO;
+    inputPortCount?: number;

Review Comment:
   These promoted counts should be required. `StandardRemoteProcessGroup` 
initializes its counts to `(0, 0)`, `DtoFactory.createRemoteProcessGroupDto()` 
assigns both values, and `EntityFactory.createRemoteProcessGroupEntity()` 
promotes both onto every entity created from that DTO. Please remove the 
optional markers from `inputPortCount` and `outputPortCount`.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/remote-process-group-entity.ts:
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { Permissions } from '../rest-api.types';
+import { PositionableComponentDTO, PositionableComponentEntityBase } from 
'./component-entity';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/RemoteProcessGroupEntity.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface RemoteProcessGroupEntity extends 
PositionableComponentEntityBase<RemoteProcessGroupDTO> {
+    operatePermissions: Permissions;
+    status?: RemoteProcessGroupStatusDTO;
+    inputPortCount?: number;
+    outputPortCount?: number;
+}
+
+export interface RemoteProcessGroupDTO extends PositionableComponentDTO {
+    targetUris: string;
+    communicationsTimeout: string;
+    yieldDuration: string;
+    transportProtocol: string;
+    transmitting: boolean;
+    activeRemoteInputPortCount: number;
+    inactiveRemoteInputPortCount: number;
+    activeRemoteOutputPortCount: number;
+    inactiveRemoteOutputPortCount: number;
+    flowRefreshed: string;

Review Comment:
   `flowRefreshed` can be absent before the first remote-flow refresh. 
`StandardRemoteProcessGroup.getLastRefreshTime()` explicitly returns null while 
`refreshContentsTimestamp` is null. Please make this field optional.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/rest-api.types.ts:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export interface Revision {
+    version: number;
+    clientId?: string;
+    lastModifier?: string;
+}
+
+export interface RevisionRequest {
+    version?: number;
+    clientId?: string;
+}
+
+export interface CreateRevisionRequest extends RevisionRequest {
+    version: 0;
+}
+
+export interface Position {
+    x: number;
+    y: number;
+}
+
+export interface Permissions {
+    canRead: boolean;
+    canWrite: boolean;
+}
+
+export interface Bundle {
+    artifact: string;
+    group: string;
+    version: string;
+}
+
+export interface BulletinEntity {
+    canRead: boolean;
+    id: number;
+    sourceId: string;

Review Comment:
   System bulletins do not have component identity: 
`BulletinFactory.createBulletin(category, severity, message)` sets no source 
ID, source name, or group ID. Connector bulletins also explicitly use a null 
group ID. `DtoFactory` and `EntityFactory` pass those nullable values through 
unchanged. Please make `sourceId` and `groupId` optional on the envelope, and 
`sourceId`, `groupId`, and `sourceName` optional inside `bulletin`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to