{"action":"created","comment":{"url":"https://api.github.com/repos/swiftstack/1space/pulls/comments/231162601","pull_request_review_id":172068724,"id":231162601,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTE2MjYwMQ==","diff_hunk":"@@ -81,3 +88,76 @@ def get_messages(self):\n \n     def unread_messages(self):\n         return self._queue.qsize()\n+\n+\n+class TempSyncContainer(s3_sync.sync_container.SyncContainer):\n+    def __init__(self, status, *args, **kwargs):\n+        self._status = status\n+        super(TempSyncContainer, self).__init__(*args, **kwargs)\n+\n+    def _save_status_row(self, row, field_id, db_id):\n+        policy = {}\n+        for field in self.POLICY_FIELDS:\n+            policy[field] = getattr(self, field)\n+        status = self._status.get(db_id)\n+        if not status:\n+            status = {self.PROCESSED_ROW_KEY: 0,\n+                      self.VERIFIED_ROW_KEY: 0,\n+                      'aws_bucket': self.aws_bucket,\n+                      'policy': policy}\n+            self._status[db_id] = status\n+        status[field_id] = row\n+\n+    def _get_status_row(self, field_id, db_id):\n+        return self._status.get(db_id, {}).get(field_id, 0)\n+\n+\n+class TempSyncContainerFactory(s3_sync.sync_container.SyncContainerFactory):\n+    def __init__(self, *args, **kwargs):\n+        super(TempSyncContainerFactory, self).__init__(*args, **kwargs)\n+        self._handler_class = TempSyncContainer\n+        self._status = {}\n+\n+    def instance(self, settings, per_account=True):\n+        # Copied from SyncContainerFactory, but added plumbing for the _status\n+        if 'statsd_host' in self.config:\n+            statsd_client = pystatsd.statsd.Client(\n+                self.config['statsd_host'],\n+                self.config.get('statsd_port', 8125),\n+                self.config.get('statsd_prefix'))\n+        else:\n+            statsd_client = None\n+\n+        return self._handler_class(\n+            self._status,\n+            self.config['status_dir'],\n+            settings,\n+            per_account=per_account,\n+            statsd_client=statsd_client)\n+\n+\n+def get_container_crawler(profile, **kwargs):\n+    defaults = {\n+        'log_level': 'info',\n+        'log_file': '/var/log/swift-s3-sync.log',\n+        'verification_slack': 60,","path":"test/integration/utils.py","position":87,"original_position":87,"commit_id":"4512fe09d5d9a45b4d1bc2f015b3fac2e2125d08","original_commit_id":"4512fe09d5d9a45b4d1bc2f015b3fac2e2125d08","user":{"login":"thiagodasilva","id":1494299,"node_id":"MDQ6VXNlcjE0OTQyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1494299?v=4","gravatar_id":"","url":"https://api.github.com/users/thiagodasilva","html_url":"https://github.com/thiagodasilva","followers_url":"https://api.github.com/users/thiagodasilva/followers","following_url":"https://api.github.com/users/thiagodasilva/following{/other_user}","gists_url":"https://api.github.com/users/thiagodasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagodasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagodasilva/subscriptions","organizations_url":"https://api.github.com/users/thiagodasilva/orgs","repos_url":"https://api.github.com/users/thiagodasilva/repos","events_url":"https://api.github.com/users/thiagodasilva/events{/privacy}","received_events_url":"https://api.github.com/users/thiagodasilva/received_events","type":"User","site_admin":false},"body":"don't we want this to be 0 for tests?","created_at":"2018-11-06T15:16:07Z","updated_at":"2018-11-06T15:31:16Z","html_url":"https://github.com/swiftstack/1space/pull/211#discussion_r231162601","pull_request_url":"https://api.github.com/repos/swiftstack/1space/pulls/211","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/comments/231162601"},"html":{"href":"https://github.com/swiftstack/1space/pull/211#discussion_r231162601"},"pull_request":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/swiftstack/1space/pulls/211","id":228550521,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NTUwNTIx","html_url":"https://github.com/swiftstack/1space/pull/211","diff_url":"https://github.com/swiftstack/1space/pull/211.diff","patch_url":"https://github.com/swiftstack/1space/pull/211.patch","issue_url":"https://api.github.com/repos/swiftstack/1space/issues/211","number":211,"state":"open","locked":false,"title":"Hardening and test improvements.","user":{"login":"timuralp","id":703870,"node_id":"MDQ6VXNlcjcwMzg3MA==","avatar_url":"https://avatars2.githubusercontent.com/u/703870?v=4","gravatar_id":"","url":"https://api.github.com/users/timuralp","html_url":"https://github.com/timuralp","followers_url":"https://api.github.com/users/timuralp/followers","following_url":"https://api.github.com/users/timuralp/following{/other_user}","gists_url":"https://api.github.com/users/timuralp/gists{/gist_id}","starred_url":"https://api.github.com/users/timuralp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timuralp/subscriptions","organizations_url":"https://api.github.com/users/timuralp/orgs","repos_url":"https://api.github.com/users/timuralp/repos","events_url":"https://api.github.com/users/timuralp/events{/privacy}","received_events_url":"https://api.github.com/users/timuralp/received_events","type":"User","site_admin":false},"body":"Broke this up into smaller commits -- let me know if separate PRs would be easier.","created_at":"2018-11-06T01:51:51Z","updated_at":"2018-11-06T15:31:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5b9cfd854ac38a47981867983b5226841fa03cb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/swiftstack/1space/pulls/211/commits","review_comments_url":"https://api.github.com/repos/swiftstack/1space/pulls/211/comments","review_comment_url":"https://api.github.com/repos/swiftstack/1space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swiftstack/1space/issues/211/comments","statuses_url":"https://api.github.com/repos/swiftstack/1space/statuses/4512fe09d5d9a45b4d1bc2f015b3fac2e2125d08","head":{"label":"swiftstack:improvement/deterministic-sync","ref":"improvement/deterministic-sync","sha":"4512fe09d5d9a45b4d1bc2f015b3fac2e2125d08","user":{"login":"swiftstack","id":1240687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1240687?v=4","gravatar_id":"","url":"https://api.github.com/users/swiftstack","html_url":"https://github.com/swiftstack","followers_url":"https://api.github.com/users/swiftstack/followers","following_url":"https://api.github.com/users/swiftstack/following{/other_user}","gists_url":"https://api.github.com/users/swiftstack/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftstack/subscriptions","organizations_url":"https://api.github.com/users/swiftstack/orgs","repos_url":"https://api.github.com/users/swiftstack/repos","events_url":"https://api.github.com/users/swiftstack/events{/privacy}","received_events_url":"https://api.github.com/users/swiftstack/received_events","type":"Organization","site_admin":false},"repo":{"id":58976963,"node_id":"MDEwOlJlcG9zaXRvcnk1ODk3Njk2Mw==","name":"1space","full_name":"swiftstack/1space","private":false,"owner":{"login":"swiftstack","id":1240687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1240687?v=4","gravatar_id":"","url":"https://api.github.com/users/swiftstack","html_url":"https://github.com/swiftstack","followers_url":"https://api.github.com/users/swiftstack/followers","following_url":"https://api.github.com/users/swiftstack/following{/other_user}","gists_url":"https://api.github.com/users/swiftstack/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftstack/subscriptions","organizations_url":"https://api.github.com/users/swiftstack/orgs","repos_url":"https://api.github.com/users/swiftstack/repos","events_url":"https://api.github.com/users/swiftstack/events{/privacy}","received_events_url":"https://api.github.com/users/swiftstack/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/swiftstack/1space","description":"1space enables a single object namespace between object storage locations. 1space enables data lifecycling, migration, and data protection. 1space integrates with OpenStack Swift. The 1space connector is a container that runs in the cloud.","fork":false,"url":"https://api.github.com/repos/swiftstack/1space","forks_url":"https://api.github.com/repos/swiftstack/1space/forks","keys_url":"https://api.github.com/repos/swiftstack/1space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swiftstack/1space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swiftstack/1space/teams","hooks_url":"https://api.github.com/repos/swiftstack/1space/hooks","issue_events_url":"https://api.github.com/repos/swiftstack/1space/issues/events{/number}","events_url":"https://api.github.com/repos/swiftstack/1space/events","assignees_url":"https://api.github.com/repos/swiftstack/1space/assignees{/user}","branches_url":"https://api.github.com/repos/swiftstack/1space/branches{/branch}","tags_url":"https://api.github.com/repos/swiftstack/1space/tags","blobs_url":"https://api.github.com/repos/swiftstack/1space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swiftstack/1space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swiftstack/1space/git/refs{/sha}","trees_url":"https://api.github.com/repos/swiftstack/1space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swiftstack/1space/statuses/{sha}","languages_url":"https://api.github.com/repos/swiftstack/1space/languages","stargazers_url":"https://api.github.com/repos/swiftstack/1space/stargazers","contributors_url":"https://api.github.com/repos/swiftstack/1space/contributors","subscribers_url":"https://api.github.com/repos/swiftstack/1space/subscribers","subscription_url":"https://api.github.com/repos/swiftstack/1space/subscription","commits_url":"https://api.github.com/repos/swiftstack/1space/commits{/sha}","git_commits_url":"https://api.github.com/repos/swiftstack/1space/git/commits{/sha}","comments_url":"https://api.github.com/repos/swiftstack/1space/comments{/number}","issue_comment_url":"https://api.github.com/repos/swiftstack/1space/issues/comments{/number}","contents_url":"https://api.github.com/repos/swiftstack/1space/contents/{+path}","compare_url":"https://api.github.com/repos/swiftstack/1space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swiftstack/1space/merges","archive_url":"https://api.github.com/repos/swiftstack/1space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swiftstack/1space/downloads","issues_url":"https://api.github.com/repos/swiftstack/1space/issues{/number}","pulls_url":"https://api.github.com/repos/swiftstack/1space/pulls{/number}","milestones_url":"https://api.github.com/repos/swiftstack/1space/milestones{/number}","notifications_url":"https://api.github.com/repos/swiftstack/1space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swiftstack/1space/labels{/name}","releases_url":"https://api.github.com/repos/swiftstack/1space/releases{/id}","deployments_url":"https://api.github.com/repos/swiftstack/1space/deployments","created_at":"2016-05-17T00:20:29Z","updated_at":"2018-11-01T18:12:54Z","pushed_at":"2018-11-06T01:51:51Z","git_url":"git://github.com/swiftstack/1space.git","ssh_url":"git@github.com:swiftstack/1space.git","clone_url":"https://github.com/swiftstack/1space.git","svn_url":"https://github.com/swiftstack/1space","homepage":"","size":1462,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":18,"watchers":15,"default_branch":"master"}},"base":{"label":"swiftstack:master","ref":"master","sha":"f1f08d3d05884792ec23dfe406589a708c97f7aa","user":{"login":"swiftstack","id":1240687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1240687?v=4","gravatar_id":"","url":"https://api.github.com/users/swiftstack","html_url":"https://github.com/swiftstack","followers_url":"https://api.github.com/users/swiftstack/followers","following_url":"https://api.github.com/users/swiftstack/following{/other_user}","gists_url":"https://api.github.com/users/swiftstack/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftstack/subscriptions","organizations_url":"https://api.github.com/users/swiftstack/orgs","repos_url":"https://api.github.com/users/swiftstack/repos","events_url":"https://api.github.com/users/swiftstack/events{/privacy}","received_events_url":"https://api.github.com/users/swiftstack/received_events","type":"Organization","site_admin":false},"repo":{"id":58976963,"node_id":"MDEwOlJlcG9zaXRvcnk1ODk3Njk2Mw==","name":"1space","full_name":"swiftstack/1space","private":false,"owner":{"login":"swiftstack","id":1240687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDA2ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1240687?v=4","gravatar_id":"","url":"https://api.github.com/users/swiftstack","html_url":"https://github.com/swiftstack","followers_url":"https://api.github.com/users/swiftstack/followers","following_url":"https://api.github.com/users/swiftstack/following{/other_user}","gists_url":"https://api.github.com/users/swiftstack/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftstack/subscriptions","organizations_url":"https://api.github.com/users/swiftstack/orgs","repos_url":"https://api.github.com/users/swiftstack/repos","events_url":"https://api.github.com/users/swiftstack/events{/privacy}","received_events_url":"https://api.github.com/users/swiftstack/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/swiftstack/1space","description":"1space enables a single object namespace between object storage locations. 1space enables data lifecycling, migration, and data protection. 1space integrates with OpenStack Swift. The 1space connector is a container that runs in the cloud.","fork":false,"url":"https://api.github.com/repos/swiftstack/1space","forks_url":"https://api.github.com/repos/swiftstack/1space/forks","keys_url":"https://api.github.com/repos/swiftstack/1space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swiftstack/1space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swiftstack/1space/teams","hooks_url":"https://api.github.com/repos/swiftstack/1space/hooks","issue_events_url":"https://api.github.com/repos/swiftstack/1space/issues/events{/number}","events_url":"https://api.github.com/repos/swiftstack/1space/events","assignees_url":"https://api.github.com/repos/swiftstack/1space/assignees{/user}","branches_url":"https://api.github.com/repos/swiftstack/1space/branches{/branch}","tags_url":"https://api.github.com/repos/swiftstack/1space/tags","blobs_url":"https://api.github.com/repos/swiftstack/1space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swiftstack/1space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swiftstack/1space/git/refs{/sha}","trees_url":"https://api.github.com/repos/swiftstack/1space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swiftstack/1space/statuses/{sha}","languages_url":"https://api.github.com/repos/swiftstack/1space/languages","stargazers_url":"https://api.github.com/repos/swiftstack/1space/stargazers","contributors_url":"https://api.github.com/repos/swiftstack/1space/contributors","subscribers_url":"https://api.github.com/repos/swiftstack/1space/subscribers","subscription_url":"https://api.github.com/repos/swiftstack/1space/subscription","commits_url":"https://api.github.com/repos/swiftstack/1space/commits{/sha}","git_commits_url":"https://api.github.com/repos/swiftstack/1space/git/commits{/sha}","comments_url":"https://api.github.com/repos/swiftstack/1space/comments{/number}","issue_comment_url":"https://api.github.com/repos/swiftstack/1space/issues/comments{/number}","contents_url":"https://api.github.com/repos/swiftstack/1space/contents/{+path}","compare_url":"https://api.github.com/repos/swiftstack/1space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swiftstack/1space/merges","archive_url":"https://api.github.com/repos/swiftstack/1space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swiftstack/1space/downloads","issues_url":"https://api.github.com/repos/swiftstack/1space/issues{/number}","pulls_url":"https://api.github.com/repos/swiftstack/1space/pulls{/number}","milestones_url":"https://api.github.com/repos/swiftstack/1space/milestones{/number}","notifications_url":"https://api.github.com/repos/swiftstack/1space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swiftstack/1space/labels{/name}","releases_url":"https://api.github.com/repos/swiftstack/1space/releases{/id}","deployments_url":"https://api.github.com/repos/swiftstack/1space/deployments","created_at":"2016-05-17T00:20:29Z","updated_at":"2018-11-01T18:12:54Z","pushed_at":"2018-11-06T01:51:51Z","git_url":"git://github.com/swiftstack/1space.git","ssh_url":"git@github.com:swiftstack/1space.git","clone_url":"https://github.com/swiftstack/1space.git","svn_url":"https://github.com/swiftstack/1space","homepage":"","size":1462,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":18,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/211"},"html":{"href":"https://github.com/swiftstack/1space/pull/211"},"issue":{"href":"https://api.github.com/repos/swiftstack/1space/issues/211"},"comments":{"href":"https://api.github.com/repos/swiftstack/1space/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swiftstack/1space/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/swiftstack/1space/statuses/4512fe09d5d9a45b4d1bc2f015b3fac2e2125d08"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"thiagodasilva"}}