{"action":"opened","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/2088","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/2088/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/2088/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/2088/events","html_url":"https://github.com/bazelbuild/bazel/issues/2088","id":189302011,"number":2088,"title":"py_binary and build_python_zip fails with data dependency","user":{"login":"pames","id":451294,"avatar_url":"https://avatars.githubusercontent.com/u/451294?v=3","gravatar_id":"","url":"https://api.github.com/users/pames","html_url":"https://github.com/pames","followers_url":"https://api.github.com/users/pames/followers","following_url":"https://api.github.com/users/pames/following{/other_user}","gists_url":"https://api.github.com/users/pames/gists{/gist_id}","starred_url":"https://api.github.com/users/pames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pames/subscriptions","organizations_url":"https://api.github.com/users/pames/orgs","repos_url":"https://api.github.com/users/pames/repos","events_url":"https://api.github.com/users/pames/events{/privacy}","received_events_url":"https://api.github.com/users/pames/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-15T05:16:17Z","updated_at":"2016-11-15T05:16:17Z","closed_at":null,"body":"Roughly, I am trying to do the following on an Ubuntu VM:\r\n\r\n1) have one py_binary(), let's call this \"launcher\", which sets up an environment for some other code to run in (creating temporary directories, staging files, that sort of thing).  in this BUILD rule, I have added the targets in the next two steps to the \"data\" attribute of the py_binary() rule.\r\n\r\n2) have a cc_binary() (nsjail-kafel: https://github.com/google/nsjail) invoked by the above binary with a set of arguments derived from that staging setup.  all that nsjail really does though is call the target I refer to in the next step\r\n\r\n3) this is just a py_binary() that does some processing (sandboxed via the above nsjail/kafel) on data and then the binary in the first step then moves this along in a pipeline\r\n\r\nIf I run this with --build_python_zip, the build fails:\r\n```\r\n$ bazel build --build_python_zip --verbose_failures //foo:launcher\r\nINFO: Found 1 target...\r\nERROR: /home/phil_ames/DRM/foo/BUILD:1:1: null failed: linux-sandbox failed: error executing command\r\n  (cd /home/phil_ames/.cache/bazel/_bazel_phil_ames/974f36f26269382725c918aa24c9a8a3/bazel-sandbox/1811ae29-3b77-44b6-96c9-30710c662e2a-1/execroot/FOO && \\\r\n  exec env - \\\r\n    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/google-cloud-sdk/bin:/snap/bin \\\r\n  /home/phil_ames/.cache/bazel/_bazel_phil_ames/974f36f26269382725c918aa24c9a8a3/execroot/FOO/_bin/linux-sandbox @/home/phil_ames/.cache/bazel/_bazel_phil_ames/974f36f26269382725c918aa24c9a8a3/bazel-sandbox/1811ae29-3b77-44b6-96c9-30710c662e2a-1/linux-sandbox.params -- external/bazel_tools/tools/zip/zipper/zipper cC bazel-out/local-fastbuild/bin/foo/launcher.zip @bazel-out/local-fastbuild/bin/foo/launcher.zip-2.params).\r\nFile bazel-out/local-fastbuild/internal/_middlemen/foo_Sfoo-runfiles does not seem to exist.Target //foo:launcher failed to build\r\nINFO: Elapsed time: 2.141s, Critical Path: 0.53s\r\n```\r\n\r\nRunning without --build_python_zip works, though:\r\n```\r\n$ bazel build --verbose_failures //foo:launcher\r\nINFO: Found 1 target...\r\nTarget //foo:launcher up-to-date:\r\n  bazel-bin/foo/launcher\r\nINFO: Elapsed time: 1.511s, Critical Path: 0.21s\r\n```"}}
{"actor":{"display_login":"pames"}}