{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/84027838","pull_request_review_id":4830556,"id":84027838,"diff_hunk":"@@ -1014,6 +1015,12 @@ func (c *RelabelConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {\n \tif (c.Action == RelabelReplace || c.Action == RelabelHashMod) && c.TargetLabel == \"\" {\n \t\treturn fmt.Errorf(\"relabel configuration for %s action requires 'target_label' value\", c.Action)\n \t}\n+\tif c.Action == RelabelReplace && !relabelTarget.Match([]byte(c.TargetLabel)) {\n+\t\treturn fmt.Errorf(\"%q is invalid 'target_label' for %s action\", c.TargetLabel, c.Action)\n+\t}\n+\tif c.Action == RelabelHashMod && !model.LabelNameRE.Match([]byte(c.TargetLabel)) {","path":"config/config.go","position":33,"original_position":33,"commit_id":"56907ba6e33646d6db9d2b76fbbf229879d8e4b4","original_commit_id":"56907ba6e33646d6db9d2b76fbbf229879d8e4b4","user":{"login":"brancz","id":4546722,"avatar_url":"https://avatars.githubusercontent.com/u/4546722?v=3","gravatar_id":"","url":"https://api.github.com/users/brancz","html_url":"https://github.com/brancz","followers_url":"https://api.github.com/users/brancz/followers","following_url":"https://api.github.com/users/brancz/following{/other_user}","gists_url":"https://api.github.com/users/brancz/gists{/gist_id}","starred_url":"https://api.github.com/users/brancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brancz/subscriptions","organizations_url":"https://api.github.com/users/brancz/orgs","repos_url":"https://api.github.com/users/brancz/repos","events_url":"https://api.github.com/users/brancz/events{/privacy}","received_events_url":"https://api.github.com/users/brancz/received_events","type":"User","site_admin":false},"body":"Hmm.. I think I understand a bit better now, I'm unsure whether it is possible for us to validate at this point when we allow interpolation, as we don't know if for example the interpolation causes the label to start with `[a-zA-Z]`.","created_at":"2016-10-19T09:14:25Z","updated_at":"2016-10-19T09:14:25Z","html_url":"https://github.com/prometheus/prometheus/pull/2094#discussion_r84027838","pull_request_url":"https://api.github.com/repos/prometheus/prometheus/pulls/2094","_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/84027838"},"html":{"href":"https://github.com/prometheus/prometheus/pull/2094#discussion_r84027838"},"pull_request":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/2094"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/2094","id":89904919,"html_url":"https://github.com/prometheus/prometheus/pull/2094","diff_url":"https://github.com/prometheus/prometheus/pull/2094.diff","patch_url":"https://github.com/prometheus/prometheus/pull/2094.patch","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/2094","number":2094,"state":"open","locked":false,"title":"Bug/target label unmarshal","user":{"login":"Nomon","id":345450,"avatar_url":"https://avatars.githubusercontent.com/u/345450?v=3","gravatar_id":"","url":"https://api.github.com/users/Nomon","html_url":"https://github.com/Nomon","followers_url":"https://api.github.com/users/Nomon/followers","following_url":"https://api.github.com/users/Nomon/following{/other_user}","gists_url":"https://api.github.com/users/Nomon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nomon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nomon/subscriptions","organizations_url":"https://api.github.com/users/Nomon/orgs","repos_url":"https://api.github.com/users/Nomon/repos","events_url":"https://api.github.com/users/Nomon/events{/privacy}","received_events_url":"https://api.github.com/users/Nomon/received_events","type":"User","site_admin":false},"body":"Fix an issue that prevented prometheus from starting up when using target_label interpolation in replace action due to it failing LabelName regex validation.\r\n\r\nChanges:\r\n- Change the TargetLabel to string to avoid it being Unmarshaled and validated as a LabelName\r\n- Validate the TargetLabel with a different regex if its a replace action, with old if not.\r\n\r\nRefs:\r\nhttps://github.com/prometheus/prometheus/pull/2078#issuecomment-254539237\r\nhttps://github.com/prometheus/prometheus/pull/2090","created_at":"2016-10-18T21:45:56Z","updated_at":"2016-10-19T09:14:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ae32989bc67e752b3df0d75957e9eaf590ad7f3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/prometheus/pulls/2094/commits","review_comments_url":"https://api.github.com/repos/prometheus/prometheus/pulls/2094/comments","review_comment_url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/2094/comments","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/56907ba6e33646d6db9d2b76fbbf229879d8e4b4","head":{"label":"Nomon:bug/target_label_unmarshal","ref":"bug/target_label_unmarshal","sha":"56907ba6e33646d6db9d2b76fbbf229879d8e4b4","user":{"login":"Nomon","id":345450,"avatar_url":"https://avatars.githubusercontent.com/u/345450?v=3","gravatar_id":"","url":"https://api.github.com/users/Nomon","html_url":"https://github.com/Nomon","followers_url":"https://api.github.com/users/Nomon/followers","following_url":"https://api.github.com/users/Nomon/following{/other_user}","gists_url":"https://api.github.com/users/Nomon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nomon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nomon/subscriptions","organizations_url":"https://api.github.com/users/Nomon/orgs","repos_url":"https://api.github.com/users/Nomon/repos","events_url":"https://api.github.com/users/Nomon/events{/privacy}","received_events_url":"https://api.github.com/users/Nomon/received_events","type":"User","site_admin":false},"repo":{"id":70612382,"name":"prometheus","full_name":"Nomon/prometheus","owner":{"login":"Nomon","id":345450,"avatar_url":"https://avatars.githubusercontent.com/u/345450?v=3","gravatar_id":"","url":"https://api.github.com/users/Nomon","html_url":"https://github.com/Nomon","followers_url":"https://api.github.com/users/Nomon/followers","following_url":"https://api.github.com/users/Nomon/following{/other_user}","gists_url":"https://api.github.com/users/Nomon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nomon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nomon/subscriptions","organizations_url":"https://api.github.com/users/Nomon/orgs","repos_url":"https://api.github.com/users/Nomon/repos","events_url":"https://api.github.com/users/Nomon/events{/privacy}","received_events_url":"https://api.github.com/users/Nomon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nomon/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/Nomon/prometheus","forks_url":"https://api.github.com/repos/Nomon/prometheus/forks","keys_url":"https://api.github.com/repos/Nomon/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nomon/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nomon/prometheus/teams","hooks_url":"https://api.github.com/repos/Nomon/prometheus/hooks","issue_events_url":"https://api.github.com/repos/Nomon/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/Nomon/prometheus/events","assignees_url":"https://api.github.com/repos/Nomon/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/Nomon/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/Nomon/prometheus/tags","blobs_url":"https://api.github.com/repos/Nomon/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nomon/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nomon/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nomon/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nomon/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/Nomon/prometheus/languages","stargazers_url":"https://api.github.com/repos/Nomon/prometheus/stargazers","contributors_url":"https://api.github.com/repos/Nomon/prometheus/contributors","subscribers_url":"https://api.github.com/repos/Nomon/prometheus/subscribers","subscription_url":"https://api.github.com/repos/Nomon/prometheus/subscription","commits_url":"https://api.github.com/repos/Nomon/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nomon/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nomon/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nomon/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nomon/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/Nomon/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nomon/prometheus/merges","archive_url":"https://api.github.com/repos/Nomon/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nomon/prometheus/downloads","issues_url":"https://api.github.com/repos/Nomon/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/Nomon/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/Nomon/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/Nomon/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nomon/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/Nomon/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/Nomon/prometheus/deployments","created_at":"2016-10-11T16:19:18Z","updated_at":"2016-10-11T16:19:21Z","pushed_at":"2016-10-18T22:19:36Z","git_url":"git://github.com/Nomon/prometheus.git","ssh_url":"git@github.com:Nomon/prometheus.git","clone_url":"https://github.com/Nomon/prometheus.git","svn_url":"https://github.com/Nomon/prometheus","homepage":"https://prometheus.io/","size":15674,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"prometheus:master","ref":"master","sha":"d93f73874f71288f26142f5264eae4585f14642b","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":6838921,"name":"prometheus","full_name":"prometheus/prometheus","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/prometheus","description":"The Prometheus monitoring system and time series database.","fork":false,"url":"https://api.github.com/repos/prometheus/prometheus","forks_url":"https://api.github.com/repos/prometheus/prometheus/forks","keys_url":"https://api.github.com/repos/prometheus/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/prometheus/teams","hooks_url":"https://api.github.com/repos/prometheus/prometheus/hooks","issue_events_url":"https://api.github.com/repos/prometheus/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/prometheus/events","assignees_url":"https://api.github.com/repos/prometheus/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/prometheus/tags","blobs_url":"https://api.github.com/repos/prometheus/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/prometheus/languages","stargazers_url":"https://api.github.com/repos/prometheus/prometheus/stargazers","contributors_url":"https://api.github.com/repos/prometheus/prometheus/contributors","subscribers_url":"https://api.github.com/repos/prometheus/prometheus/subscribers","subscription_url":"https://api.github.com/repos/prometheus/prometheus/subscription","commits_url":"https://api.github.com/repos/prometheus/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/prometheus/merges","archive_url":"https://api.github.com/repos/prometheus/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/prometheus/downloads","issues_url":"https://api.github.com/repos/prometheus/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/prometheus/deployments","created_at":"2012-11-24T11:14:12Z","updated_at":"2016-10-19T03:54:05Z","pushed_at":"2016-10-19T09:07:17Z","git_url":"git://github.com/prometheus/prometheus.git","ssh_url":"git@github.com:prometheus/prometheus.git","clone_url":"https://github.com/prometheus/prometheus.git","svn_url":"https://github.com/prometheus/prometheus","homepage":"https://prometheus.io/","size":20596,"stargazers_count":6456,"watchers_count":6456,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":600,"mirror_url":null,"open_issues_count":197,"forks":600,"open_issues":197,"watchers":6456,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/2094"},"html":{"href":"https://github.com/prometheus/prometheus/pull/2094"},"issue":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/2094"},"comments":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/2094/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/2094/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/2094/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/prometheus/statuses/56907ba6e33646d6db9d2b76fbbf229879d8e4b4"}}}}
{"actor":{"display_login":"brancz"}}