{"action":"created","comment":{"url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/comments/45479720","id":45479720,"diff_hunk":"@@ -0,0 +1,174 @@\n+package uk.sky.cirrus.locking;\n+\n+import com.datastax.driver.core.*;\n+import com.datastax.driver.core.exceptions.DriverException;\n+import com.datastax.driver.core.exceptions.WriteTimeoutException;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import uk.sky.cirrus.locking.exception.CannotAcquireLockException;\n+import uk.sky.cirrus.locking.exception.CannotReleaseLockException;\n+\n+import java.time.Duration;\n+import java.util.UUID;\n+\n+/**\n+ * Class to acquire a lock on cassandra table for a single application instance.  Each instance is given a unique identifier\n+ * and attempts to gain a lock on the table.  If no lock is currently acquired, the instance is given the lock on the table, otherwise\n+ * the instance must wait until the lock has been relinquished. If a lock cannot be acquired within the configured timeout\n+ * interval, an exception is thrown.\n+ */\n+public class Lock {\n+\n+    private static final Logger log = LoggerFactory.getLogger(Lock.class);\n+\n+    private final String name;\n+    private final Session session;\n+    private final UUID client;\n+    private boolean released;\n+\n+    private Lock(String name, Session session, UUID client) {\n+        this.name = name;\n+        this.session = session;\n+        this.client = client;\n+    }\n+\n+    /**\n+     * @param clientId   Identifier for the owner of the lock\n+     * @param lockConfig {@code LockConfig} for configuring the lock to migrate the schema\n+     * @param keyspace   Name of the keyspace which is to be used for migration\n+     * @param session    Cassandra {@code Session} to use while acquiring the lock\n+     * @return the {@code Lock} object\n+     * @throws CannotAcquireLockException if instance cannot acquire lock within the specified time interval or execution of query to insert lock fails\n+     */\n+    static Lock acquire(LockConfig lockConfig, String keyspace, Session session, UUID clientId) {\n+\n+        final String clientName = keyspace + \".schema_migration\";\n+        int acquireAttempts = 1;\n+\n+        log.info(\"Attempting to acquire lock for '{}', using client id '{}'\", clientName, clientId);\n+        long startTime = System.currentTimeMillis();\n+\n+        final Statement query = new SimpleStatement(\"INSERT INTO locks.locks (name, client) VALUES (?, ?) IF NOT EXISTS\", clientName, clientId);\n+\n+        while (true) {\n+            try {\n+                final ResultSet resultSet = tryAcquire(session, clientId, query);\n+                final Row currentLock = resultSet.one();\n+                boolean hasAcquiredLock = currentLock.getBool(\"[applied]\");\n+\n+                if (hasAcquiredLock) {\n+                    log.info(\"Lock acquired for '{}' by client '{}' after {} attempts\", clientName, clientId, acquireAttempts);\n+                    return new Lock(clientName, session, clientId);\n+                } else if (clientId.equals(currentLock.getUUID(\"client\"))) {\n+                    return new Lock(clientName, session, clientId);\n+                } else {\n+                    waitToAcquire(lockConfig, clientId, acquireAttempts, startTime, currentLock.getUUID(\"client\"));\n+                }\n+\n+            } catch (WriteTimeoutException wte) {\n+                log.warn(\"Query to acquire lock for {} failed to execute: {}\", clientId, wte.getMessage());\n+\n+            }\n+            acquireAttempts++;\n+        }\n+    }\n+\n+    /**\n+     * @throws CannotReleaseLockException if execution of query to remove lock fails\n+     */\n+    void release() {\n+        final Statement query = new SimpleStatement(\"DELETE FROM locks.locks WHERE name = ? IF client = ?\", name, client);\n+        boolean isRetryAfterWriteTimeout = false;\n+\n+        while (!this.released) {\n+            try {\n+                ResultSet resultSet = session.execute(query);\n+                this.released = handleLockRelease(resultSet.one(), isRetryAfterWriteTimeout);\n+            } catch (WriteTimeoutException wte) {\n+                log.warn(\"Query to release lock for {} failed to execute: {}\", client, wte.getMessage());\n+                waitToRetryRelease();\n+                isRetryAfterWriteTimeout = true;\n+            } catch (Exception e) {\n+                log.error(\"Query to release lock failed to execute for {} by client {}\", name, client, e);\n+                throw new CannotReleaseLockException(\"Query failed to execute\", e);\n+            }\n+        }\n+    }\n+\n+    private boolean handleLockRelease(final Row result, boolean isRetryAfterWriteTimeout) {\n+\n+        boolean isApplied = result.getBool(\"[applied]\");\n+\n+        if (isApplied || !result.getColumnDefinitions().contains(\"client\")) {\n+            log.info(\"Lock released for {} by client {} at: {}\", name, client, System.currentTimeMillis());\n+            return true;\n+        }\n+\n+        final UUID clientReleasingLock = result.getUUID(\"client\");\n+        if (!clientReleasingLock.equals(this.client)) {\n+            if (isRetryAfterWriteTimeout) {\n+                log.info(\"Released lock for client {} in retry attempt after WriteTimeoutException\", clientReleasingLock);\n+                return true;\n+            } else {\n+                log.error(\"Lock attempted to be released by a non lock holder {}\", clientReleasingLock);\n+                throw new IllegalStateException(\"Lock attempted to be released by a non lock holder: \" + clientReleasingLock);\n+            }\n+        }\n+\n+        return false;\n+    }\n+\n+    private static ResultSet tryAcquire(Session session, UUID client, Statement query) {\n+        try {\n+            return session.execute(query);\n+        } catch (WriteTimeoutException wte) {\n+            throw wte;\n+        } catch (DriverException de) {\n+            log.warn(\"Query to acquire lock for {} failed to execute\", client, de);\n+            throw new CannotAcquireLockException(\"Query failed to execute\", de);\n+        }\n+    }\n+\n+    private static void waitToAcquire(LockConfig lockConfig, UUID clientId, int acquireAttempts, long startTime, UUID currentLockHolder) {\n+        log.debug(\"Lock currently in use by client: {}\", currentLockHolder);\n+\n+        if (timedOut(lockConfig.getTimeout(), startTime)) {\n+            log.warn(\"Unable to acquire lock for {} after {} attempts, currently in use by client: {}, time tried: {}\", clientId, acquireAttempts, currentLockHolder, (System.currentTimeMillis() - startTime));\n+            throw new CannotAcquireLockException(\"Lock currently in use by client: \" + currentLockHolder);\n+        }\n+\n+        try {\n+            Thread.sleep(lockConfig.getPollingInterval().toMillis());\n+        } catch (InterruptedException e) {\n+            log.debug(\"Lock {} was interrupted\", clientId);","path":"src/main/java/uk/sky/cirrus/locking/Lock.java","position":143,"original_position":143,"commit_id":"55da38eb0157f8f59b94795d4147d9095eb993e8","original_commit_id":"55da38eb0157f8f59b94795d4147d9095eb993e8","user":{"login":"cirrus-core","id":15108394,"avatar_url":"https://avatars.githubusercontent.com/u/15108394?v=3","gravatar_id":"","url":"https://api.github.com/users/cirrus-core","html_url":"https://github.com/cirrus-core","followers_url":"https://api.github.com/users/cirrus-core/followers","following_url":"https://api.github.com/users/cirrus-core/following{/other_user}","gists_url":"https://api.github.com/users/cirrus-core/gists{/gist_id}","starred_url":"https://api.github.com/users/cirrus-core/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirrus-core/subscriptions","organizations_url":"https://api.github.com/users/cirrus-core/orgs","repos_url":"https://api.github.com/users/cirrus-core/repos","events_url":"https://api.github.com/users/cirrus-core/events{/privacy}","received_events_url":"https://api.github.com/users/cirrus-core/received_events","type":"User","site_admin":false},"body":"This is not expected to happen so why don't we do it as Info so we know it has happened? Debug logging will rarely ever be on","created_at":"2015-11-20T15:24:20Z","updated_at":"2015-11-20T15:24:20Z","html_url":"https://github.com/sky-uk/cqlmigrate/pull/1#discussion_r45479720","pull_request_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/comments/45479720"},"html":{"href":"https://github.com/sky-uk/cqlmigrate/pull/1#discussion_r45479720"},"pull_request":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1","id":48885969,"html_url":"https://github.com/sky-uk/cqlmigrate/pull/1","diff_url":"https://github.com/sky-uk/cqlmigrate/pull/1.diff","patch_url":"https://github.com/sky-uk/cqlmigrate/pull/1.patch","issue_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/1","number":1,"state":"open","locked":false,"title":"Locking","user":{"login":"adamdougal","id":1589887,"avatar_url":"https://avatars.githubusercontent.com/u/1589887?v=3","gravatar_id":"","url":"https://api.github.com/users/adamdougal","html_url":"https://github.com/adamdougal","followers_url":"https://api.github.com/users/adamdougal/followers","following_url":"https://api.github.com/users/adamdougal/following{/other_user}","gists_url":"https://api.github.com/users/adamdougal/gists{/gist_id}","starred_url":"https://api.github.com/users/adamdougal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamdougal/subscriptions","organizations_url":"https://api.github.com/users/adamdougal/orgs","repos_url":"https://api.github.com/users/adamdougal/repos","events_url":"https://api.github.com/users/adamdougal/events{/privacy}","received_events_url":"https://api.github.com/users/adamdougal/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-27T15:24:13Z","updated_at":"2015-11-20T15:24:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2e9c72dc3dd81a7a4764b53ee682af3ed9f9bae","assignee":null,"milestone":{"url":"https://api.github.com/repos/sky-uk/cqlmigrate/milestones/1","html_url":"https://github.com/sky-uk/cqlmigrate/milestones/0.0.1","labels_url":"https://api.github.com/repos/sky-uk/cqlmigrate/milestones/1/labels","id":1393362,"number":1,"title":"0.0.1","description":"First public release","creator":{"login":"jsravn","id":522123,"avatar_url":"https://avatars.githubusercontent.com/u/522123?v=3","gravatar_id":"","url":"https://api.github.com/users/jsravn","html_url":"https://github.com/jsravn","followers_url":"https://api.github.com/users/jsravn/followers","following_url":"https://api.github.com/users/jsravn/following{/other_user}","gists_url":"https://api.github.com/users/jsravn/gists{/gist_id}","starred_url":"https://api.github.com/users/jsravn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsravn/subscriptions","organizations_url":"https://api.github.com/users/jsravn/orgs","repos_url":"https://api.github.com/users/jsravn/repos","events_url":"https://api.github.com/users/jsravn/events{/privacy}","received_events_url":"https://api.github.com/users/jsravn/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-11-04T10:51:49Z","updated_at":"2015-11-04T11:05:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/1/comments","statuses_url":"https://api.github.com/repos/sky-uk/cqlmigrate/statuses/55da38eb0157f8f59b94795d4147d9095eb993e8","head":{"label":"sky-uk:locking","ref":"locking","sha":"55da38eb0157f8f59b94795d4147d9095eb993e8","user":{"login":"sky-uk","id":1391938,"avatar_url":"https://avatars.githubusercontent.com/u/1391938?v=3","gravatar_id":"","url":"https://api.github.com/users/sky-uk","html_url":"https://github.com/sky-uk","followers_url":"https://api.github.com/users/sky-uk/followers","following_url":"https://api.github.com/users/sky-uk/following{/other_user}","gists_url":"https://api.github.com/users/sky-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/sky-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sky-uk/subscriptions","organizations_url":"https://api.github.com/users/sky-uk/orgs","repos_url":"https://api.github.com/users/sky-uk/repos","events_url":"https://api.github.com/users/sky-uk/events{/privacy}","received_events_url":"https://api.github.com/users/sky-uk/received_events","type":"Organization","site_admin":false},"repo":{"id":43748284,"name":"cqlmigrate","full_name":"sky-uk/cqlmigrate","owner":{"login":"sky-uk","id":1391938,"avatar_url":"https://avatars.githubusercontent.com/u/1391938?v=3","gravatar_id":"","url":"https://api.github.com/users/sky-uk","html_url":"https://github.com/sky-uk","followers_url":"https://api.github.com/users/sky-uk/followers","following_url":"https://api.github.com/users/sky-uk/following{/other_user}","gists_url":"https://api.github.com/users/sky-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/sky-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sky-uk/subscriptions","organizations_url":"https://api.github.com/users/sky-uk/orgs","repos_url":"https://api.github.com/users/sky-uk/repos","events_url":"https://api.github.com/users/sky-uk/events{/privacy}","received_events_url":"https://api.github.com/users/sky-uk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sky-uk/cqlmigrate","description":"Cassandra schema migration library","fork":false,"url":"https://api.github.com/repos/sky-uk/cqlmigrate","forks_url":"https://api.github.com/repos/sky-uk/cqlmigrate/forks","keys_url":"https://api.github.com/repos/sky-uk/cqlmigrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sky-uk/cqlmigrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sky-uk/cqlmigrate/teams","hooks_url":"https://api.github.com/repos/sky-uk/cqlmigrate/hooks","issue_events_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/events{/number}","events_url":"https://api.github.com/repos/sky-uk/cqlmigrate/events","assignees_url":"https://api.github.com/repos/sky-uk/cqlmigrate/assignees{/user}","branches_url":"https://api.github.com/repos/sky-uk/cqlmigrate/branches{/branch}","tags_url":"https://api.github.com/repos/sky-uk/cqlmigrate/tags","blobs_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sky-uk/cqlmigrate/statuses/{sha}","languages_url":"https://api.github.com/repos/sky-uk/cqlmigrate/languages","stargazers_url":"https://api.github.com/repos/sky-uk/cqlmigrate/stargazers","contributors_url":"https://api.github.com/repos/sky-uk/cqlmigrate/contributors","subscribers_url":"https://api.github.com/repos/sky-uk/cqlmigrate/subscribers","subscription_url":"https://api.github.com/repos/sky-uk/cqlmigrate/subscription","commits_url":"https://api.github.com/repos/sky-uk/cqlmigrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/sky-uk/cqlmigrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/sky-uk/cqlmigrate/contents/{+path}","compare_url":"https://api.github.com/repos/sky-uk/cqlmigrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sky-uk/cqlmigrate/merges","archive_url":"https://api.github.com/repos/sky-uk/cqlmigrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sky-uk/cqlmigrate/downloads","issues_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues{/number}","pulls_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls{/number}","milestones_url":"https://api.github.com/repos/sky-uk/cqlmigrate/milestones{/number}","notifications_url":"https://api.github.com/repos/sky-uk/cqlmigrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sky-uk/cqlmigrate/labels{/name}","releases_url":"https://api.github.com/repos/sky-uk/cqlmigrate/releases{/id}","created_at":"2015-10-06T12:11:27Z","updated_at":"2015-11-03T17:18:07Z","pushed_at":"2015-11-17T14:56:35Z","git_url":"git://github.com/sky-uk/cqlmigrate.git","ssh_url":"git@github.com:sky-uk/cqlmigrate.git","clone_url":"https://github.com/sky-uk/cqlmigrate.git","svn_url":"https://github.com/sky-uk/cqlmigrate","homepage":"","size":146,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"sky-uk:master","ref":"master","sha":"afbe74a4e0faaf0e414c6ae705b579018b19ee7e","user":{"login":"sky-uk","id":1391938,"avatar_url":"https://avatars.githubusercontent.com/u/1391938?v=3","gravatar_id":"","url":"https://api.github.com/users/sky-uk","html_url":"https://github.com/sky-uk","followers_url":"https://api.github.com/users/sky-uk/followers","following_url":"https://api.github.com/users/sky-uk/following{/other_user}","gists_url":"https://api.github.com/users/sky-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/sky-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sky-uk/subscriptions","organizations_url":"https://api.github.com/users/sky-uk/orgs","repos_url":"https://api.github.com/users/sky-uk/repos","events_url":"https://api.github.com/users/sky-uk/events{/privacy}","received_events_url":"https://api.github.com/users/sky-uk/received_events","type":"Organization","site_admin":false},"repo":{"id":43748284,"name":"cqlmigrate","full_name":"sky-uk/cqlmigrate","owner":{"login":"sky-uk","id":1391938,"avatar_url":"https://avatars.githubusercontent.com/u/1391938?v=3","gravatar_id":"","url":"https://api.github.com/users/sky-uk","html_url":"https://github.com/sky-uk","followers_url":"https://api.github.com/users/sky-uk/followers","following_url":"https://api.github.com/users/sky-uk/following{/other_user}","gists_url":"https://api.github.com/users/sky-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/sky-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sky-uk/subscriptions","organizations_url":"https://api.github.com/users/sky-uk/orgs","repos_url":"https://api.github.com/users/sky-uk/repos","events_url":"https://api.github.com/users/sky-uk/events{/privacy}","received_events_url":"https://api.github.com/users/sky-uk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sky-uk/cqlmigrate","description":"Cassandra schema migration library","fork":false,"url":"https://api.github.com/repos/sky-uk/cqlmigrate","forks_url":"https://api.github.com/repos/sky-uk/cqlmigrate/forks","keys_url":"https://api.github.com/repos/sky-uk/cqlmigrate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sky-uk/cqlmigrate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sky-uk/cqlmigrate/teams","hooks_url":"https://api.github.com/repos/sky-uk/cqlmigrate/hooks","issue_events_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/events{/number}","events_url":"https://api.github.com/repos/sky-uk/cqlmigrate/events","assignees_url":"https://api.github.com/repos/sky-uk/cqlmigrate/assignees{/user}","branches_url":"https://api.github.com/repos/sky-uk/cqlmigrate/branches{/branch}","tags_url":"https://api.github.com/repos/sky-uk/cqlmigrate/tags","blobs_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/refs{/sha}","trees_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sky-uk/cqlmigrate/statuses/{sha}","languages_url":"https://api.github.com/repos/sky-uk/cqlmigrate/languages","stargazers_url":"https://api.github.com/repos/sky-uk/cqlmigrate/stargazers","contributors_url":"https://api.github.com/repos/sky-uk/cqlmigrate/contributors","subscribers_url":"https://api.github.com/repos/sky-uk/cqlmigrate/subscribers","subscription_url":"https://api.github.com/repos/sky-uk/cqlmigrate/subscription","commits_url":"https://api.github.com/repos/sky-uk/cqlmigrate/commits{/sha}","git_commits_url":"https://api.github.com/repos/sky-uk/cqlmigrate/git/commits{/sha}","comments_url":"https://api.github.com/repos/sky-uk/cqlmigrate/comments{/number}","issue_comment_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/comments{/number}","contents_url":"https://api.github.com/repos/sky-uk/cqlmigrate/contents/{+path}","compare_url":"https://api.github.com/repos/sky-uk/cqlmigrate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sky-uk/cqlmigrate/merges","archive_url":"https://api.github.com/repos/sky-uk/cqlmigrate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sky-uk/cqlmigrate/downloads","issues_url":"https://api.github.com/repos/sky-uk/cqlmigrate/issues{/number}","pulls_url":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls{/number}","milestones_url":"https://api.github.com/repos/sky-uk/cqlmigrate/milestones{/number}","notifications_url":"https://api.github.com/repos/sky-uk/cqlmigrate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sky-uk/cqlmigrate/labels{/name}","releases_url":"https://api.github.com/repos/sky-uk/cqlmigrate/releases{/id}","created_at":"2015-10-06T12:11:27Z","updated_at":"2015-11-03T17:18:07Z","pushed_at":"2015-11-17T14:56:35Z","git_url":"git://github.com/sky-uk/cqlmigrate.git","ssh_url":"git@github.com:sky-uk/cqlmigrate.git","clone_url":"https://github.com/sky-uk/cqlmigrate.git","svn_url":"https://github.com/sky-uk/cqlmigrate","homepage":"","size":146,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1"},"html":{"href":"https://github.com/sky-uk/cqlmigrate/pull/1"},"issue":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/1"},"comments":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sky-uk/cqlmigrate/statuses/55da38eb0157f8f59b94795d4147d9095eb993e8"}}}}