pr-creator does not successfully use GitHub app authentication: "BUG apps auth requested but empty org, please report this to the test-infra repo." #33829
Labels
kind/bug
Categorizes issue or PR as related to a bug.
sig/testing
Categorizes an issue or PR as relevant to SIG Testing.
What happened:
Using the
pr-creator
built from latest I ran (real names swapped out with fake):Note that the error occurred on the search for matching PR, even though in my case the repo is public; it was trying to auth as directed but ran into this.
What you expected to happen:
At least a dry run of a PR being created or updated (should work with
-confirm
of course too).How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
It looks to me like this almost works, and I would be willing to put together a PR if I could figure out how to connect the dots.
As near as I can tell, this bot got the flags/options for app auth for free when the prow github client library it uses got them; however compared to PATs and oauth2 there is an added need to generate an installation token, which requires looking up the installation based on the org; something must wire the org into the tokenGenerator, and in
pr-creator
's code nothing does (the client doesn't store the org or tokenGenerator, and the failing call togc.FindIssues
doesn't either). I think that's why we end up withBUG apps auth requested but empty org
.This issue is somewhat related to:
commenter
is not even equipped with the app flags yet)The text was updated successfully, but these errors were encountered: