[ 
https://issues.apache.org/jira/browse/NIFI-15849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18075236#comment-18075236
 ] 

ASF subversion and git services commented on NIFI-15849:
--------------------------------------------------------

Commit 03053a0e18dae21def162aebf5e888d3129e82eb in nifi's branch 
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=03053a0e18d ]

NIFI-15849 Fixed Bitbucket Data Center sourceCommitId missing on first snapshot 
saved (#11152)

Signed-off-by: David Handermann <[email protected]>

> Bitbucket integration error
> ---------------------------
>
>                 Key: NIFI-15849
>                 URL: https://issues.apache.org/jira/browse/NIFI-15849
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Flow Versioning
>    Affects Versions: 2.8.0
>            Reporter: Evgeny
>            Assignee: Pierre Villard
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Good afternoon!
> While configuring integration with Bitbucket (Data Center), I ran into the 
> problem that when filling in all the necessary fields in versioning and 
> applying the changes, I get the error "{*}Failed to remove flow from Flow 
> Registry due to Could not parse response from Bitbucket API{*}". At the same 
> time, I observe that a commit has appeared in the repository. An AI suggested 
> making the following corrections to the source code: in the 
> BitbucketRepositoryClient.java replace this block of code
> {code:java}
>   final String expectedCommitSha = request.getExpectedCommitSha();
>   if (expectedCommitSha != null && !expectedCommitSha.isBlank()) {
>       multipartBuilder.addPart(FIELD_SOURCE_COMMIT_ID, 
> StandardHttpContentType.TEXT_PLAIN, 
> expectedCommitSha.getBytes(StandardCharsets.UTF_8));
>   }{code}
> with this one
> {code:java}
>   String sourceCommitId = request.getExpectedCommitSha();
>   if (sourceCommitId == null || sourceCommitId.isBlank()) {
>       sourceCommitId = request.getExistingContentSha();
>   }
>   if (sourceCommitId != null && !sourceCommitId.isBlank()) {
>       multipartBuilder.addPart(FIELD_SOURCE_COMMIT_ID, 
> StandardHttpContentType.TEXT_PLAIN, 
> sourceCommitId.getBytes(StandardCharsets.UTF_8));
>   }{code}
> After the module was built and replaced, the error disappeared.
> Please check it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to