GitHub PullRequestReviewCommentEvent at 2014-11-17 14:33:34
Repository: tk-core
Actor: alandann
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/comments/20437995","id":20437995,"diff_hunk":"@@ -129,6 +130,28 @@ def from_path(path):\n     :returns: Pipeline Configuration object\n     \"\"\"\n \n+    try:\n+        pc = _from_path(path, force=False)\n+    except TankError:\n+        # lookup failed! This may be because there are missing items\n+        # in the cache. For failures, try again, but this time\n+        # force re-read the cache (e.g connect to shotgun)\n+        # if the previous failure was due to a missing item\n+        # in the cache, \n+        pc = _from_path(path, force=True)","path":"python/tank/pipelineconfig_factory.py","position":29,"original_position":29,"commit_id":"0d2051bad91e96761c9a098b794b74a709727c5a","original_commit_id":"0d2051bad91e96761c9a098b794b74a709727c5a","user":{"login":"alandann","id":2451760,"avatar_url":"https://avatars.githubusercontent.com/u/2451760?v=3","gravatar_id":"","url":"https://api.github.com/users/alandann","html_url":"https://github.com/alandann","followers_url":"https://api.github.com/users/alandann/followers","following_url":"https://api.github.com/users/alandann/following{/other_user}","gists_url":"https://api.github.com/users/alandann/gists{/gist_id}","starred_url":"https://api.github.com/users/alandann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alandann/subscriptions","organizations_url":"https://api.github.com/users/alandann/orgs","repos_url":"https://api.github.com/users/alandann/repos","events_url":"https://api.github.com/users/alandann/events{/privacy}","received_events_url":"https://api.github.com/users/alandann/received_events","type":"User","site_admin":false},"body":"This is going to run for all TankError exceptions but it looks like _from_path can raise TankError's for other non-cache related problems - would it be worth specialising this or is this ok?","created_at":"2014-11-17T14:33:34Z","updated_at":"2014-11-17T14:33:34Z","html_url":"https://github.com/shotgunsoftware/tk-core/pull/115#discussion_r20437995","pull_request_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/comments/20437995"},"html":{"href":"https://github.com/shotgunsoftware/tk-core/pull/115#discussion_r20437995"},"pull_request":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115","id":24538151,"html_url":"https://github.com/shotgunsoftware/tk-core/pull/115","diff_url":"https://github.com/shotgunsoftware/tk-core/pull/115.diff","patch_url":"https://github.com/shotgunsoftware/tk-core/pull/115.patch","issue_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/115","number":115,"state":"open","locked":false,"title":"#27253 Fixes regression in 0.15 with cloned pipeline configuration init","user":{"login":"manneohrstrom","id":337710,"avatar_url":"https://avatars.githubusercontent.com/u/337710?v=3","gravatar_id":"","url":"https://api.github.com/users/manneohrstrom","html_url":"https://github.com/manneohrstrom","followers_url":"https://api.github.com/users/manneohrstrom/followers","following_url":"https://api.github.com/users/manneohrstrom/following{/other_user}","gists_url":"https://api.github.com/users/manneohrstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/manneohrstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manneohrstrom/subscriptions","organizations_url":"https://api.github.com/users/manneohrstrom/orgs","repos_url":"https://api.github.com/users/manneohrstrom/repos","events_url":"https://api.github.com/users/manneohrstrom/events{/privacy}","received_events_url":"https://api.github.com/users/manneohrstrom/received_events","type":"User","site_admin":false},"body":"In 0.15.x, the pipeline configuration data is cached in a new way, eliminating the need for one of the lookup files in the project storage location. There was however, a regression, caused by the fact that the cache was not refreshed from Shotgun unless there was a full cache miss - e.g. the entire project was missing from the pipeline configuration. If there was a primary config present for a project in the cache, the cache was deemed as being valid. This meant that if someone cloned the primary config, the data about the clone would not appear in the cache and toolkit would think that the clone location was not a valid pipeline configuration.\r\n\r\nThis change fixes this issue by adding a higher-level try/catch, making it more consistent with the behaviour in the `sgtk.from_entity()` method.","created_at":"2014-11-17T14:21:56Z","updated_at":"2014-11-17T14:33:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ead234ef2ec50d310b9e1fd1c319c3e9658beda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115/commits","review_comments_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115/comments","review_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/115/comments","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-core/statuses/0d2051bad91e96761c9a098b794b74a709727c5a","head":{"label":"shotgunsoftware:27253_clone_bug","ref":"27253_clone_bug","sha":"0d2051bad91e96761c9a098b794b74a709727c5a","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":4270061,"name":"tk-core","full_name":"shotgunsoftware/tk-core","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-core","description":"The Shotgun Pipeline Toolkit Core API","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-core","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-core/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-core/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-core/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-core/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-core/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-core/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-core/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-core/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-core/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-core/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-core/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-core/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-core/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-core/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-core/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-core/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-core/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-core/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-core/releases{/id}","created_at":"2012-05-09T09:12:06Z","updated_at":"2014-11-10T19:16:15Z","pushed_at":"2014-11-17T14:09:19Z","git_url":"git://github.com/shotgunsoftware/tk-core.git","ssh_url":"git@github.com:shotgunsoftware/tk-core.git","clone_url":"https://github.com/shotgunsoftware/tk-core.git","svn_url":"https://github.com/shotgunsoftware/tk-core","homepage":"","size":42394,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":12,"default_branch":"master"}},"base":{"label":"shotgunsoftware:master","ref":"master","sha":"0ab933b2d2e3e25917778e64a6473fed95c9b833","user":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":4270061,"name":"tk-core","full_name":"shotgunsoftware/tk-core","owner":{"login":"shotgunsoftware","id":317894,"avatar_url":"https://avatars.githubusercontent.com/u/317894?v=3","gravatar_id":"","url":"https://api.github.com/users/shotgunsoftware","html_url":"https://github.com/shotgunsoftware","followers_url":"https://api.github.com/users/shotgunsoftware/followers","following_url":"https://api.github.com/users/shotgunsoftware/following{/other_user}","gists_url":"https://api.github.com/users/shotgunsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/shotgunsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotgunsoftware/subscriptions","organizations_url":"https://api.github.com/users/shotgunsoftware/orgs","repos_url":"https://api.github.com/users/shotgunsoftware/repos","events_url":"https://api.github.com/users/shotgunsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/shotgunsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shotgunsoftware/tk-core","description":"The Shotgun Pipeline Toolkit Core API","fork":false,"url":"https://api.github.com/repos/shotgunsoftware/tk-core","forks_url":"https://api.github.com/repos/shotgunsoftware/tk-core/forks","keys_url":"https://api.github.com/repos/shotgunsoftware/tk-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shotgunsoftware/tk-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shotgunsoftware/tk-core/teams","hooks_url":"https://api.github.com/repos/shotgunsoftware/tk-core/hooks","issue_events_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/events{/number}","events_url":"https://api.github.com/repos/shotgunsoftware/tk-core/events","assignees_url":"https://api.github.com/repos/shotgunsoftware/tk-core/assignees{/user}","branches_url":"https://api.github.com/repos/shotgunsoftware/tk-core/branches{/branch}","tags_url":"https://api.github.com/repos/shotgunsoftware/tk-core/tags","blobs_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shotgunsoftware/tk-core/statuses/{sha}","languages_url":"https://api.github.com/repos/shotgunsoftware/tk-core/languages","stargazers_url":"https://api.github.com/repos/shotgunsoftware/tk-core/stargazers","contributors_url":"https://api.github.com/repos/shotgunsoftware/tk-core/contributors","subscribers_url":"https://api.github.com/repos/shotgunsoftware/tk-core/subscribers","subscription_url":"https://api.github.com/repos/shotgunsoftware/tk-core/subscription","commits_url":"https://api.github.com/repos/shotgunsoftware/tk-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/shotgunsoftware/tk-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/shotgunsoftware/tk-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/shotgunsoftware/tk-core/contents/{+path}","compare_url":"https://api.github.com/repos/shotgunsoftware/tk-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shotgunsoftware/tk-core/merges","archive_url":"https://api.github.com/repos/shotgunsoftware/tk-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shotgunsoftware/tk-core/downloads","issues_url":"https://api.github.com/repos/shotgunsoftware/tk-core/issues{/number}","pulls_url":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls{/number}","milestones_url":"https://api.github.com/repos/shotgunsoftware/tk-core/milestones{/number}","notifications_url":"https://api.github.com/repos/shotgunsoftware/tk-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shotgunsoftware/tk-core/labels{/name}","releases_url":"https://api.github.com/repos/shotgunsoftware/tk-core/releases{/id}","created_at":"2012-05-09T09:12:06Z","updated_at":"2014-11-10T19:16:15Z","pushed_at":"2014-11-17T14:09:19Z","git_url":"git://github.com/shotgunsoftware/tk-core.git","ssh_url":"git@github.com:shotgunsoftware/tk-core.git","clone_url":"https://github.com/shotgunsoftware/tk-core.git","svn_url":"https://github.com/shotgunsoftware/tk-core","homepage":"","size":42394,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115"},"html":{"href":"https://github.com/shotgunsoftware/tk-core/pull/115"},"issue":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/115"},"comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/shotgunsoftware/tk-core/statuses/0d2051bad91e96761c9a098b794b74a709727c5a"}}}}