Open knguyen1 opened 1 year ago
Deploy a flow's latest version to a nifi instance that doesn't have the PG (first deploy).
Line 750 of versioning.py:
versioning.py
target_flow = target_flow[0].versioned_flow_snapshot_metadata
assumes that the returned flows are sorted descending with the latest version at index 0. This is not the case.
A better implementation would be (line 738):
target_flow = sorted(flow_versions.versioned_flow_snapshot_metadata_set, key=lambda x: x.versioned_flow_snapshot_metadata.version, reverse=True)
nipyapi.versioning.deploy_flow_version( process_group_id, (0, 0), bucket_id, flow_id, registry_id )
Not urgent
Thanks for this report and suggested patch, I will include it in the next release
Description
Deploy a flow's latest version to a nifi instance that doesn't have the PG (first deploy).
Line 750 of
versioning.py
:target_flow = target_flow[0].versioned_flow_snapshot_metadata
assumes that the returned flows are sorted descending with the latest version at index 0. This is not the case.
A better implementation would be (line 738):
target_flow = sorted(flow_versions.versioned_flow_snapshot_metadata_set, key=lambda x: x.versioned_flow_snapshot_metadata.version, reverse=True)
What I Did
Urgency
Not urgent