{"action":"closed","number":7605,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605","id":64698881,"html_url":"https://github.com/ManageIQ/manageiq/pull/7605","diff_url":"https://github.com/ManageIQ/manageiq/pull/7605.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/7605.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7605","number":7605,"state":"closed","locked":false,"title":"Auto-tagging from kubernetes labels","user":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"body":"## UPDATE: Ready for review, see [here](https://github.com/ManageIQ/manageiq/pull/7605#issuecomment-215462865)\r\n\r\n--------\r\n\r\n### Original description:\r\n\r\n~~This is NOT mergable code.  It's not even from the same planet :-)\r\nMessy, TODOs, no tests, things are most likely not where they belong etc...~~\r\n\r\nEDIT: forgot to clearly link this to https://github.com/ManageIQ/manageiq/issues/7460 discussing the goals.\r\n\r\ncc @simon3z @alongoldboim \r\n\r\nIt does create tags from labels during refresh, only for pods for now:\r\n![screenshot-localhost 3000 2016-03-30 23-41-43](https://cloud.githubusercontent.com/assets/273688/14157383/67471120-f6d3-11e5-9fa4-d2ab6bc9a1c1.png)\r\n\r\nGenerated tags are visible in UI but not in manual \"Edit Tags...\" interface:\r\n![screenshot-localhost 3000 2016-03-30 23-44-46](https://cloud.githubusercontent.com/assets/273688/14157393/74ff9b02-f6d3-11e5-9645-1fce409cd998.png)\r\nI suppose that's what enabling `read_only` does, but haven't verified.\r\nThat's good, because if users could edit auto-assigned tags there would be nasty questions of whether they can be erased on next refresh...\r\n[IMHO the UX of them not appearing at all in \"Edit Tags...\" (\"No company tags are assigned\") a bit confusing — I'd prefer to see all tags listed but some unmodifiable (e.g. greyed out).  The dropdown for assigning tags should of course omit them.]\r\n\r\nThey are selectable in pods advanced search tags dropdown!\r\n\r\nAlas, the search returns nothing (\"No Records Found.\").  Don't yet know why.\r\n![screenshot-localhost 3000 2016-03-31 00-07-12](https://cloud.githubusercontent.com/assets/273688/14157875/cb4f6256-f6d5-11e5-8ce4-ae1aaefda7d4.png)\r\n\r\nEDIT: the initial proof-of-concept maps *all* labels to tags.  That's probably too much noise; I assume a configurable \"policy\" — a whitelist or something similar — will be needed.","created_at":"2016-03-30T21:18:26Z","updated_at":"2016-05-10T03:17:30Z","closed_at":"2016-05-10T03:17:30Z","merged_at":"2016-05-10T03:17:30Z","merge_commit_sha":"d0e25ac1e2529c562a040179fb61e0886fb72c68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/7605/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/a2acda9e28f10e6537fa83ad58e4df2e4db0858b","head":{"label":"cben:auto-tagging","ref":"auto-tagging","sha":"a2acda9e28f10e6537fa83ad58e4df2e4db0858b","user":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"repo":{"id":51248694,"name":"manageiq","full_name":"cben/manageiq","owner":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cben/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/cben/manageiq","forks_url":"https://api.github.com/repos/cben/manageiq/forks","keys_url":"https://api.github.com/repos/cben/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cben/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cben/manageiq/teams","hooks_url":"https://api.github.com/repos/cben/manageiq/hooks","issue_events_url":"https://api.github.com/repos/cben/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/cben/manageiq/events","assignees_url":"https://api.github.com/repos/cben/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/cben/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/cben/manageiq/tags","blobs_url":"https://api.github.com/repos/cben/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cben/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cben/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/cben/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cben/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/cben/manageiq/languages","stargazers_url":"https://api.github.com/repos/cben/manageiq/stargazers","contributors_url":"https://api.github.com/repos/cben/manageiq/contributors","subscribers_url":"https://api.github.com/repos/cben/manageiq/subscribers","subscription_url":"https://api.github.com/repos/cben/manageiq/subscription","commits_url":"https://api.github.com/repos/cben/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/cben/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/cben/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/cben/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/cben/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/cben/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cben/manageiq/merges","archive_url":"https://api.github.com/repos/cben/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cben/manageiq/downloads","issues_url":"https://api.github.com/repos/cben/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/cben/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/cben/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/cben/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cben/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/cben/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/cben/manageiq/deployments","created_at":"2016-02-07T13:36:17Z","updated_at":"2016-02-07T13:36:35Z","pushed_at":"2016-05-09T15:02:18Z","git_url":"git://github.com/cben/manageiq.git","ssh_url":"git@github.com:cben/manageiq.git","clone_url":"https://github.com/cben/manageiq.git","svn_url":"https://github.com/cben/manageiq","homepage":"manageiq.org","size":123740,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"c0582f21fb0c3e0a6339412beb0c0afdbf37908a","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-05-09T05:03:26Z","pushed_at":"2016-05-10T03:17:30Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":162990,"stargazers_count":264,"watchers_count":264,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":277,"mirror_url":null,"open_issues_count":621,"forks":277,"open_issues":621,"watchers":264,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/7605"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7605"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/7605/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/7605/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/a2acda9e28f10e6537fa83ad58e4df2e4db0858b"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"chessbyte","id":82161,"avatar_url":"https://avatars.githubusercontent.com/u/82161?v=3","gravatar_id":"","url":"https://api.github.com/users/chessbyte","html_url":"https://github.com/chessbyte","followers_url":"https://api.github.com/users/chessbyte/followers","following_url":"https://api.github.com/users/chessbyte/following{/other_user}","gists_url":"https://api.github.com/users/chessbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/chessbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chessbyte/subscriptions","organizations_url":"https://api.github.com/users/chessbyte/orgs","repos_url":"https://api.github.com/users/chessbyte/repos","events_url":"https://api.github.com/users/chessbyte/events{/privacy}","received_events_url":"https://api.github.com/users/chessbyte/received_events","type":"User","site_admin":false},"comments":45,"review_comments":39,"commits":15,"additions":310,"deletions":48,"changed_files":12}}