{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/sccache/issues/1","repository_url":"https://api.github.com/repos/mozilla/sccache","labels_url":"https://api.github.com/repos/mozilla/sccache/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/sccache/issues/1/comments","events_url":"https://api.github.com/repos/mozilla/sccache/issues/1/events","html_url":"https://github.com/mozilla/sccache/issues/1","id":151245644,"number":1,"title":"[feature-request] Support for S3 prefixes","user":{"login":"jonasfj","id":149732,"avatar_url":"https://avatars.githubusercontent.com/u/149732?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasfj","html_url":"https://github.com/jonasfj","followers_url":"https://api.github.com/users/jonasfj/followers","following_url":"https://api.github.com/users/jonasfj/following{/other_user}","gists_url":"https://api.github.com/users/jonasfj/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasfj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasfj/subscriptions","organizations_url":"https://api.github.com/users/jonasfj/orgs","repos_url":"https://api.github.com/users/jonasfj/repos","events_url":"https://api.github.com/users/jonasfj/events{/privacy}","received_events_url":"https://api.github.com/users/jonasfj/received_events","type":"User","site_admin":false},"labels":[{"id":364656921,"url":"https://api.github.com/repos/mozilla/sccache/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-04-26T21:39:48Z","updated_at":"2016-12-01T14:44:03Z","closed_at":null,"body":"Hi,\n\nI was discussing TC support for sscache with @gregarndt recently, and we found that it would be extremely nice if sscache supported S3 prefixes.\n\nEssentially, instead of giving sscache just a `bucket` we would like to give it `bucket` and a `prefix`.\nSuch that all keys are stored under the given prefix in the bucket.\n\nIn `taskcluster-auth` we have an end-point that given a scope `auth:aws-s3:read-write:<bucket>/<prefix>` will return temporary S3 credentials with read-write access to a specific subfolder/prefix on S3.\nWe already need a bucket for every region, not having to do separate buckets for try and production, would be nice. Instead we could just use separate prefixes, which we can grant access to using scopes.\n\nNotably, this will make it a lot easier if someone wanted to experiment with sscache and wanted isolated storage to avoid poisoning try or production. As giving such isolated storage would be a matter of issuing a scope, rather than creating a new bucket in every region.\n\nhttp://docs.taskcluster.net/auth/api-docs/#awsS3Credentials\n"},"comment":{"url":"https://api.github.com/repos/mozilla/sccache/issues/comments/264190574","html_url":"https://github.com/mozilla/sccache/issues/1#issuecomment-264190574","issue_url":"https://api.github.com/repos/mozilla/sccache/issues/1","id":264190574,"user":{"login":"luser","id":286001,"avatar_url":"https://avatars.githubusercontent.com/u/286001?v=3","gravatar_id":"","url":"https://api.github.com/users/luser","html_url":"https://github.com/luser","followers_url":"https://api.github.com/users/luser/followers","following_url":"https://api.github.com/users/luser/following{/other_user}","gists_url":"https://api.github.com/users/luser/gists{/gist_id}","starred_url":"https://api.github.com/users/luser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luser/subscriptions","organizations_url":"https://api.github.com/users/luser/orgs","repos_url":"https://api.github.com/users/luser/repos","events_url":"https://api.github.com/users/luser/events{/privacy}","received_events_url":"https://api.github.com/users/luser/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T14:44:03Z","updated_at":"2016-12-01T14:44:03Z","body":"Coming back around to this, it sounds like all we would need to do to support this feature would be to provide a way to set the prefix (an `SCCACHE_BUCKET_PREFIX` env var, say) and then for the S3 code to prefix key names with the prefix. Does that sound correct?\r\n\r\nSo if the bucket is 'my-sccache', instead of `GET http://my-sccache.s3.amazonaws.com/{key}` we would do `GET http://my-sccache.s3.amazonaws.com/{prefix}{key}`, and similarly for `PUT`. Does that sound correct?"}}
{"actor":{"display_login":"luser"}}