{"action":"created","issue":{"url":"https://api.github.com/repos/pantsbuild/pants/issues/3977","repository_url":"https://api.github.com/repos/pantsbuild/pants","labels_url":"https://api.github.com/repos/pantsbuild/pants/issues/3977/labels{/name}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/3977/comments","events_url":"https://api.github.com/repos/pantsbuild/pants/issues/3977/events","html_url":"https://github.com/pantsbuild/pants/issues/3977","id":183325748,"number":3977,"title":"test-changed doesn't appear to respect exclude_target_regexp","user":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-17T05:00:21Z","updated_at":"2016-10-17T05:06:04Z","closed_at":null,"body":"I am testing 1.2.0rc1 in our repo and passing `exclude_target_regexp`  to `test-changed` doesn't appear to be working.\r\n\r\nI was able to hack it working with:\r\n```\r\n--- a/src/python/pants/task/changed_target_task.py\r\n+++ b/src/python/pants/task/changed_target_task.py\r\n@@ -49,7 +49,8 @@ class ChangedTargetTask(NoopExecTask):\r\n   def alternate_target_roots(cls, options, address_mapper, build_graph):\r\n     changed = Changed.Factory.global_instance().create(options)\r\n     change_calculator = changed.change_calculator(build_graph=build_graph,\r\n-                                                  address_mapper=address_mapper)\r\n+                                                  address_mapper=address_mapper,\r\n+                                                  exclude_target_regexp=options.exclude_target_regexp)\r\n     changed_addresses = change_calculator.changed_target_addresses()\r\n     readable = ''.join(sorted('\\n\\t* {}'.format(addr.reference()) for addr in changed_addresses))\r\n     logger.info('Operating on changed {} target(s): {}'.format(len(changed_addresses), readable))\r\n```\r\n\r\nThe rest of the options look to be gathered from the ChangedRequest.from_options(chained_options), it is possible the \"correct\" thing is to change the excludes to be also attached the ChangedRequest.\r\n\r\n\r\nHere is a repro from Pants 1.2.0rc1 checkout:\r\n```\r\nmateo:pants mateo$ git st\r\nHEAD detached at release_1.2.0rc1\r\n\tmodified:   src/python/pants/core_tasks/what_changed.py\r\n```\r\n\r\n**Before the above patch**:\r\n```\r\nmateo:pants mateo$ ./pants test-changed\r\n04:55:20 00:00     [parse]INFO] Operating on changed 1 target(s):\r\n\t* src/python/pants/core_tasks\r\n\r\nmateo:pants mateo$ ./pants test-changed --test-changed-exclude-target-regexp=\"['src']\"\r\n04:55:35 00:00     [parse]INFO] Operating on changed 1 target(s):\r\n\t* src/python/pants/core_tasks\r\n```\r\n**After the above patch was applied**:\r\n```\r\nmateo:pants mateo$ ./pants test-changed\r\n04:57:47 00:00     [parse]INFO] Operating on changed 1 target(s):\r\n\t* src/python/pants/core_tasks\r\n\r\nmateo:pants mateo$ ./pants test-changed --test-changed-exclude-target-regexp=\"['src']\"\r\n04:58:46 00:00     [parse]INFO] Operating on changed 0 target(s):\r\n```"},"comment":{"url":"https://api.github.com/repos/pantsbuild/pants/issues/comments/254113458","html_url":"https://github.com/pantsbuild/pants/issues/3977#issuecomment-254113458","issue_url":"https://api.github.com/repos/pantsbuild/pants/issues/3977","id":254113458,"user":{"login":"mateor","id":1743873,"avatar_url":"https://avatars.githubusercontent.com/u/1743873?v=3","gravatar_id":"","url":"https://api.github.com/users/mateor","html_url":"https://github.com/mateor","followers_url":"https://api.github.com/users/mateor/followers","following_url":"https://api.github.com/users/mateor/following{/other_user}","gists_url":"https://api.github.com/users/mateor/gists{/gist_id}","starred_url":"https://api.github.com/users/mateor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateor/subscriptions","organizations_url":"https://api.github.com/users/mateor/orgs","repos_url":"https://api.github.com/users/mateor/repos","events_url":"https://api.github.com/users/mateor/events{/privacy}","received_events_url":"https://api.github.com/users/mateor/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T05:06:04Z","updated_at":"2016-10-17T05:06:04Z","body":"Unit tests pass with the above. I don't _think_ there is any coverage for the feature."}}
{"actor":{"display_login":"mateor"}}