-
Notifications
You must be signed in to change notification settings - Fork 2.3k
mco: add jira-agent solve and review-agent workflows #83591
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
Changes from all commits
d66f5d7
9917c70
d6e7d16
006ceb0
2d871c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,10 @@ base_images: | |
| name: backplane-5.1 | ||
| namespace: edge-infrastructure | ||
| tag: assisted-test-infra | ||
| claude-ai-helpers: | ||
| name: claude-ai-helpers | ||
| namespace: ci | ||
| tag: latest | ||
| dev-scripts: | ||
| name: test | ||
| namespace: ocp-kni | ||
|
|
@@ -855,6 +859,22 @@ tests: | |
| - ref: tls-13 | ||
| - ref: tls-scanner-run | ||
| workflow: ipi-aws | ||
| - as: periodic-jira-agent | ||
| cron: 0 9 * * * | ||
| steps: | ||
| env: | ||
| JIRA_AGENT_MAX_ISSUES: "1" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if I'm reading this (and the job itself) correctly, this is a daily periodic that goes and finds 1 MCO bug that's been labelled with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1 is just what we initially had and is most likely being copied around. You could bump it higher if you want.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we'd have a lot lined up initially, but if I am interpreting this correctly and this is a daily PR opener (and not a webhook to react to labels being added) I think we can be a bit more liberal on the number
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just start with 1, you can also consume this agent on demand via chai. Then this is your job, you can adjust as you need. |
||
| workflow: mco-jira-agent | ||
| - as: periodic-review-agent | ||
| cron: '@yearly' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you help explain the intent behind this job? It's never supposed to be invoked directly right? It's an indirection for
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it's workaround so when you /test address-review-comment on a PR, the agent git push doesn't abort the prow job itself. |
||
| steps: | ||
| workflow: mco-review-agent | ||
| - always_run: false | ||
| as: address-review-comments | ||
| optional: true | ||
| skip_if_only_changed: .* | ||
| steps: | ||
| workflow: mco-review-agent-trigger | ||
| zz_generated_metadata: | ||
| branch: main | ||
| org: openshift | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| periodics: | ||
| - agent: kubernetes | ||
| cluster: build01 | ||
| cron: 0 9 * * * | ||
| decorate: true | ||
| decoration_config: | ||
| sparse_checkout_files: | ||
| - .ci-operator.yaml | ||
| - Dockerfile.rhel7 | ||
| extra_refs: | ||
| - base_ref: main | ||
| org: openshift | ||
| repo: machine-config-operator | ||
| sparse_checkout_files: | ||
| - .ci-operator.yaml | ||
| - Dockerfile.rhel7 | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| pj-rehearse.openshift.io/can-be-rehearsed: "true" | ||
| name: periodic-ci-openshift-machine-config-operator-main-periodic-jira-agent | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --gcs-upload-secret=/secrets/gcs/service-account.json | ||
| - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson | ||
| - --lease-server-credentials-file=/etc/boskos/credentials | ||
| - --report-credentials-file=/etc/report/credentials | ||
| - --secret-dir=/secrets/ci-pull-credentials | ||
| - --target=periodic-jira-agent | ||
| command: | ||
| - ci-operator | ||
| env: | ||
| - name: HTTP_SERVER_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest | ||
| imagePullPolicy: Always | ||
| name: "" | ||
| ports: | ||
| - containerPort: 8080 | ||
| name: http | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| volumeMounts: | ||
| - mountPath: /etc/boskos | ||
| name: boskos | ||
| readOnly: true | ||
| - mountPath: /secrets/ci-pull-credentials | ||
| name: ci-pull-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/manifest-tool | ||
| name: manifest-tool-local-pusher | ||
| readOnly: true | ||
| - mountPath: /etc/pull-secret | ||
| name: pull-secret | ||
| readOnly: true | ||
| - mountPath: /etc/report | ||
| name: result-aggregator | ||
| readOnly: true | ||
| serviceAccountName: ci-operator | ||
| volumes: | ||
| - name: boskos | ||
| secret: | ||
| items: | ||
| - key: credentials | ||
| path: credentials | ||
| secretName: boskos-credentials | ||
| - name: ci-pull-credentials | ||
| secret: | ||
| secretName: ci-pull-credentials | ||
| - name: manifest-tool-local-pusher | ||
| secret: | ||
| secretName: manifest-tool-local-pusher | ||
| - name: pull-secret | ||
| secret: | ||
| secretName: registry-pull-credentials | ||
| - name: result-aggregator | ||
| secret: | ||
| secretName: result-aggregator | ||
| - agent: kubernetes | ||
| cluster: build01 | ||
| cron: '@yearly' | ||
| decorate: true | ||
| decoration_config: | ||
| sparse_checkout_files: | ||
| - .ci-operator.yaml | ||
| - Dockerfile.rhel7 | ||
| extra_refs: | ||
| - base_ref: main | ||
| org: openshift | ||
| repo: machine-config-operator | ||
| sparse_checkout_files: | ||
| - .ci-operator.yaml | ||
| - Dockerfile.rhel7 | ||
| labels: | ||
| ci.openshift.io/generator: prowgen | ||
| pj-rehearse.openshift.io/can-be-rehearsed: "true" | ||
| name: periodic-ci-openshift-machine-config-operator-main-periodic-review-agent | ||
| spec: | ||
| containers: | ||
| - args: | ||
| - --gcs-upload-secret=/secrets/gcs/service-account.json | ||
| - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson | ||
| - --lease-server-credentials-file=/etc/boskos/credentials | ||
| - --report-credentials-file=/etc/report/credentials | ||
| - --secret-dir=/secrets/ci-pull-credentials | ||
| - --target=periodic-review-agent | ||
| command: | ||
| - ci-operator | ||
| env: | ||
| - name: HTTP_SERVER_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest | ||
| imagePullPolicy: Always | ||
| name: "" | ||
| ports: | ||
| - containerPort: 8080 | ||
| name: http | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| volumeMounts: | ||
| - mountPath: /etc/boskos | ||
| name: boskos | ||
| readOnly: true | ||
| - mountPath: /secrets/ci-pull-credentials | ||
| name: ci-pull-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/gcs | ||
| name: gcs-credentials | ||
| readOnly: true | ||
| - mountPath: /secrets/manifest-tool | ||
| name: manifest-tool-local-pusher | ||
| readOnly: true | ||
| - mountPath: /etc/pull-secret | ||
| name: pull-secret | ||
| readOnly: true | ||
| - mountPath: /etc/report | ||
| name: result-aggregator | ||
| readOnly: true | ||
| serviceAccountName: ci-operator | ||
| volumes: | ||
| - name: boskos | ||
| secret: | ||
| items: | ||
| - key: credentials | ||
| path: credentials | ||
| secretName: boskos-credentials | ||
| - name: ci-pull-credentials | ||
| secret: | ||
| secretName: ci-pull-credentials | ||
| - name: manifest-tool-local-pusher | ||
| secret: | ||
| secretName: manifest-tool-local-pusher | ||
| - name: pull-secret | ||
| secret: | ||
| secretName: registry-pull-credentials | ||
| - name: result-aggregator | ||
| secret: | ||
| secretName: result-aggregator |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| approvers: | ||
| - bryan-cox | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this and other owner/metadata files, should the owners be the MCO list? |
||
| - celebdor | ||
| - cheesesashimi | ||
| - csrwng | ||
| - djoshy | ||
| - dkhater-redhat | ||
| - enxebre | ||
| - harshwardhanpatil07 | ||
| - isabella-janssen | ||
| - pablintino | ||
| - proietfb | ||
| - ptalgulk01 | ||
| - sergiordlr | ||
| - umohnani8 | ||
| - yuqi-zhang | ||
| reviewers: | ||
| - bryan-cox | ||
| - celebdor | ||
| - cheesesashimi | ||
| - csrwng | ||
| - djoshy | ||
| - dkhater-redhat | ||
| - enxebre | ||
| - harshwardhanpatil07 | ||
| - isabella-janssen | ||
| - pablintino | ||
| - proietfb | ||
| - ptalgulk01 | ||
| - sergiordlr | ||
| - umohnani8 | ||
| - yuqi-zhang | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "path": "mco/jira-agent/mco-jira-agent-workflow.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bryan-cox", | ||
| "celebdor", | ||
| "cheesesashimi", | ||
| "csrwng", | ||
| "djoshy", | ||
| "dkhater-redhat", | ||
| "enxebre", | ||
| "harshwardhanpatil07", | ||
| "isabella-janssen", | ||
| "pablintino", | ||
| "proietfb", | ||
| "ptalgulk01", | ||
| "sergiordlr", | ||
| "umohnani8", | ||
| "yuqi-zhang" | ||
| ], | ||
| "reviewers": [ | ||
| "bryan-cox", | ||
| "celebdor", | ||
| "cheesesashimi", | ||
| "csrwng", | ||
| "djoshy", | ||
| "dkhater-redhat", | ||
| "enxebre", | ||
| "harshwardhanpatil07", | ||
| "isabella-janssen", | ||
| "pablintino", | ||
| "proietfb", | ||
| "ptalgulk01", | ||
| "sergiordlr", | ||
| "umohnani8", | ||
| "yuqi-zhang" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| workflow: | ||
| as: mco-jira-agent | ||
| steps: | ||
| pre: | ||
| - ref: jira-agent-setup | ||
| - ref: jira-agent-github-app-auth | ||
| - ref: jira-agent-slack-pr-notify | ||
| - ref: jira-agent-claude-helpers | ||
| - ref: jira-agent-jira-helpers | ||
| - ref: jira-agent-git-helpers | ||
| test: | ||
| - ref: jira-agent-process | ||
| post: | ||
| - ref: jira-agent-report | ||
| env: | ||
| JIRA_AGENT_AUTH_MODE: "pat" | ||
| JIRA_AGENT_FORK_ORG: "jira-solve-bot" | ||
| JIRA_AGENT_UPSTREAM_REPO: "openshift/machine-config-operator" | ||
| JIRA_AGENT_JQL: '(project = MCO OR (project = OCPBUGS AND component = "Machine Config Operator")) AND resolution = Unresolved AND status in (New, "To Do") AND labels = issue-for-agent AND labels != agent-processed' | ||
| JIRA_AGENT_TARGET_STATUS: '{"OCPBUGS":"ASSIGNED","MCO":"ASSIGNED"}' | ||
| JIRA_AGENT_TOOL_SETUP_SCRIPT: "GOFLAGS='' go install golang.org/x/tools/gopls@v0.21.0" | ||
| JIRA_AGENT_REVIEW_LANGUAGE: "go" | ||
| JIRA_AGENT_SLACK_EMOJI: ":robot:" | ||
| documentation: |- | ||
| MCO-specific wrapper for the generic Jira Agent workflow. | ||
| Uses PAT auth mode — auto-forks openshift/machine-config-operator into jira-solve-bot | ||
| and creates PRs against the upstream repo. | ||
|
|
||
| Credentials: Uses hypershift-team-claude-prow (shared secret with gh-pat). |
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.
So generally we don't have periodics in
mainbut rather on each release branch. Does this: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 plumbing enables PRs against main, that's only use case atm.