{"action":"created","issue":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/955","repository_url":"https://api.github.com/repos/os-autoinst/openQA","labels_url":"https://api.github.com/repos/os-autoinst/openQA/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/os-autoinst/openQA/issues/955/comments","events_url":"https://api.github.com/repos/os-autoinst/openQA/issues/955/events","html_url":"https://github.com/os-autoinst/openQA/pull/955","id":184325348,"number":955,"title":"Rejig compressed asset download, don't leave compressed files","user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-10-20T19:57:16Z","updated_at":"2016-10-21T15:21:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/os-autoinst/openQA/pulls/955","html_url":"https://github.com/os-autoinst/openQA/pull/955","diff_url":"https://github.com/os-autoinst/openQA/pull/955.diff","patch_url":"https://github.com/os-autoinst/openQA/pull/955.patch"},"body":"There's two problems with the current compressed asset download\r\ncode:\r\n\r\n1) The compressed files will never be cleaned up\r\n2) Specifying FOO and FOO_DECOMPRESS_URL will not work\r\n\r\n1) is because the compressed file is download to the asset\r\ndirectory then uncompressed and left there; because the\r\ncompressed file itself will never be a job asset, the asset\r\ncleanup code will never clean it up.\r\n\r\n2) is because the current compressed asset download code always\r\nuncompresses the compressed file to the same file name with the\r\nfinal extension removed, even if you passed in a completely\r\ndifferent file name as the FOO parameter. In this situation,\r\nwe should uncompress the downloaded data to the name given as\r\nFOO in the appropriate path.\r\n\r\nThis should fix both problems. Instead of passing the path for\r\nthe compressed file from `schedule_iso` to `download_asset` and\r\nthen having `download_asset` decide the final uncompressed file\r\nname, we always pass the ultimately desired asset path, the\r\ndownload URL, and the uncompress flag from `schedule_iso` to\r\n`download_asset`. If decompression is requested, the downloaded\r\ndata is moved into a temporary file first and then uncompressed\r\nto the requested final asset path and the temp file removed. If\r\nnot, the downloaded data is directly moved to the requested\r\nfinal asset path.\r\n\r\nNote: I haven't tested this yet, I'm about to do a build with this and my other two PRs from today and deploy it to our staging instance for testing."},"comment":{"url":"https://api.github.com/repos/os-autoinst/openQA/issues/comments/255406590","html_url":"https://github.com/os-autoinst/openQA/pull/955#issuecomment-255406590","issue_url":"https://api.github.com/repos/os-autoinst/openQA/issues/955","id":255406590,"user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T15:21:58Z","updated_at":"2016-10-21T15:21:58Z","body":"I just rebuild the package any time I want to test it =)"}}
{"actor":{"display_login":"AdamWill"}}