{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/comments/239555599","pull_request_review_id":182373258,"id":239555599,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTU1NTU5OQ==","diff_hunk":"@@ -115,19 +116,25 @@\n   protected static PTransform<PCollection<PubsubMessage>, WriteFilesResult<List<String>>> writeFile(\n       ValueProvider<String> outputPrefix, OutputFileFormat format, Duration windowDuration,\n       int numShards) {\n-    DynamicPathTemplate pathTemplate = new DynamicPathTemplate(outputPrefix.get());\n+    ValueProvider<DynamicPathTemplate> pathTemplate = NestedValueProvider.of(outputPrefix,\n+        DynamicPathTemplate::new);\n+    ValueProvider<String> staticPrefix = NestedValueProvider.of(pathTemplate,\n+        value -> value.staticPrefix);\n     return PTransform\n-        .compose(input -> input.apply(\"fixedWindows\", Window.into(FixedWindows.of(windowDuration)))\n-            .apply(\"writeFile\", FileIO.<List<String>, PubsubMessage>writeDynamic()\n-                // We can't pass the attribute map to by() directly since MapCoder isn't\n-                // deterministic;\n-                // instead, we extract an ordered list of the needed placeholder values.\n-                // That list is later available to withNaming() to determine output location.\n-                .by(message -> pathTemplate.extractValuesFrom(message.getAttributeMap()))\n-                .withDestinationCoder(ListCoder.of(StringUtf8Coder.of())).withNumShards(numShards)\n-                .via(Contextful.fn(format::encodeSingleMessage), TextIO.sink())\n-                .to(pathTemplate.staticPrefix).withNaming(placeholderValues -> Write.defaultNaming(\n-                    pathTemplate.replaceDynamicPart(placeholderValues), format.suffix()))));\n+        .compose(\n+            input -> input.apply(\"fixedWindows\", Window.into(FixedWindows.of(windowDuration)))\n+                .apply(\"writeFile\", FileIO.<List<String>, PubsubMessage>writeDynamic()\n+                    // We can't pass the attribute map to by() directly since MapCoder isn't\n+                    // deterministic;\n+                    // instead, we extract an ordered list of the needed placeholder values.\n+                    // That list is later available to withNaming() to determine output location.\n+                    .by(message -> pathTemplate.get().extractValuesFrom(message.getAttributeMap()))","path":"ingestion-beam/src/main/java/com/mozilla/telemetry/options/OutputType.java","position":36,"original_position":36,"commit_id":"e2e387064fa20394c3374d1ab1dd2fef1c413e89","original_commit_id":"e2e387064fa20394c3374d1ab1dd2fef1c413e89","user":{"login":"relud","id":433717,"node_id":"MDQ6VXNlcjQzMzcxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/433717?v=4","gravatar_id":"","url":"https://api.github.com/users/relud","html_url":"https://github.com/relud","followers_url":"https://api.github.com/users/relud/followers","following_url":"https://api.github.com/users/relud/following{/other_user}","gists_url":"https://api.github.com/users/relud/gists{/gist_id}","starred_url":"https://api.github.com/users/relud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relud/subscriptions","organizations_url":"https://api.github.com/users/relud/orgs","repos_url":"https://api.github.com/users/relud/repos","events_url":"https://api.github.com/users/relud/events{/privacy}","received_events_url":"https://api.github.com/users/relud/received_events","type":"User","site_admin":false},"body":"is it possible to do this type of thing later to make all our inputs use value providers? because that would be ideal imo.","created_at":"2018-12-06T18:05:46Z","updated_at":"2018-12-06T18:05:47Z","html_url":"https://github.com/mozilla/gcp-ingestion/pull/264#discussion_r239555599","pull_request_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/comments/239555599"},"html":{"href":"https://github.com/mozilla/gcp-ingestion/pull/264#discussion_r239555599"},"pull_request":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264","id":236601435,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NjAxNDM1","html_url":"https://github.com/mozilla/gcp-ingestion/pull/264","diff_url":"https://github.com/mozilla/gcp-ingestion/pull/264.diff","patch_url":"https://github.com/mozilla/gcp-ingestion/pull/264.patch","issue_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/264","number":264,"state":"open","locked":false,"title":"Bug: accessing ValueProvider at runtime in writeFile","user":{"login":"jklukas","id":691060,"node_id":"MDQ6VXNlcjY5MTA2MA==","avatar_url":"https://avatars0.githubusercontent.com/u/691060?v=4","gravatar_id":"","url":"https://api.github.com/users/jklukas","html_url":"https://github.com/jklukas","followers_url":"https://api.github.com/users/jklukas/followers","following_url":"https://api.github.com/users/jklukas/following{/other_user}","gists_url":"https://api.github.com/users/jklukas/gists{/gist_id}","starred_url":"https://api.github.com/users/jklukas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklukas/subscriptions","organizations_url":"https://api.github.com/users/jklukas/orgs","repos_url":"https://api.github.com/users/jklukas/repos","events_url":"https://api.github.com/users/jklukas/events{/privacy}","received_events_url":"https://api.github.com/users/jklukas/received_events","type":"User","site_admin":false},"body":"Closes #258","created_at":"2018-12-06T16:56:40Z","updated_at":"2018-12-06T18:05:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f74d6932496ec7a7222dd67a71b1a7da8df733ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264/commits","review_comments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264/comments","review_comment_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/264/comments","statuses_url":"https://api.github.com/repos/mozilla/gcp-ingestion/statuses/e2e387064fa20394c3374d1ab1dd2fef1c413e89","head":{"label":"mozilla:value-providers","ref":"value-providers","sha":"e2e387064fa20394c3374d1ab1dd2fef1c413e89","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":143201223,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyMDEyMjM=","name":"gcp-ingestion","full_name":"mozilla/gcp-ingestion","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/gcp-ingestion","description":"Documentation and implementation for google cloud ingestion pipeline","fork":false,"url":"https://api.github.com/repos/mozilla/gcp-ingestion","forks_url":"https://api.github.com/repos/mozilla/gcp-ingestion/forks","keys_url":"https://api.github.com/repos/mozilla/gcp-ingestion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/gcp-ingestion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/gcp-ingestion/teams","hooks_url":"https://api.github.com/repos/mozilla/gcp-ingestion/hooks","issue_events_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/gcp-ingestion/events","assignees_url":"https://api.github.com/repos/mozilla/gcp-ingestion/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/gcp-ingestion/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/gcp-ingestion/tags","blobs_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/gcp-ingestion/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/gcp-ingestion/languages","stargazers_url":"https://api.github.com/repos/mozilla/gcp-ingestion/stargazers","contributors_url":"https://api.github.com/repos/mozilla/gcp-ingestion/contributors","subscribers_url":"https://api.github.com/repos/mozilla/gcp-ingestion/subscribers","subscription_url":"https://api.github.com/repos/mozilla/gcp-ingestion/subscription","commits_url":"https://api.github.com/repos/mozilla/gcp-ingestion/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/gcp-ingestion/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/gcp-ingestion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/gcp-ingestion/merges","archive_url":"https://api.github.com/repos/mozilla/gcp-ingestion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/gcp-ingestion/downloads","issues_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/gcp-ingestion/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/gcp-ingestion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/gcp-ingestion/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/gcp-ingestion/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/deployments","created_at":"2018-08-01T19:42:48Z","updated_at":"2018-12-06T16:39:53Z","pushed_at":"2018-12-06T18:03:16Z","git_url":"git://github.com/mozilla/gcp-ingestion.git","ssh_url":"git@github.com:mozilla/gcp-ingestion.git","clone_url":"https://github.com/mozilla/gcp-ingestion.git","svn_url":"https://github.com/mozilla/gcp-ingestion","homepage":null,"size":427,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":2,"open_issues":39,"watchers":2,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"b403a4d16900ff53a2c9db7c49e6710b0dbbce51","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":143201223,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyMDEyMjM=","name":"gcp-ingestion","full_name":"mozilla/gcp-ingestion","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/gcp-ingestion","description":"Documentation and implementation for google cloud ingestion pipeline","fork":false,"url":"https://api.github.com/repos/mozilla/gcp-ingestion","forks_url":"https://api.github.com/repos/mozilla/gcp-ingestion/forks","keys_url":"https://api.github.com/repos/mozilla/gcp-ingestion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/gcp-ingestion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/gcp-ingestion/teams","hooks_url":"https://api.github.com/repos/mozilla/gcp-ingestion/hooks","issue_events_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/gcp-ingestion/events","assignees_url":"https://api.github.com/repos/mozilla/gcp-ingestion/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/gcp-ingestion/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/gcp-ingestion/tags","blobs_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/gcp-ingestion/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/gcp-ingestion/languages","stargazers_url":"https://api.github.com/repos/mozilla/gcp-ingestion/stargazers","contributors_url":"https://api.github.com/repos/mozilla/gcp-ingestion/contributors","subscribers_url":"https://api.github.com/repos/mozilla/gcp-ingestion/subscribers","subscription_url":"https://api.github.com/repos/mozilla/gcp-ingestion/subscription","commits_url":"https://api.github.com/repos/mozilla/gcp-ingestion/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/gcp-ingestion/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/gcp-ingestion/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/gcp-ingestion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/gcp-ingestion/merges","archive_url":"https://api.github.com/repos/mozilla/gcp-ingestion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/gcp-ingestion/downloads","issues_url":"https://api.github.com/repos/mozilla/gcp-ingestion/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/gcp-ingestion/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/gcp-ingestion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/gcp-ingestion/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/gcp-ingestion/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/gcp-ingestion/deployments","created_at":"2018-08-01T19:42:48Z","updated_at":"2018-12-06T16:39:53Z","pushed_at":"2018-12-06T18:03:16Z","git_url":"git://github.com/mozilla/gcp-ingestion.git","ssh_url":"git@github.com:mozilla/gcp-ingestion.git","clone_url":"https://github.com/mozilla/gcp-ingestion.git","svn_url":"https://github.com/mozilla/gcp-ingestion","homepage":null,"size":427,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":2,"open_issues":39,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264"},"html":{"href":"https://github.com/mozilla/gcp-ingestion/pull/264"},"issue":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/264"},"comments":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/gcp-ingestion/statuses/e2e387064fa20394c3374d1ab1dd2fef1c413e89"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"relud"}}