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


##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/registered-flow-snapshot.ts:
##########
@@ -0,0 +1,343 @@
+/*
+ * 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, Position } from '../rest-api.types';
+
+/**
+ * Fully typed graph reachable from ProcessGroupEntity.versionedFlowSnapshot.
+ *
+ * @nifi-source: 
nifi-api/src/main/java/org/apache/nifi/registry/flow/RegisteredFlowSnapshot.java
+ * @nifi-revision: eefa952edddc (2026-09-29)

Review Comment:
   The source cited by this header belongs to the separate `apache/nifi-api` 
repository, but `@nifi-revision: eefa952edddc` is an `apache/nifi` commit. That 
SHA does not exist in `nifi-api`, so it cannot attest the version of the Java 
source used for this model.
   
   The current `apache/nifi-api` source checked here is 
`dc575b83e2c0cddf6ac6d3adc51d3448a70654eb`. Could this annotation be made 
repository-qualified, for example:
   
   ```text
   @nifi-revision: apache/nifi-api@dc575b83e2c0cddf6ac6d3adc51d3448a70654eb
   ```
   
   Otherwise the drift marker appears valid while referring to an unrelated 
repository history.



##########
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;
+    identifiesControllerService?: string;
+    identifiesControllerServiceBundle?: Bundle;
+    dependencies: PropertyDependencyDTO[];
+}
+
+export interface AllowableValueEntity {
+    allowableValue?: AllowableValueDTO;

Review Comment:
   `allowableValue` is currently optional:
   
   ```ts
   export interface AllowableValueEntity {
       allowableValue?: AllowableValueDTO;
       canRead: boolean;
   }
   ```
   
   Unlike `BulletinEntity`, `EntityFactory.createAllowableValueEntity` always 
sets its nested body, including when `canRead` is false:
   
   ```java
   entity.setCanRead(canRead);
   entity.setAllowableValue(dto);
   ```
   
   The descriptor factory also constructs the DTO before creating every entity. 
Please make this field required:
   
   ```ts
   allowableValue: AllowableValueDTO;
   ```
   
   This distinction matters because permission gates are field-specific; 
carrying bulletin-style optionality here weakens a body that NiFi always 
supplies.



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/processor-entity.ts:
##########
@@ -0,0 +1,133 @@
+/*
+ * 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 { PositionableComponentDTO, PositionableComponentEntityBase } from 
'./component-entity';
+import { ProcessingPerformanceStatusDTO } from 
'./processing-performance-status-dto';
+import { PropertyDescriptorDTO, RelationshipDTO } from 
'./property-descriptor-dto';
+
+/**
+ * @nifi-source: 
nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/entity/ProcessorEntity.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface ProcessorEntity extends 
PositionableComponentEntityBase<ProcessorDTO> {
+    operatePermissions: Permissions;
+    status?: ProcessorStatusDTO;
+    inputRequirement: string;
+    physicalState: string;
+}
+
+export interface ProcessorDTO extends PositionableComponentDTO {
+    name: string;
+    type: string;
+    bundle: Bundle;
+    state: string;
+    relationships: RelationshipDTO[];
+    supportsParallelProcessing: boolean;
+    supportsBatching: boolean;
+    supportsSensitiveDynamicProperties: boolean;
+    supportsBacklogReporting: boolean;
+    persistsState: boolean;
+    restricted: boolean;
+    deprecated: boolean;
+    extensionMissing: boolean;
+    executionNodeRestricted: boolean;
+    multipleVersionsAvailable: boolean;
+    inputRequirement: string;
+    physicalState: string;
+    config: ProcessorConfigDTO;
+    validationStatus: string;
+    style?: Record<string, string>;
+    description?: string;
+    validationErrors?: string[];
+}
+
+export interface ProcessorConfigDTO {
+    schedulingPeriod: string;
+    schedulingStrategy: string;
+    executionNode: string;
+    penaltyDuration: string;
+    yieldDuration: string;
+    bulletinLevel: string;
+    runDurationMillis: number;
+    concurrentlySchedulableTaskCount: number;
+    autoTerminatedRelationships: string[];
+    lossTolerant: boolean;
+    retryCount: number;
+    retriedRelationships: string[];
+    backoffMechanism: string;
+    maxBackoffPeriod: string;
+    properties?: Record<string, string | null>;
+    descriptors?: Record<string, PropertyDescriptorDTO>;
+    annotationData?: string;
+    defaultConcurrentTasks?: Record<string, string>;
+    defaultSchedulingPeriod?: Record<string, string>;
+    sensitiveDynamicPropertyNames?: string[];
+    comments?: string;
+    customUiUrl?: string;
+}
+
+export interface ProcessorStatusDTO {
+    groupId: string;
+    id: string;
+    runStatus: string;
+    statsLastRefreshed: string;
+    aggregateSnapshot: ProcessorStatusSnapshotDTO;
+    name?: string;

Review Comment:
   These identity fields are optional even though 
`DtoFactory.createProcessorStatusDto` populates them on every response:
   
   ```java
   dto.setName(procStatus.getName());
   snapshot.setName(procStatus.getName());
   snapshot.setType(procStatus.getType());
   ```
   
   Under this PR's response-only contract, I believe these should be required:
   
   ```ts
   export interface ProcessorStatusDTO {
       name: string;
       // `type` remains optional: the factory does not set it on the outer DTO.
   }
   
   export interface ProcessorStatusSnapshotDTO {
       name: string;
       type: string;
   }
   ```
   
   The same factory pattern appears for connection, port, process-group, and 
remote-process-group status names. Could those status DTOs be tightened 
consistently as part of this Java-vetted model?



##########
nifi-frontend/src/main/frontend/libs/shared/src/types/entities/registered-flow-snapshot.ts:
##########
@@ -0,0 +1,343 @@
+/*
+ * 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, Position } from '../rest-api.types';
+
+/**
+ * Fully typed graph reachable from ProcessGroupEntity.versionedFlowSnapshot.
+ *
+ * @nifi-source: 
nifi-api/src/main/java/org/apache/nifi/registry/flow/RegisteredFlowSnapshot.java
+ * @nifi-revision: eefa952edddc (2026-09-29)
+ * @vetted: 2026-09-29
+ */
+export interface RegisteredFlowSnapshot {
+    snapshotMetadata?: RegisteredFlowSnapshotMetadata;
+    flow?: RegisteredFlow;
+    bucket?: FlowRegistryBucket;
+    flowContents?: VersionedProcessGroup;
+    externalControllerServices?: Record<string, 
ExternalControllerServiceReference>;
+    parameterContexts?: Record<string, VersionedParameterContext>;
+    flowEncodingVersion?: string;
+    parameterProviders?: Record<string, ParameterProviderReference>;
+    latest: boolean;
+}
+
+export interface RegisteredFlowSnapshotMetadata {
+    registryIdentifier?: string;
+    registryName?: string;
+    branch?: string;
+    bucketIdentifier?: string;
+    flowIdentifier?: string;
+    flowName?: string;
+    version?: string;
+    timestamp: number;
+    author?: string;
+    comments?: string;
+}
+
+export interface RegisteredFlow {
+    identifier?: string;
+    name?: string;
+    description?: string;
+    branch?: string;
+    bucketIdentifier?: string;
+    bucketName?: string;
+    createdTimestamp: number;
+    lastModifiedTimestamp: number;
+    permissions?: FlowRegistryPermissions;
+    versionCount: number;
+    versionInfo?: RegisteredFlowVersionInfo;
+}
+
+export interface RegisteredFlowVersionInfo {
+    version: number;
+}
+
+export interface FlowRegistryBucket {
+    identifier?: string;
+    name?: string;
+    description?: string;
+    createdTimestamp: number;
+    permissions?: FlowRegistryPermissions;
+}
+
+export interface FlowRegistryPermissions {
+    canRead: boolean;
+    canWrite: boolean;
+    canDelete: boolean;
+}
+
+export interface ExternalControllerServiceReference {
+    identifier?: string;
+    name?: string;
+}
+
+export interface ParameterProviderReference {
+    identifier?: string;
+    name?: string;
+    type?: string;
+    bundle?: Bundle;
+}
+
+export type VersionedComponentType =
+    | 'PROCESSOR'
+    | 'CONTROLLER_SERVICE'
+    | 'PROCESS_GROUP'
+    | 'REMOTE_PROCESS_GROUP'
+    | 'INPUT_PORT'
+    | 'OUTPUT_PORT'
+    | 'CONNECTION'
+    | 'FUNNEL'
+    | 'LABEL'
+    | 'REPORTING_TASK'
+    | 'FLOW_REGISTRY_CLIENT'
+    | 'PARAMETER_PROVIDER'
+    | 'FLOW_ANALYSIS_RULE'
+    | 'PARAMETER_CONTEXT'
+    | 'CONNECTOR'
+    | 'REMOTE_INPUT_PORT'
+    | 'REMOTE_OUTPUT_PORT';
+
+export interface VersionedComponent {
+    identifier?: string;
+    instanceIdentifier?: string;
+    groupIdentifier?: string;
+    name?: string;
+    comments?: string;
+    position?: Position;
+    componentType: VersionedComponentType;
+}
+
+export interface VersionedConfigurableExtension extends VersionedComponent {
+    type?: string;
+    bundle?: Bundle;
+    properties?: Record<string, string | null>;
+    propertyDescriptors?: Record<string, VersionedPropertyDescriptor>;
+    componentState?: VersionedComponentState;
+}
+
+export interface VersionedProcessGroup extends VersionedComponent {
+    componentType: 'PROCESS_GROUP';
+    processGroups: VersionedProcessGroup[];
+    remoteProcessGroups: VersionedRemoteProcessGroup[];
+    processors: VersionedProcessor[];
+    inputPorts: VersionedPort[];
+    outputPorts: VersionedPort[];
+    connections: VersionedConnection[];
+    labels: VersionedLabel[];
+    funnels: VersionedFunnel[];
+    controllerServices: VersionedControllerService[];
+    versionedFlowCoordinates?: VersionedFlowCoordinates;
+    parameterContextName?: string;
+    flowFileConcurrency?: string;
+    flowFileOutboundPolicy?: string;
+    defaultFlowFileExpiration?: string;
+    defaultBackPressureObjectThreshold?: number;
+    defaultBackPressureDataSizeThreshold?: string;
+    scheduledState?: ScheduledState;
+    executionEngine?: ExecutionEngine;
+    maxConcurrentTasks?: number;
+    statelessFlowTimeout?: string;
+    logFileSuffix?: string;

Review Comment:
   `VersionedProcessGroup` is missing two fields from the cited `nifi-api` 
model:
   
   ```java
   private String statelessFlowFileContentInMemoryMax;
   private Integer statelessFlowFileContentInMemoryHeapPercentage;
   ```
   
   Since this file is intended to model the complete graph reachable from 
`RegisteredFlowSnapshot`, please add both as optional fields:
   
   ```ts
   statelessFlowFileContentInMemoryMax?: string;
   statelessFlowFileContentInMemoryHeapPercentage?: number;
   ```
   
   Both are nullable in Java, so optionality is appropriate. Without them, a 
valid snapshot is silently narrowed and cannot be round-tripped at full 
fidelity.



-- 
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