Skip to content

Commit

Permalink
Triage party config and docs (quantumlib#3740)
Browse files Browse the repository at this point in the history
Adds the docs and configuration for Triage party.
  • Loading branch information
balopat authored Jun 10, 2021
1 parent 2d7641b commit 1d1f3a8
Show file tree
Hide file tree
Showing 10 changed files with 575 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dev_tools/cirq-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ This doc describes cirq-infra, the GCP project supporting our open source projec
The following things are planned to be running on GCP:

- [X] Cirq bot / Automerge - see [../auto_merge](../auto_merge/README.md)
- [ ] Triage party for triaging
- [X] Triage party for triaging
- [ ] Performance tests and reports

Access is granted to Cirq maintainers only.

## GCP Configuration

### Requirements

The tools below are required to manage our infra:

- Cloud SDK: https://cloud.google.com/sdk/docs/quickstart
- kubectl: `gcloud components install kubectl`
- skaffold: `gcloud components install skaffold`


### GKE Cluster

We have a 3 node GKE cluster called cirq-infra.
Expand Down
32 changes: 32 additions & 0 deletions dev_tools/triage-party/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Cirq Triage Party

See the [triaging process](../../docs/dev/triage.md)

# Configuration

For the dashboard you will have to edit the embedded YAML config in [configmap.yaml](kubernetes/02_deployment/configmap.yaml).
Please refer to the [triage party docs](https://github.com/google/triage-party/blob/master/docs/config.md) for configuration details.

## Secret

Triage party needs a Github token - this is a one time setup (per cluster creation):

```
kubectl create secret generic triage-party-github-token -n triage-party --from-file=token=$HOME/.github-token
```

Where `$HOME/.github-token` is a file containing the token.

# Cloud Build based deployment

On every push to master Triage Party is redeployed as defined by [cloudbuild-deploy.yaml](cloudbuild-deploy.yaml).

# Deploying Triage Party manually

See [the cirq-infra documentation](../cirq-infra/README.md) for the required tools.

```
gcloud container clusters get-credentials cirq-infra --zone us-central1-a
skaffold run --force -f=dev_tools/triage-party/skaffold.yaml
```

19 changes: 19 additions & 0 deletions dev_tools/triage-party/cloudbuild-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
steps:

# get credentials from the GKE cluster
- name: "gcr.io/k8s-skaffold/skaffold"
args:
- gcloud
- container
- clusters
- get-credentials
- cirq-infra
- --zone=us-central1-a

# deploy container image to GKE
- name: "gcr.io/k8s-skaffold/skaffold"
args:
- skaffold
- run
- --force
- -f=dev_tools/triage-party/skaffold.yaml
6 changes: 6 additions & 0 deletions dev_tools/triage-party/kubernetes/01_ns/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: triage-party
labels:
name: triage-party
211 changes: 211 additions & 0 deletions dev_tools/triage-party/kubernetes/02_deployment/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: triage-party-config
namespace: triage-party
data:
# The contents of config/config.yaml
config.yaml: |
settings:
name: quantum
repos:
- https://github.com/quantumlib/cirq
min_similarity: 0.7
member-roles:
# Automatically add members from these roles (exclude default of "member")
# See https://developer.github.com/v4/enum/commentauthorassociation/
- collaborator
- owner
members:
- balopat
- dstrain115
- maffoo
- mpharrigan
- 95-martin-orion
- viathor
- Strilanc
- tanujkhattar
collections:
- id: daily
name: Daily Triage
rules:
- needs-review
- issue-needs-triage
- issue-needs-kind
- issue-needs-classification
- id: cynq
name: Cirq Cynque
rules:
- discuss
- important-not-milestoned
- id: milestone
name: In Milestone
description: >
A Kanban visualization of upcoming releases, showing the flow of issues through each stage.
* only assigned issues should be in the milestone
* Unassigned issues with priority/p1-release should be assigned
* >3 issues assigned to the same person within a stage signifies a bottleneck 🌊
display: kanban
overflow: 3
dedup: true
rules:
- milestone-not-started
- milestone-assignee-updated
- milestone-pr-needs-review
- milestone-pr-needs-work
- milestone-pr-needs-merge
- milestone-recently-closed
- id: quarterly
name: Quarterly scrub
description: >
Quarterly review of items that need our attention.
rules:
- bugs-recv
- features-recv
- design-issues-recv
- id: discovery
name: Signalling work
description: >
It is important to help contributors find work that matches their skills, time commitment and ambition.
Help them find work by marking issues with complexity level and skill levels required.
rules:
- issue-needs-discoverability
rules:
## Daily triage
issue-needs-triage:
name: "Untriaged issues"
resolution: "Add a triage/* label"
type: issue
filters:
- label: "!triage/.*"
- label: "!(kind/roadmap-item)"
- label: "!(kind/health)"
- label: "!(kind/task)"
- label: "!(kind/design-issue)"
issue-needs-kind:
name: "Untyped (unkind) issues"
resolution: "Add a kind/* label"
type: issue
filters:
- label: "!kind/.*"
issue-needs-discoverability:
name: "Issues that are hard to discover"
resolution: Add complexity/* skill/* labels
type: issue
filters:
- label: "kind/.*"
- label: "triage/accepted"
- label: "!(area/google)"
- label: "!(complexity|skill)/.*"
- label: "!(good first issue|help wanted)"
issue-needs-classification:
name: "Issues that require classification"
resolution: Add area/* labels
type: issue
filters:
- label: "!(area)/.*"
- label: "!(kind/roadmap-item)"
needs-review:
name: "PRs that needs review"
type: pull_request
filters:
- title: "!.*(WIP|wip).*"
- tag: "!draft"
- tag: "(new-commits|unreviewed)"
### Cirq Cynque
discuss:
name: "Issues / PRs that need discussion"
filters:
- label: "(triage/discuss|need decision)"
### Milestone Kanban ###
milestone-not-started:
name: "Not started"
type: issue
filters:
- tag: open-milestone
- tag: "!assignee-updated"
- tag: "!(assignee-open-pr|assignee-closed-pr)"
milestone-assignee-updated:
name: "In Progress"
type: issue
filters:
- tag: open-milestone
- tag: "assignee-updated"
- tag: "!(pr-changes-requested|pr-reviewer-comment|pr-unreviewed|pr-new-commits|pr-approved|pr-changes-requested)"
milestone-pr-needs-work:
name: "PR needs work"
type: issue
filters:
- tag: open-milestone
- tag: "(pr-changes-requested|pr-reviewer-comment)"
milestone-pr-needs-review:
name: "PR needs Review"
type: issue
filters:
- tag: open-milestone
- tag: "(pr-unreviewed|pr-new-commits)"
milestone-pr-needs-merge:
name: "PR needs Merge"
type: issue
filters:
- tag: open-milestone
- tag: "(pr-approved|pr-approved-but-pushed)"
milestone-recently-closed:
name: "Finish Line"
type: issue
filters:
- tag: open-milestone
- state: closed
- updated: -30d
### Important Kanban ###
important-not-milestoned:
name: "Not in milestone"
type: issue
filters:
- label: "priority/important-soon|priority/critical-urgent"
- tag: "!open-milestone"
- tag: "!assignee-updated"
- tag: "!(assignee-open-pr|assignee-closed-pr)"
### Quarterly scrub ###
bugs-recv:
name: "Bugs that deserve a follow-up comment"
resolution: "Comment or close the issue"
type: issue
filters:
- tag: recv
- responded: +7d
- label: "kind/bug-report"
features-recv:
name: "Features that deserve a follow-up comment"
resolution: "Comment or close the issue"
type: issue
filters:
- tag: recv
- responded: +7d
- label: "kind/feature-request"
design-issues-recv:
name: "Design issues that are going stale"
resolution: "Comment or close the issue"
type: issue
filters:
- tag: recv
- responded: +7d
- label: "kind/design-issue"
32 changes: 32 additions & 0 deletions dev_tools/triage-party/kubernetes/02_deployment/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: triage-party
namespace: triage-party
spec:
selector:
matchLabels:
app: triage-party
template:
metadata:
labels:
app: triage-party
spec:
containers:
- name: triage-party
image: triageparty/triage-party
imagePullPolicy: Always
args: ["/app/main", "--min-refresh","5m", "--max-refresh", "5m"]
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: triage-party-github-token
key: token
volumeMounts:
- name: config
mountPath: /app/config
volumes:
- name: config
configMap:
name: triage-party-config
14 changes: 14 additions & 0 deletions dev_tools/triage-party/kubernetes/03_svc/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: triage-party
namespace: triage-party
spec:
type: LoadBalancer
loadBalancerIP: 34.70.228.200
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: triage-party
11 changes: 11 additions & 0 deletions dev_tools/triage-party/skaffold.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: skaffold/v2beta5
kind: Config
metadata:
name: cirq-triage-party
deploy:
kubectl:
manifests:
- dev_tools/triage-party/kubernetes/01_ns/namespace.yaml
- dev_tools/triage-party/kubernetes/02_deployment/configmap.yaml
- dev_tools/triage-party/kubernetes/02_deployment/deployment.yaml
- dev_tools/triage-party/kubernetes/03_svc/service.yaml
2 changes: 2 additions & 0 deletions docs/_book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ upper_tabs:
path: /cirq/dev/plotting
- title: "Serialization guidelines"
path: /cirq/dev/serialization
- title: "Triage process"
path: /cirq/dev/triage

#### GOOGLE HARDWARE ####
- heading: "Google hardware"
Expand Down
Loading

0 comments on commit 1d1f3a8

Please sign in to comment.