Skip to content
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

Sync common labels to every repository #24

Closed
jlewi opened this issue Mar 1, 2018 · 23 comments
Closed

Sync common labels to every repository #24

jlewi opened this issue Mar 1, 2018 · 23 comments
Labels
help wanted Extra attention is needed priority/p2

Comments

@jlewi
Copy link
Contributor

jlewi commented Mar 1, 2018

#12 defined common labels.

Now we want to automate the application of all those labels across our repositories.

Kubernetes uses this tool.
https://github.com/kubernetes/test-infra/tree/master/label_sync

@jlewi jlewi added the help wanted Extra attention is needed label Mar 1, 2018
@erikerlandson
Copy link
Contributor

Is the goal to get the full cron automation like kube is running, or just run their bazel manually somewhere?

@jlewi
Copy link
Contributor Author

jlewi commented Mar 2, 2018

A one off run would be a huge step but it would be nice to eventually do it regularly.

@jlewi jlewi changed the title Sync common labels to ever repository Sync common labels to every repository Apr 2, 2018
@kunmingg
Copy link

kunmingg commented Apr 5, 2018

@jlewi
label sync k8s job for kubeflow org is created.
Below is sample action logs from dry run against repo: community.
If looks good I'll schedule cron job to sync all repos.

time="2018-04-05T19:26:01Z" level=info msg="Reading repos" org=kubeflow
time="2018-04-05T19:26:01Z" level=info msg="GetRepos(kubeflow, false)" client=github
time="2018-04-05T19:26:02Z" level=info msg="Found 1 repos" org=kubeflow
time="2018-04-05T19:26:02Z" level=info msg="Listing labels for repo" org=kubeflow repo=community
time="2018-04-05T19:26:02Z" level=info msg="GetRepoLabels(kubeflow, community)" client=github
time="2018-04-05T19:26:02Z" level=info msg="Syncing labels for 1 repos" org=kubeflow
time="2018-04-05T19:26:02Z" level=info msg=rename from="do-not-merge/work-in-progress" repo=community to="status/in progress"
time="2018-04-05T19:26:02Z" level=info msg=rename from=question repo=community to="community/question"
time="2018-04-05T19:26:02Z" level=info msg=rename from=bug repo=community to="problems/bug"
time="2018-04-05T19:26:02Z" level=info msg=rename from=enhancement repo=community to="improvement/enhancement"
time="2018-04-05T19:26:02Z" level=info msg=create label="status/lgtm" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/front-end" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/lifecycle" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/operator" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="community/discussion" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="status/done" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label=do-not-merge repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="improvement/optimization" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="platform/gcp" repo=community
time="2018-04-05T19:26:02Z" level=info msg=recolor color=00daff label=wontfix repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label=high-impact repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="priority/p0" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="platform/other" repo=community
time="2018-04-05T19:26:02Z" level=info msg=recolor color=db03cc label="priority/p1" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="status/approved" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label=testing repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/logging" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="os/centos" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="os/windows" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="platform/aws" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="status/backlog" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/api" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/build-release" repo=community
time="2018-04-05T19:26:02Z" level=info msg=recolor color=00daff label=duplicate repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="os/macos" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="problems/refactor" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/example" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="platform/azure" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label=starter repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="status/icebox" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="addition/feature" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="area/docs" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="os/ubuntu" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="platform/minikube" repo=community
time="2018-04-05T19:26:02Z" level=info msg=recolor color=fc9915 label="priority/p2" repo=community
time="2018-04-05T19:26:02Z" level=info msg=create label="problems/security" repo=community

@jlewi
Copy link
Contributor Author

jlewi commented Apr 5, 2018

lgtm

@kunmingg
Copy link

kunmingg commented Apr 5, 2018

All repos are synced, following config:
https://github.com/kubeflow/testing/blob/master/label_sync/kubeflow_label.yml

@jlewi
Copy link
Contributor Author

jlewi commented Apr 6, 2018

Fantastic.

When we create new repositories do we need to configure them to be sync'd? If so we should document that in

https://github.com/kubeflow/community/blob/master/repository-setup.md

