[
https://issues.apache.org/jira/browse/NIFIREG-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349280#comment-16349280
]
ASF GitHub Bot commented on NIFIREG-135:
----------------------------------------
Github user Chaffelson commented on a diff in the pull request:
https://github.com/apache/nifi-registry/pull/98#discussion_r165489168
--- Diff:
nifi-registry-framework/src/main/java/org/apache/nifi/registry/service/RegistryService.java
---
@@ -589,8 +589,15 @@ public VersionedFlowSnapshot createFlowSnapshot(final
VersionedFlowSnapshot flow
// update the modified date on the flow
metadataService.updateFlow(existingFlow);
+ // get the updated flow, we need to use "with counts" here so
we can return this is a part of the response
+ final FlowEntity updatedFlow =
metadataService.getFlowByIdWithSnapshotCounts(snapshotMetadata.getFlowIdentifier());
+ if (updatedFlow == null) {
+ throw new ResourceNotFoundException("Versioned flow does
not exist for identifier " + snapshotMetadata.getFlowIdentifier());
+ }
+ final VersionedFlow updatedVersionedFlow =
DataModelMapper.map(existingBucket, updatedFlow);
+
--- End diff --
Sounds good.
Now if only I had a maven builder to Docker for NiFi-Registry...
> BucketFlowsApi.create_flow_version returns an incorrect version count
> ---------------------------------------------------------------------
>
> Key: NIFIREG-135
> URL: https://issues.apache.org/jira/browse/NIFIREG-135
> Project: NiFi Registry
> Issue Type: Bug
> Affects Versions: 0.1.0
> Reporter: Daniel Chaffelson
> Assignee: Kevin Doran
> Priority: Major
> Fix For: 0.2.0
>
>
> Using the Python version of the Swagger defined client at:
> [https://github.com/Chaffelson/nipyapi/blob/master/nipyapi/registry/apis/bucket_flows_api.py]
> The VersionedFlow sub-object in the VersionedFlowSnapshot returned by the
> create_flow_version call does not correctly increment the version_count
> variable.
> If the Flow is subsequently retrieved using get_flow_version, the
> version_count is correct.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)