{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/front50/pulls/comments/85389619","pull_request_review_id":6109903,"id":85389619,"diff_hunk":"@@ -0,0 +1,61 @@\n+/*\n+ * Copyright 2016 Netflix, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.netflix.spinnaker.front50.model.tag;\n+\n+import com.netflix.spinnaker.front50.model.ObjectType;\n+import com.netflix.spinnaker.front50.model.StorageService;\n+import com.netflix.spinnaker.front50.model.StorageServiceSupport;\n+import rx.Scheduler;\n+\n+import java.util.Collection;\n+import java.util.Collections;\n+import java.util.Objects;\n+\n+public class DefaultEntityTagsDAO extends StorageServiceSupport<EntityTags> implements EntityTagsDAO {\n+  public DefaultEntityTagsDAO(StorageService service,\n+                            Scheduler scheduler,\n+                            int refreshIntervalMs) {\n+    super(ObjectType.ENTITY_TAGS, service, scheduler, refreshIntervalMs);\n+  }\n+\n+  @Override\n+  public EntityTags create(String id, EntityTags tag) {\n+    return upsert(id, tag);\n+  }\n+\n+  @Override\n+  public void update(String id, EntityTags tag) {\n+    upsert(id, tag);\n+  }\n+\n+  private EntityTags upsert(String id, EntityTags tag) {\n+    Objects.requireNonNull(id);\n+    super.update(id, tag);\n+    return findById(id);\n+  }\n+\n+  @Override\n+  public Collection<EntityTags> all() {\n+    // no support for retrieving _all_ tagged entities","path":"front50-core/src/main/groovy/com/netflix/spinnaker/front50/model/tag/DefaultEntityTagsDAO.java","position":53,"original_position":53,"commit_id":"02f6f5c13f1a1adb2a3b210cfdc836998d6ed2b2","original_commit_id":"02f6f5c13f1a1adb2a3b210cfdc836998d6ed2b2","user":{"login":"ajordens","id":388652,"avatar_url":"https://avatars.githubusercontent.com/u/388652?v=3","gravatar_id":"","url":"https://api.github.com/users/ajordens","html_url":"https://github.com/ajordens","followers_url":"https://api.github.com/users/ajordens/followers","following_url":"https://api.github.com/users/ajordens/following{/other_user}","gists_url":"https://api.github.com/users/ajordens/gists{/gist_id}","starred_url":"https://api.github.com/users/ajordens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajordens/subscriptions","organizations_url":"https://api.github.com/users/ajordens/orgs","repos_url":"https://api.github.com/users/ajordens/repos","events_url":"https://api.github.com/users/ajordens/events{/privacy}","received_events_url":"https://api.github.com/users/ajordens/received_events","type":"User","site_admin":false},"body":"Not sure ... tags are a bit of a special case and there is no actual caller of this DAO method.\r\n\r\nThe controller itself doesn't have an equivalent all() endpoint (it requires a query parameter).","created_at":"2016-10-27T17:40:43Z","updated_at":"2016-10-27T17:40:44Z","html_url":"https://github.com/spinnaker/front50/pull/152#discussion_r85389619","pull_request_url":"https://api.github.com/repos/spinnaker/front50/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/comments/85389619"},"html":{"href":"https://github.com/spinnaker/front50/pull/152#discussion_r85389619"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/front50/pulls/152","id":90921088,"html_url":"https://github.com/spinnaker/front50/pull/152","diff_url":"https://github.com/spinnaker/front50/pull/152.diff","patch_url":"https://github.com/spinnaker/front50/pull/152.patch","issue_url":"https://api.github.com/repos/spinnaker/front50/issues/152","number":152,"state":"open","locked":false,"title":"Merging `gcs` and `s3` access patterns","user":{"login":"ajordens","id":388652,"avatar_url":"https://avatars.githubusercontent.com/u/388652?v=3","gravatar_id":"","url":"https://api.github.com/users/ajordens","html_url":"https://github.com/ajordens","followers_url":"https://api.github.com/users/ajordens/followers","following_url":"https://api.github.com/users/ajordens/following{/other_user}","gists_url":"https://api.github.com/users/ajordens/gists{/gist_id}","starred_url":"https://api.github.com/users/ajordens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajordens/subscriptions","organizations_url":"https://api.github.com/users/ajordens/orgs","repos_url":"https://api.github.com/users/ajordens/repos","events_url":"https://api.github.com/users/ajordens/events{/privacy}","received_events_url":"https://api.github.com/users/ajordens/received_events","type":"User","site_admin":false},"body":"The idea being that we can have a series of default DAOs that are backed by an s3 or gcs `storageService`\r\n\r\n- Renamed `BucketDAO` to `StorageServiceSupport`\r\n- Encapsulated `serializedClass` and `daoTypeName` in `ObjectType`","created_at":"2016-10-26T01:23:21Z","updated_at":"2016-10-27T17:40:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e62522761349844d1b1dc17c7cc8c3d27ca01841","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/front50/pulls/152/commits","review_comments_url":"https://api.github.com/repos/spinnaker/front50/pulls/152/comments","review_comment_url":"https://api.github.com/repos/spinnaker/front50/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/front50/issues/152/comments","statuses_url":"https://api.github.com/repos/spinnaker/front50/statuses/02f6f5c13f1a1adb2a3b210cfdc836998d6ed2b2","head":{"label":"ajordens:gcs-s3-refactor","ref":"gcs-s3-refactor","sha":"02f6f5c13f1a1adb2a3b210cfdc836998d6ed2b2","user":{"login":"ajordens","id":388652,"avatar_url":"https://avatars.githubusercontent.com/u/388652?v=3","gravatar_id":"","url":"https://api.github.com/users/ajordens","html_url":"https://github.com/ajordens","followers_url":"https://api.github.com/users/ajordens/followers","following_url":"https://api.github.com/users/ajordens/following{/other_user}","gists_url":"https://api.github.com/users/ajordens/gists{/gist_id}","starred_url":"https://api.github.com/users/ajordens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajordens/subscriptions","organizations_url":"https://api.github.com/users/ajordens/orgs","repos_url":"https://api.github.com/users/ajordens/repos","events_url":"https://api.github.com/users/ajordens/events{/privacy}","received_events_url":"https://api.github.com/users/ajordens/received_events","type":"User","site_admin":false},"repo":{"id":48294371,"name":"front50","full_name":"ajordens/front50","owner":{"login":"ajordens","id":388652,"avatar_url":"https://avatars.githubusercontent.com/u/388652?v=3","gravatar_id":"","url":"https://api.github.com/users/ajordens","html_url":"https://github.com/ajordens","followers_url":"https://api.github.com/users/ajordens/followers","following_url":"https://api.github.com/users/ajordens/following{/other_user}","gists_url":"https://api.github.com/users/ajordens/gists{/gist_id}","starred_url":"https://api.github.com/users/ajordens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajordens/subscriptions","organizations_url":"https://api.github.com/users/ajordens/orgs","repos_url":"https://api.github.com/users/ajordens/repos","events_url":"https://api.github.com/users/ajordens/events{/privacy}","received_events_url":"https://api.github.com/users/ajordens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajordens/front50","description":"Cross-Application Persistence Service","fork":true,"url":"https://api.github.com/repos/ajordens/front50","forks_url":"https://api.github.com/repos/ajordens/front50/forks","keys_url":"https://api.github.com/repos/ajordens/front50/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajordens/front50/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajordens/front50/teams","hooks_url":"https://api.github.com/repos/ajordens/front50/hooks","issue_events_url":"https://api.github.com/repos/ajordens/front50/issues/events{/number}","events_url":"https://api.github.com/repos/ajordens/front50/events","assignees_url":"https://api.github.com/repos/ajordens/front50/assignees{/user}","branches_url":"https://api.github.com/repos/ajordens/front50/branches{/branch}","tags_url":"https://api.github.com/repos/ajordens/front50/tags","blobs_url":"https://api.github.com/repos/ajordens/front50/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajordens/front50/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajordens/front50/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajordens/front50/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajordens/front50/statuses/{sha}","languages_url":"https://api.github.com/repos/ajordens/front50/languages","stargazers_url":"https://api.github.com/repos/ajordens/front50/stargazers","contributors_url":"https://api.github.com/repos/ajordens/front50/contributors","subscribers_url":"https://api.github.com/repos/ajordens/front50/subscribers","subscription_url":"https://api.github.com/repos/ajordens/front50/subscription","commits_url":"https://api.github.com/repos/ajordens/front50/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajordens/front50/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajordens/front50/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajordens/front50/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajordens/front50/contents/{+path}","compare_url":"https://api.github.com/repos/ajordens/front50/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajordens/front50/merges","archive_url":"https://api.github.com/repos/ajordens/front50/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajordens/front50/downloads","issues_url":"https://api.github.com/repos/ajordens/front50/issues{/number}","pulls_url":"https://api.github.com/repos/ajordens/front50/pulls{/number}","milestones_url":"https://api.github.com/repos/ajordens/front50/milestones{/number}","notifications_url":"https://api.github.com/repos/ajordens/front50/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajordens/front50/labels{/name}","releases_url":"https://api.github.com/repos/ajordens/front50/releases{/id}","deployments_url":"https://api.github.com/repos/ajordens/front50/deployments","created_at":"2015-12-19T19:23:38Z","updated_at":"2016-03-15T03:25:40Z","pushed_at":"2016-10-27T02:53:34Z","git_url":"git://github.com/ajordens/front50.git","ssh_url":"git@github.com:ajordens/front50.git","clone_url":"https://github.com/ajordens/front50.git","svn_url":"https://github.com/ajordens/front50","homepage":"","size":900,"stargazers_count":0,"watchers_count":0,"language":"Groovy","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":"spinnaker:master","ref":"master","sha":"2094ad30dde4eb1bcf0b90bd7483f520241eb2e5","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":21367721,"name":"front50","full_name":"spinnaker/front50","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/front50","description":"Cross-Application Persistence Service","fork":false,"url":"https://api.github.com/repos/spinnaker/front50","forks_url":"https://api.github.com/repos/spinnaker/front50/forks","keys_url":"https://api.github.com/repos/spinnaker/front50/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/front50/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/front50/teams","hooks_url":"https://api.github.com/repos/spinnaker/front50/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/front50/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/front50/events","assignees_url":"https://api.github.com/repos/spinnaker/front50/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/front50/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/front50/tags","blobs_url":"https://api.github.com/repos/spinnaker/front50/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/front50/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/front50/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/front50/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/front50/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/front50/languages","stargazers_url":"https://api.github.com/repos/spinnaker/front50/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/front50/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/front50/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/front50/subscription","commits_url":"https://api.github.com/repos/spinnaker/front50/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/front50/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/front50/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/front50/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/front50/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/front50/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/front50/merges","archive_url":"https://api.github.com/repos/spinnaker/front50/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/front50/downloads","issues_url":"https://api.github.com/repos/spinnaker/front50/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/front50/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/front50/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/front50/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/front50/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/front50/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/front50/deployments","created_at":"2014-06-30T22:17:10Z","updated_at":"2016-10-25T19:32:37Z","pushed_at":"2016-10-27T02:53:34Z","git_url":"git://github.com/spinnaker/front50.git","ssh_url":"git@github.com:spinnaker/front50.git","clone_url":"https://github.com/spinnaker/front50.git","svn_url":"https://github.com/spinnaker/front50","homepage":"","size":1163,"stargazers_count":16,"watchers_count":16,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":3,"forks":44,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/152"},"html":{"href":"https://github.com/spinnaker/front50/pull/152"},"issue":{"href":"https://api.github.com/repos/spinnaker/front50/issues/152"},"comments":{"href":"https://api.github.com/repos/spinnaker/front50/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/front50/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/front50/statuses/02f6f5c13f1a1adb2a3b210cfdc836998d6ed2b2"}}}}
{"actor":{"display_login":"ajordens"}}