{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/test-infra/issues/3272","repository_url":"https://api.github.com/repos/kubernetes/test-infra","labels_url":"https://api.github.com/repos/kubernetes/test-infra/issues/3272/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/issues/3272/comments","events_url":"https://api.github.com/repos/kubernetes/test-infra/issues/3272/events","html_url":"https://github.com/kubernetes/test-infra/pull/3272","id":239639302,"number":3272,"title":"Rewrite prow/config.yaml to use YAML references to reduce duplication.","user":{"login":"rmmh","id":211868,"avatar_url":"https://avatars3.githubusercontent.com/u/211868?v=3","gravatar_id":"","url":"https://api.github.com/users/rmmh","html_url":"https://github.com/rmmh","followers_url":"https://api.github.com/users/rmmh/followers","following_url":"https://api.github.com/users/rmmh/following{/other_user}","gists_url":"https://api.github.com/users/rmmh/gists{/gist_id}","starred_url":"https://api.github.com/users/rmmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmmh/subscriptions","organizations_url":"https://api.github.com/users/rmmh/orgs","repos_url":"https://api.github.com/users/rmmh/repos","events_url":"https://api.github.com/users/rmmh/events{/privacy}","received_events_url":"https://api.github.com/users/rmmh/received_events","type":"User","site_admin":false},"labels":[{"id":484580953,"url":"https://api.github.com/repos/kubernetes/test-infra/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":{"login":"fejta","id":940341,"avatar_url":"https://avatars1.githubusercontent.com/u/940341?v=3","gravatar_id":"","url":"https://api.github.com/users/fejta","html_url":"https://github.com/fejta","followers_url":"https://api.github.com/users/fejta/followers","following_url":"https://api.github.com/users/fejta/following{/other_user}","gists_url":"https://api.github.com/users/fejta/gists{/gist_id}","starred_url":"https://api.github.com/users/fejta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fejta/subscriptions","organizations_url":"https://api.github.com/users/fejta/orgs","repos_url":"https://api.github.com/users/fejta/repos","events_url":"https://api.github.com/users/fejta/events{/privacy}","received_events_url":"https://api.github.com/users/fejta/received_events","type":"User","site_admin":false},"assignees":[{"login":"fejta","id":940341,"avatar_url":"https://avatars1.githubusercontent.com/u/940341?v=3","gravatar_id":"","url":"https://api.github.com/users/fejta","html_url":"https://github.com/fejta","followers_url":"https://api.github.com/users/fejta/followers","following_url":"https://api.github.com/users/fejta/following{/other_user}","gists_url":"https://api.github.com/users/fejta/gists{/gist_id}","starred_url":"https://api.github.com/users/fejta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fejta/subscriptions","organizations_url":"https://api.github.com/users/fejta/orgs","repos_url":"https://api.github.com/users/fejta/repos","events_url":"https://api.github.com/users/fejta/events{/privacy}","received_events_url":"https://api.github.com/users/fejta/received_events","type":"User","site_admin":false},{"login":"spxtr","id":7368979,"avatar_url":"https://avatars1.githubusercontent.com/u/7368979?v=3","gravatar_id":"","url":"https://api.github.com/users/spxtr","html_url":"https://github.com/spxtr","followers_url":"https://api.github.com/users/spxtr/followers","following_url":"https://api.github.com/users/spxtr/following{/other_user}","gists_url":"https://api.github.com/users/spxtr/gists{/gist_id}","starred_url":"https://api.github.com/users/spxtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spxtr/subscriptions","organizations_url":"https://api.github.com/users/spxtr/orgs","repos_url":"https://api.github.com/users/spxtr/repos","events_url":"https://api.github.com/users/spxtr/events{/privacy}","received_events_url":"https://api.github.com/users/spxtr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-06-29T23:33:59Z","updated_at":"2017-06-29T23:38:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/3272","html_url":"https://github.com/kubernetes/test-infra/pull/3272","diff_url":"https://github.com/kubernetes/test-infra/pull/3272.diff","patch_url":"https://github.com/kubernetes/test-infra/pull/3272.patch"},"body":"Strawman example of what prow/config.yaml would look like if it used YAML anchors and references. Identical to current state.\r\n\r\nI think this is easier to understand-- one layer of indirection makes the distinctions between jobs easier to see than in a bunch of 30-line job specs.\r\n\r\nAlternative ideas:\r\n1. Do nothing. config.yaml is large and repetitive, but it's not too hard to understand or add an invididual job. Refactoring is slightly annoying, with the risk of subtle copy-paste errors.\r\n2. Use YAML anchors/references as in this PR.\r\n3. Use Kubernetes PodPreset controller to inject these additional field by default (but it doesn't work on GKE?). This is probably more confusing, since the defaults wouldn't live anywhere near it.\r\n4. Add templating to prow itself, so jobs will try to find a job named $prefix-template (with successively shorter prefixes-- `ci-kubernetes-e2e-gce-ingress` will attempt templates off `ci-kubernetes-e2e-gce-template`, then `ci-kubernetes-e2e-template`, then `ci-kubernetes-template` (exists)), and then merge together the options. Shorter config, no strange YAML syntax, probably easy to document and implement.\r\n\r\nMy preferences are 4 > 2 > 1 > 3."},"comment":{"url":"https://api.github.com/repos/kubernetes/test-infra/issues/comments/312136297","html_url":"https://github.com/kubernetes/test-infra/pull/3272#issuecomment-312136297","issue_url":"https://api.github.com/repos/kubernetes/test-infra/issues/3272","id":312136297,"user":{"login":"rmmh","id":211868,"avatar_url":"https://avatars3.githubusercontent.com/u/211868?v=3","gravatar_id":"","url":"https://api.github.com/users/rmmh","html_url":"https://github.com/rmmh","followers_url":"https://api.github.com/users/rmmh/followers","following_url":"https://api.github.com/users/rmmh/following{/other_user}","gists_url":"https://api.github.com/users/rmmh/gists{/gist_id}","starred_url":"https://api.github.com/users/rmmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmmh/subscriptions","organizations_url":"https://api.github.com/users/rmmh/orgs","repos_url":"https://api.github.com/users/rmmh/repos","events_url":"https://api.github.com/users/rmmh/events{/privacy}","received_events_url":"https://api.github.com/users/rmmh/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T23:38:42Z","updated_at":"2017-06-29T23:38:42Z","body":"#3115 goes in the opposite direction-- autogeneration based on a template!"}}
{"actor":{"display_login":"rmmh"}}