Enable AI code review for all our repos, sync the config #907
Labels
No labels
agile
anacondawebui
arm
blockerfe
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
Closed As
Wontfix
Closed As
Worksforme
coreos
criteria
defect
easyfix
enhancement
iot
meeting
meta
onboarding call
proventesters
retrospective
silverblue
sponsor
test cases
test days
wiki
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/tickets#907
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Let's make sure all our code repos can use our AI code review. Let's use the new
AICR_API_KEYsecret instead of the oldGEMINI_API_KEYsecret.However, Adam says it's good to configure AI code review to disable the summary, because otherwise it makes the AI comment too long (I agree), which is annoying in a ticket with repeated AI reviews. Instead of providing a custom config with
include_mr_summary: falsein all our repos (and then having to update all of them again, if we want to change it or some other options in the future), let's see if we can change the default value itself in https://forge.fedoraproject.org/quality/workflows (and if that changed default value then again be overridden in a specific repo, if needed). For that, we want to test it in staging.Steps:
AICR_API_KEYin prod and stginclude_mr_summary: falseby default, and override it totruein a particular repoGEMINI_API_KEYas no longer needed@adamwill will probably be needed to define
AICR_API_KEYin prod and stg, because he seems to be the only with access to that key (what about moving it to team's bitwarden collection?)I'm happy to take this, but anyone feel free to take it yourself, if you want.
I'm not sure I understand what you're talking about with
AICR_API_KEY. The intent is that each repo provides a key as a repo secret. I addedAICR_API_KEYas a generic name when I made the action capable of supporting backends other than Gemini (by letting you pass in a config string), but I don't really intend to ever stop it 'supporting' the old nameGEMINI_API_KEY, it's easy to do.Were you just suggesting we should rename the secret in every repo where we currently use the workflow? I mean, sure, we can do that, but it's not really necessary/urgent.
If you were suggesting we somehow set it org wide, a) I don't think we can - org-wide secrets aren't a thing, AFAICS - and b) I don't think it's a good idea. Right now tokens are cheap and it's fine to just share a single key I got with a fairly generic justification across a bunch of repos. We don't know if that's going to be the case forever. I think the "every repo brings its own key" approach is appropriate.
@adamwill wrote in #907 (comment):
Yes, since I expected to create a PR everywhere, I assumed I might update the key name as well, instead of using the old
GEMINI_API_KEY. I agree it's not really important if you want to keep compatibility long-term. It would be just a little bit clearer for people (when comparing a repo workflow file with https://forge.fedoraproject.org/quality/workflows#ai-review-yml ).@adamwill wrote in #907 (comment):
Yes they are, that's how we currently do it, and you were the one to configure it :-)
https://forge.fedoraproject.org/org/quality/settings/actions/secrets
Sure, when it's no longer appropriate, we can define it per-repo (or override the org global in a particular repo). But currently I think it's fine.
But I can't do any testing on staging, as long as the secret is not present there. That's why I suggested adding it to Bitwarden, or at least configuring it manually yourself (in https://forge.stg.fedoraproject.org/org/quality/settings/actions/secrets ). Otherwise I'll need to figure out how to request another one and have it approved, before I can try
include_mr_summary: falseas a default value.@kparal wrote in #907 (comment):
Ohhh. Welp. I missed that button. This ticket makes more sense, then! Sure, we can rename the org-wide secret.
OK, I renamed the secret to AICR_API_KEY on prod and added it on stg.
D'oh, had to add GEMINI_API_KEY back because the wrapper workflows in the repos refer to it explicitly as GEMINI_API_KEY. We'll have to change all of those before removing it.
Yes, exactly 🙂️ Thanks for adding the new secrets. I'll try to test changing the default config first, and then submit PRs, but if somebody beats me to it, I really won't mind.