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

Collaborators need to be K8s members to trigger tests #122

Closed
jlewi opened this issue Nov 4, 2017 · 6 comments
Closed

Collaborators need to be K8s members to trigger tests #122

jlewi opened this issue Nov 4, 2017 · 6 comments

Comments

@jlewi
Copy link
Contributor

jlewi commented Nov 4, 2017

We are currently using K8s instance of prow to run our testing infrastructure.

One of the results of this is that collaborators on the tensorflow/k8s repo also need to be members of the kubernetes github organization otherwise they won't be able to trigger tests.

There are at least a couple ways we could deal with this

  1. tensorflow/k8s collaborators could become k8s members; here are the guidelines
  2. We could update the k8s bot so you don't need to be a k8s member if you have sufficient access to the repo.

Since we're using K8s test infra we probably need to follow their guidelines. So I'm leaning towards option 1.

@zjj2wry
Copy link
Member

zjj2wry commented Dec 19, 2017

plugin.yaml:

triggers:
- repos:
  - kubernetes
  - kubernetes-incubator
  - kubernetes-security
  - google/cadvisor
  - tensorflow/k8s
  - GoogleCloudPlatform/k8s-multicluster-ingress
  trusted_org: kubernetes
  join_org_url: "https://github.com/kubernetes/community/blob/master/community-membership.md#member"

check user permission code:

func isUserTrusted(ghc githubClient, user, trustedOrg, org string) (bool, error) {
	orgMember, err := ghc.IsMember(trustedOrg, user)
	if err != nil {
		return false, err
	} else if orgMember {
		return true, nil
	}
	if org != trustedOrg {
		orgMember, err = ghc.IsMember(org, user)
		if err != nil {
			return false, err
		}
	}
	return orgMember, nil
}

@jlewi take a look test-infra code. Seems PR's org member can trigger CI. kubernetes is trusted_org for tensorflow/k8s, so kubernetes member also can trigger CI. but we can use tensorflow membership guidelines in join_org_url. And we only open trigger plugin, we can open lgtm,label,size plugin. seems it is helpful.

triggers:
- repos:
  - kubernetes
  - kubernetes-incubator
  - kubernetes-security
  - google/cadvisor
  - tensorflow/k8s
  - GoogleCloudPlatform/k8s-multicluster-ingress
  trusted_org: kubernetes
  join_org_url: "https://github.com/kubernetes/community/blob/master/community-membership.md#member"
- repos:
  - tensorflow/k8s
  trusted_org: kubernetes
  join_org_url: "tensorflow membership ..."

@jlewi
Copy link
Contributor Author

jlewi commented Dec 20, 2017

Thanks.

I think we want to follow Kubernetes practices and membership guidelines not TensorFlow. I don't think requiring Kubeflow contributors to be members of either tensorflow or kubernetes organizations really makes sense; but that's one of the issues we can discuss at the community meeting.

Just so I understand the last comment, you're proposing we add the lgtm,label,size plugins for the tensorflow/k8s repo? What do those plugins do?

@zjj2wry
Copy link
Member

zjj2wry commented Dec 20, 2017

@jlewi we can get some information in plugin-help.

@jimexist
Copy link
Member

Following the Kubernetes org guideline, does contributing in tensorflow/k8s count?

@jlewi
Copy link
Contributor Author

jlewi commented Dec 28, 2017

@jimexist Not sure who decides that.

I wonder if we could add an IsCollaborator method to github client and then allow tests to be triggered by members of the org or collaborators?

@jlewi
Copy link
Contributor Author

jlewi commented Feb 26, 2018

Fixed as a result of us moving to the github org.

@jlewi jlewi closed this as completed Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants