[ 
https://issues.apache.org/jira/browse/NIFI-9007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

naveen kumar saharan updated NIFI-9007:
---------------------------------------
    Affects Version/s: 0.5.0
                       1.14.0

> flow sync from one registry to another registry does not support parameter 
> context
> ----------------------------------------------------------------------------------
>
>                 Key: NIFI-9007
>                 URL: https://issues.apache.org/jira/browse/NIFI-9007
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Registry
>    Affects Versions: 0.2.0, 0.5.0, 1.14.0
>            Reporter: naveen kumar saharan
>            Priority: Major
>
> We have two registry  - non prod and prod registry
> When we deploy into higher environment(PROD) we deploy the flow to prod 
> registry. 
>  
> when we checkin the flow with parameter context, it works (non prod and prod 
> both)
> but when we do it using api, it does not work. Sycn is successful, but the 
> when we bring in the flow from prod registry after sync, it does not happen. 
>  
> ===
> *ApiException* Traceback (most recent call last) 
> *~\Anaconda3\lib\site-packages\nipyapi\utils.py* in rest_exceptions*()* 611 
> *try**:***** *--> 612**yield***** 613 except (nipyapi.nifi.rest.ApiException, 
> *~\Anaconda3\lib\site-packages\nipyapi\versioning.py* in 
> deploy_flow_version*(parent_id, location, bucket_id, flow_id, reg_client_id, 
> version)* 744 *with* nipyapi*.*utils*.*rest_exceptions*(**)**:***** *--> 745* 
> *return nipyapi.nifi.ProcessGroupsApi().create_process_group(*  746 
> id*=*parent_id*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\apis\process_groups_api.py* in 
> create_process_group*(self, id, body, **kwargs)* 963 *else**:***** *--> 
> 964**(*data*)* *=* self*.*create_process_group_with_http_info*(*id*,* body*,* 
> ****kwargs*)***** 965 *return* data**** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\apis\process_groups_api.py* in 
> create_process_group_with_http_info*(self, id, body, **kwargs)* 1037 ** *-> 
> 1038* *return 
> self.api_client.call_api('/process-groups/\{id}/process-groups', 'POST',*  
> 1039 path_params*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\api_client.py* in call_api*(self, 
> resource_path, method, path_params, query_params, header_params, body, 
> post_params, files, response_type, auth_settings, callback, 
> _return_http_data_only, collection_formats, _preload_content, 
> _request_timeout)* 327 *if* callback *is* *None**:***** *--> 328* *return 
> self.__call_api(resource_path, method,*  329 path_params*,* query_params*,* 
> header_params*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\api_client.py* in 
> __call_api*(self, resource_path, method, path_params, query_params, 
> header_params, body, post_params, files, response_type, auth_settings, 
> callback, _return_http_data_only, collection_formats, _preload_content, 
> _request_timeout)* 147 *# perform request and return response******* *--> 
> 148* *response_data = self.request(method, url,*  149 
> query_params*=*query_params*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\api_client.py* in request*(self, 
> method, url, query_params, headers, post_params, body, _preload_content, 
> _request_timeout)* 370 *elif* method *==* *"POST"**:***** *--> 371* *return 
> self.rest_client.POST(url,*  372 query_params*=*query_params*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\rest.py* in POST*(self, url, 
> headers, query_params, post_params, body, _preload_content, 
> _request_timeout)* 272 _request_timeout=None): *--> 273* *return 
> self.request("POST", url,*  274 headers*=*headers*,***** 
> *~\Anaconda3\lib\site-packages\nipyapi\nifi\rest.py* in request*(self, 
> method, url, query_params, headers, body, post_params, _preload_content, 
> _request_timeout)* 234 *if* *not* *200* *<=* r*.*status *<=* *299**:***** 
> *--> 235**raise* ApiException*(*http_resp*=*r*)***** 236 ** *ApiException*: 
> (500) Reason: Internal Server Error HTTP response headers: 
> HTTPHeaderDict(\{'Date': 'Wed, 28 Jul 2021 13:04:17 GMT', 'X-Frame-Options': 
> 'SAMEORIGIN', 'Content-Security-Policy': "frame-ancestors 'self'", 
> 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 
> 'Strict-Transport-Security': 'max-age=31540000', 'Server': 
> 'Jetty(9.4.26.v20200117)', 'X-ProxiedEntitiesAccepted': 'true', 'Vary': 
> 'Accept-Encoding', 'Content-Type': 'text/plain', 'Content-Length': '79'}) 
> HTTP response body: An unexpected error has occurred. Please check the logs 
> for additional details. The above exception was the direct cause of the 
> following exception: *ValueError* Traceback (most recent call last) 
> *<ipython-input-41-eb25abae70f8>* in <module>** *----> 1* *deployed_pg_id = 
> nipyapi.versioning.deploy_flow_version( 
> '5fa8b10a-b3c5-10bf-ffff-fffff5349da8' \*  2 *,**(**10**,* *10**)* \**** 3 
> *,* *'00ee7bba-a61f-4b79-9c17-93c2eff67584'* \**** 4 *,* 
> *'2df7dd0a-361b-426a-83c9-bbd333515483'* \**** 5 *,* 
> *'c8ea0938-0169-1000-0000-000033ab6e0a'* \**** 
> *~\Anaconda3\lib\site-packages\nipyapi\versioning.py* in 
> deploy_flow_version*(parent_id, location, bucket_id, flow_id, reg_client_id, 
> version)* 743 *# Issue deploy statement******* 744 *with* 
> nipyapi*.*utils*.*rest_exceptions*(**)**:***** *--> 745* *return 
> nipyapi.nifi.ProcessGroupsApi().create_process_group(*  746 
> id*=*parent_id*,***** 747 body=nipyapi.nifi.ProcessGroupEntity( 
> *~\Anaconda3\lib\contextlib.py* in __exit__*(self, type, value, traceback)* 
> 129 value *=* type*(**)***** 130 *try**:***** *--> 131* ** 
> self*.*gen*.*throw*(*type*,* value*,* traceback*)***** 132 *except* 
> StopIteration *as* exc*:***** 133 *# Suppress StopIteration *unless* it's the 
> same exception that******* *~\Anaconda3\lib\site-packages\nipyapi\utils.py* 
> in rest_exceptions*()* 613 except (nipyapi.nifi.rest.ApiException, 614 
> nipyapi.registry.rest.ApiException) as e: *--> 615* ** 
> _raise*(*ValueError*(*e*.*body*)**,* e*)***** 616 ** 617 ** 
> *~\Anaconda3\lib\site-packages\future\utils\__init__.py* in raise_from*(exc, 
> cause)* 401 myglobals*[**'__python_future_raise_from_cause'**]* *=* cause**** 
> 402 execstr *=* *"raise __python_future_raise_from_exc from 
> __python_future_raise_from_cause"***** *--> 403* ** exec*(*execstr*,* 
> myglobals*,* mylocals*)***** 404 ** 405 *def* raise_*(*tp*,* 
> value*=**None**,* tb*=**None**)**:***** 
> *~\Anaconda3\lib\site-packages\nipyapi\utils.py* in <module>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to