{"action":"created","issue":{"url":"https://api.github.com/repos/Wikia/app/issues/9273","labels_url":"https://api.github.com/repos/Wikia/app/issues/9273/labels{/name}","comments_url":"https://api.github.com/repos/Wikia/app/issues/9273/comments","events_url":"https://api.github.com/repos/Wikia/app/issues/9273/events","html_url":"https://github.com/Wikia/app/pull/9273","id":121194167,"number":9273,"title":"ForeignAPIRepo: fetch thumbs directly from Wikimedia","user":{"login":"macbre","id":1929317,"avatar_url":"https://avatars.githubusercontent.com/u/1929317?v=3","gravatar_id":"","url":"https://api.github.com/users/macbre","html_url":"https://github.com/macbre","followers_url":"https://api.github.com/users/macbre/followers","following_url":"https://api.github.com/users/macbre/following{/other_user}","gists_url":"https://api.github.com/users/macbre/gists{/gist_id}","starred_url":"https://api.github.com/users/macbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macbre/subscriptions","organizations_url":"https://api.github.com/users/macbre/orgs","repos_url":"https://api.github.com/users/macbre/repos","events_url":"https://api.github.com/users/macbre/events{/privacy}","received_events_url":"https://api.github.com/users/macbre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T09:27:16Z","updated_at":"2015-12-09T11:34:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Wikia/app/pulls/9273","html_url":"https://github.com/Wikia/app/pull/9273","diff_url":"https://github.com/Wikia/app/pull/9273.diff","patch_url":"https://github.com/Wikia/app/pull/9273.patch"},"body":"[PLATFORM-1735](https://wikia-inc.atlassian.net/browse/PLATFORM-1735) / [`$wgUseInstantCommons`](https://www.mediawiki.org/wiki/Manual:$wgUseInstantCommons)\r\n\r\n`ForeignAPIRepo` was trying to fetch and store thumbs on our DFS and use file-based locks on `/images`. This obviously did not work in our environment and caused a fallback to fetching thumbs directly from Wikimedia.\r\n\r\n```\r\nForeignAPIRepo: HTTP GET: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Kamas.jpg/250px-Kamas.jpg\r\nForeignAPIRepo::getThumbUrlFromCache could not write to thumb path\r\nBitmapHandler::doTransform: Transforming later per flags.\r\nwfReplaceImageServer: requested url https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Kamas.jpg/250px-Kamas.jpg\r\n```\r\n\r\n## Solution\r\n\r\nChange the `$wgForeignFileRepos` config that handles `$wgUseInstantCommons` setting to skip the thumbs caching step.\r\n\r\n```\r\nForeignAPIRepo::getThumbUrl got remote thumb https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Kamas.jpg/250px-Kamas.jpg\r\nBitmapHandler::doTransform: Transforming later per flags.\r\nwfReplaceImageServer: requested url https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Kamas.jpg/250px-Kamas.jpg\r\n```\r\n\r\n@wladekb / @pchojnacki / @michalroszka "},"comment":{"url":"https://api.github.com/repos/Wikia/app/issues/comments/163195450","html_url":"https://github.com/Wikia/app/pull/9273#issuecomment-163195450","issue_url":"https://api.github.com/repos/Wikia/app/issues/9273","id":163195450,"user":{"login":"macbre","id":1929317,"avatar_url":"https://avatars.githubusercontent.com/u/1929317?v=3","gravatar_id":"","url":"https://api.github.com/users/macbre","html_url":"https://github.com/macbre","followers_url":"https://api.github.com/users/macbre/followers","following_url":"https://api.github.com/users/macbre/following{/other_user}","gists_url":"https://api.github.com/users/macbre/gists{/gist_id}","starred_url":"https://api.github.com/users/macbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macbre/subscriptions","organizations_url":"https://api.github.com/users/macbre/orgs","repos_url":"https://api.github.com/users/macbre/repos","events_url":"https://api.github.com/users/macbre/events{/privacy}","received_events_url":"https://api.github.com/users/macbre/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T11:34:34Z","updated_at":"2015-12-09T11:34:34Z","body":":+1: "}}