Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -855,6 +859,22 @@ tests:
- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-aws
- as: periodic-jira-agent

Copy link
Copy Markdown
Contributor

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 main but rather on each release branch. Does this:

  1. work as we would expect
  2. work on older branches if we want to make a fix directly to older branches

Copy link
Copy Markdown
Member Author

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.

cron: 0 9 * * *
steps:
env:
JIRA_AGENT_MAX_ISSUES: "1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 issue-for-agent and makes a fix for it? Is the 1 issue limit intentional given that it's a daily thing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 address-review-comments ? Why is that necessary in this case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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
Expand Down
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
@@ -1,5 +1,89 @@
presubmits:
openshift/machine-config-operator:
- agent: kubernetes
always_run: false
branches:
- ^main$
- ^main-
cluster: build10
context: ci/prow/address-review-comments
decorate: true
decoration_config:
sparse_checkout_files:
- .ci-operator.yaml
- Dockerfile.rhel7
labels:
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-machine-config-operator-main-address-review-comments
optional: true
rerun_command: /test address-review-comments
skip_if_only_changed: .*
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=address-review-comments
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
trigger: (?m)^/test( | .* )address-review-comments,?($|\s.*)
- agent: kubernetes
always_run: false
branches:
Expand Down
32 changes: 32 additions & 0 deletions ci-operator/step-registry/mco/jira-agent/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
approvers:
- bryan-cox

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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).
Loading