-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prow pubsub: supports presubmit jobs #22777
Conversation
/hold |
20cb3e3
to
e151d8e
Compare
dbfa072
to
8fba9dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some unit tests too.
8fba9dd
to
a1ce8f6
Compare
logrus.WithError(err).Fatal("Error starting secrets agent.") | ||
} | ||
tokenGenerator = secretAgent.GetTokenGenerator(flagOptions.pushSecretFile) | ||
gitClient, err := flagOptions.github.GitClient(secretAgent, flagOptions.dryRun) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this couple us to GitHub or does it work with Gerrit as well? We just need a git client so we should probably avoid coupling to GH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This client is for inrepoconfig, which is not supported in gerrit yet. We can change here once inrepoconfig is supported in gerrit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, but I'm more wondering how this behaves without GitHub credentials supplied. In subscriber.go@198 we try to use the git client independent of whether we are using GitHub or Gerrit. It seems strange to use a client for a different code review provider when know it won't work and that also seems like it will result in misleading error messages.
Looks like we never try to use the git client until after we've checked if InRepoConfig is enabled for the repo and flag validation should pass if no GitHub flags are supplied so I think this is ok.
/shrug
/hold cancel
logrus.WithError(err).Fatal("Error starting secrets agent.") | ||
} | ||
tokenGenerator = secretAgent.GetTokenGenerator(flagOptions.pushSecretFile) | ||
gitClient, err := flagOptions.github.GitClient(secretAgent, flagOptions.dryRun) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, but I'm more wondering how this behaves without GitHub credentials supplied. In subscriber.go@198 we try to use the git client independent of whether we are using GitHub or Gerrit. It seems strange to use a client for a different code review provider when know it won't work and that also seems like it will result in misleading error messages.
Looks like we never try to use the git client until after we've checked if InRepoConfig is enabled for the repo and flag validation should pass if no GitHub flags are supplied so I think this is ok.
/shrug
/hold cancel
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chaodaiG, cjwagner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
It has been obsolete since kubernetes#22777.
Part of #22764