Raul Roberto da Silva created NIFI-16588:
--------------------------------------------
Summary: GitHub Flow Registry Client should get the latest commit
of a flow file with one request
Key: NIFI-16588
URL: https://issues.apache.org/jira/browse/NIFI-16588
Project: Apache NiFi
Issue Type: Improvement
Components: Flow Versioning, Extensions
Reporter: Raul Roberto da Silva
{{GitHubRepositoryClient}} does not override {{getLatestCommitSha(path,
branch)}}, so the Git flow registry falls back to listing commits. On GitHub
that means {{getRef}}, a page of commits and one author lookup per commit not
in the commit cache. With more than a thousand versioned process groups the
cache does not hold, and every synchronization of a process group costs about
12 REST requests, which alone can exhaust the 15,000 requests/hour of a GitHub
App installation.
The GitLab client already answers this question with one request. This change
does the same for GitHub: {{GET
/repos/\{owner\}/\{repo\}/commits?path=...&sha=...&per_page=1}}, through
{{queryCommits().path(..).from(..).pageSize(1)}}. A missing path or branch
keeps the existing error.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)