You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2024/07/11 14:33:00 UTC
(nifi) branch main updated: NIFI-13485 Use readBlob when reading content in GitHubRepositoryClient
This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new cbdabccd6b NIFI-13485 Use readBlob when reading content in GitHubRepositoryClient
cbdabccd6b is described below
commit cbdabccd6bee5534e593327f273614279bd0e980
Author: Bryan Bende <bb...@apache.org>
AuthorDate: Wed Jul 10 14:05:37 2024 -0400
NIFI-13485 Use readBlob when reading content in GitHubRepositoryClient
- The readBlob method avoids issues with 1 MB limits on alternative getContent requests
This closes #9067
Signed-off-by: David Handermann <ex...@apache.org>
---
.../src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java b/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
index 3b4805d52f..17a4298512 100644
--- a/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
+++ b/nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java
@@ -212,7 +212,7 @@ public class GitHubRepositoryClient {
return execute(() -> {
try {
final GHContent ghContent = repository.getFileContent(resolvedPath, branchRef);
- return ghContent.read();
+ return repository.readBlob(ghContent.getSha());
} catch (final FileNotFoundException fnf) {
throwPathOrBranchNotFound(fnf, resolvedPath, branchRef);
return null;
@@ -238,7 +238,7 @@ public class GitHubRepositoryClient {
return execute(() -> {
try {
final GHContent ghContent = repository.getFileContent(resolvedPath, commitSha);
- return ghContent.read();
+ return repository.readBlob(ghContent.getSha());
} catch (final FileNotFoundException fnf) {
throw new FlowRegistryException("Path [" + resolvedPath + "] or Commit [" + commitSha + "] not found", fnf);
}