Also is there documentation somewhere about how our label sync is configured? e.g. the bot used where it runs etc...?

i.e. all the information someone would need to debug/fix it?

@kunmingg
Copy link

kunmingg commented Apr 6, 2018

New repos will be automatically synced, like within a day since creation.
Will give another PR including label_sync cron job config.

@kunmingg
Copy link

kunmingg commented Apr 7, 2018

We had an action: "do-not-merge/work-in-progress" -> "status/in progress", which might cause prow merge uncompleted PR.
One false positive merge here: #41 (comment)

Affected repos (might merge PR incomplete):

reporting
examples
community
pytorch-operator
caffe2-operator
experimental-beagle
hp-tuning

Those repos are not affected due to bot user's lack of permission (include our most active repos):

kubeflow
tf-operator
testing
example-seldon
experimental-kvc

@jlewi
Copy link
Contributor Author

jlewi commented Apr 7, 2018

I checked kubeflow/testing - it looks like we haven't given write access to the team ci-bots instead we gave direct access to the user k8s-ci-robot. We will need to change that so those other repos are sync'd as well.

But we should wait until issues with the label sync are fixed?

Can we disable the cron job until the issues with the labels are fixed?

@kunmingg
Copy link

kunmingg commented Apr 8, 2018

Yes, we'll first fix labels, then give access to bot and turn on label_sync job with updated config.

@kunmingg
Copy link

@jlewi kubeflow/testing#104 merged, can we update permission for kubeflow-bot?

@jlewi
Copy link
Contributor Author

jlewi commented Apr 12, 2018

@kunmingg Which repos are currently sync'd using the latest code? When was the sync turned on? It would be good to verify everything looks good on those repos first.

@jlewi
Copy link
Contributor Author

jlewi commented Apr 16, 2018

@kunmingg Ping?

@kunmingg
Copy link

@jlewi all reops except:

--skip=kubeflow/kubeflow,kubeflow/tf-operator,kubeflow/testing,kubeflow/example-seldon,kubeflow/experimental-kvc,kubeflow/website

The sync cron job start since last Thursday.

@jlewi
Copy link
Contributor Author

jlewi commented Apr 19, 2018

So the remaining repos are

  • kubeflow/kubeflow
  • kubeflow/tf-operator
  • kubeflow/testing
  • kubeflow/example-seldon
  • kubeflow/experimental-kvc
  • kubeflow/website

@kunmingg all of the following repos should be writable by the cibots

  • kubeflow/testing
  • kubeflow/example-seldon
  • kubeflow/experimental-kvc
  • kubeflow/website

Lets enable the label sync on those repos so the only remaining repos are

  • kubeflow/kubeflow
  • kubeflow/tf-operator

@kunmingg
Copy link

@jlewi Currently bot doesn't have write access to

kubeflow/testing
kubeflow/example-seldon
kubeflow/experimental-kvc
kubeflow/website

Need to update permission.

@jlewi
Copy link
Contributor Author

jlewi commented Apr 19, 2018

I checked

kubeflow/testing had read access; changed it to write

The ci-bots for the following repos already look like they have write access
kubeflow/example-seldon
kubeflow/experimental-kvc
kubeflow/website

Is the script returning errors?
Can you try rerunning it?

@kunmingg
Copy link

You are right, now bot can edit those 4 repos.
Cronjob now start to include these 4 repos, and will execute every 4 hours.

@jlewi
Copy link
Contributor Author

jlewi commented Apr 23, 2018

@kunmingg Everything looking good? If so lets enable label sync on the remaining repositories.

@kunmingg
Copy link

@jlewi looks good, please go ahead.

@jlewi
Copy link
Contributor Author

jlewi commented Apr 23, 2018

ci-bots should now have write access to kubeflow/kubeflow and kubeflow/tf-operator.

/cc @kunmingg

@kunmingg
Copy link

@jlewi cronjob updated to take care all repos.
I assume ci-bots should automatically have access to any newly created repos?

@jlewi
Copy link
Contributor Author

jlewi commented Apr 27, 2018

@kunmingg yes.

@jlewi jlewi closed this as completed Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority/p2
Projects
None yet
Development

No branches or pull requests

3 participants