{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/comments/242878438","pull_request_review_id":186496031,"id":242878438,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mjg3ODQzOA==","diff_hunk":"@@ -0,0 +1,186 @@\n+package blobclient\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/url\"\n+\t\"strings\"\n+\n+\t\"github.com/giantswarm/microerror\"\n+\n+\t\"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage\"\n+\t\"github.com/Azure/azure-storage-blob-go/azblob\"\n+)\n+\n+const (\n+\tblobFormatString      = `https://%s.blob.core.windows.net`\n+\tresourceNotFoundError = \"NotFound\"\n+\tmaxRetriesRequests    = 3\n+)\n+\n+type Config struct {\n+\tContainerName         string\n+\tGroupName             string\n+\tStorageAccountName    string\n+\tStorageAccountsClient *storage.AccountsClient\n+}\n+\n+type BlobClient struct {\n+\tcontainerName         string\n+\tgroupName             string\n+\tstorageAccountName    string\n+\tstorageAccountsClient *storage.AccountsClient\n+\n+\t// containerURL is configured separately from the default\n+\t// parameters.\n+\tcontainerURL azblob.ContainerURL\n+}\n+\n+func (c *BlobClient) Boot(ctx context.Context) error {\n+\tvar containerURL azblob.ContainerURL\n+\n+\tkey, err := c.getAccountPrimaryKey(ctx)\n+\tif err != nil {\n+\t\treturn microerror.Mask(err)\n+\t}\n+\n+\tsc, err := azblob.NewSharedKeyCredential(c.storageAccountName, key)\n+\tif err != nil {\n+\t\treturn microerror.Mask(err)\n+\t}\n+\n+\tp := azblob.NewPipeline(sc, azblob.PipelineOptions{})\n+\tu, _ := url.Parse(fmt.Sprintf(blobFormatString, c.storageAccountName))\n+\tservice := azblob.NewServiceURL(*u, p)\n+\tcontainerURL = service.NewContainerURL(c.containerName)\n+\t_, err = containerURL.GetProperties(ctx, azblob.LeaseAccessConditions{})\n+\tif IsContainerNotFound(err) {\n+\t\treturn nil","path":"service/controller/v5/blobclient/blob_client.go","position":58,"original_position":59,"commit_id":"2d4af7837c564d3eb15773fde93d045c1a5c312b","original_commit_id":"63006fa47ccf74abd77f8b30224361300001d91a","user":{"login":"corest","id":1071648,"node_id":"MDQ6VXNlcjEwNzE2NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1071648?v=4","gravatar_id":"","url":"https://api.github.com/users/corest","html_url":"https://github.com/corest","followers_url":"https://api.github.com/users/corest/followers","following_url":"https://api.github.com/users/corest/following{/other_user}","gists_url":"https://api.github.com/users/corest/gists{/gist_id}","starred_url":"https://api.github.com/users/corest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corest/subscriptions","organizations_url":"https://api.github.com/users/corest/orgs","repos_url":"https://api.github.com/users/corest/repos","events_url":"https://api.github.com/users/corest/events{/privacy}","received_events_url":"https://api.github.com/users/corest/received_events","type":"User","site_admin":false},"body":"But in this case, we can just drop this additional check as on the next line we have the same masked error return. So It will be handled here https://github.com/giantswarm/azure-operator/pull/395/files#diff-0b6d094c4f73237335bfcd04bfb277c5R53","created_at":"2018-12-19T11:13:48Z","updated_at":"2018-12-19T11:13:49Z","html_url":"https://github.com/giantswarm/azure-operator/pull/395#discussion_r242878438","pull_request_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/comments/242878438"},"html":{"href":"https://github.com/giantswarm/azure-operator/pull/395#discussion_r242878438"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395"}},"in_reply_to_id":242457367},"pull_request":{"url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395","id":226978141,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTc4MTQx","html_url":"https://github.com/giantswarm/azure-operator/pull/395","diff_url":"https://github.com/giantswarm/azure-operator/pull/395.diff","patch_url":"https://github.com/giantswarm/azure-operator/pull/395.patch","issue_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/395","number":395,"state":"open","locked":false,"title":"Add blobobject resource","user":{"login":"corest","id":1071648,"node_id":"MDQ6VXNlcjEwNzE2NDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1071648?v=4","gravatar_id":"","url":"https://api.github.com/users/corest","html_url":"https://github.com/corest","followers_url":"https://api.github.com/users/corest/followers","following_url":"https://api.github.com/users/corest/following{/other_user}","gists_url":"https://api.github.com/users/corest/gists{/gist_id}","starred_url":"https://api.github.com/users/corest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corest/subscriptions","organizations_url":"https://api.github.com/users/corest/orgs","repos_url":"https://api.github.com/users/corest/repos","events_url":"https://api.github.com/users/corest/events{/privacy}","received_events_url":"https://api.github.com/users/corest/received_events","type":"User","site_admin":false},"body":"Towards https://github.com/giantswarm/giantswarm/issues/2816\r\n\r\nThis is gonna create cloudconfig objects in the storage account/container. There are no tests for now, because I need to check a general approach and then will work on tests. But I'd like to get some feedback for the current state.","created_at":"2018-10-30T15:49:53Z","updated_at":"2018-12-19T11:13:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac7f91981e51c515a20936bc61dd38b016c173c1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395/commits","review_comments_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395/comments","review_comment_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/395/comments","statuses_url":"https://api.github.com/repos/giantswarm/azure-operator/statuses/2d4af7837c564d3eb15773fde93d045c1a5c312b","head":{"label":"giantswarm:blob_object","ref":"blob_object","sha":"2d4af7837c564d3eb15773fde93d045c1a5c312b","user":{"login":"giantswarm","id":7556340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NTYzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":99101543,"node_id":"MDEwOlJlcG9zaXRvcnk5OTEwMTU0Mw==","name":"azure-operator","full_name":"giantswarm/azure-operator","private":false,"owner":{"login":"giantswarm","id":7556340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NTYzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/giantswarm/azure-operator","description":"Azure operator manages Kubernetes clusters running in in a Giant Swarm installation on Azure","fork":false,"url":"https://api.github.com/repos/giantswarm/azure-operator","forks_url":"https://api.github.com/repos/giantswarm/azure-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/azure-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/azure-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/azure-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/azure-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/azure-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/azure-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/azure-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/azure-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/azure-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/azure-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/azure-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/azure-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/azure-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/azure-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/azure-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/azure-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/azure-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/azure-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/azure-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/azure-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/azure-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/azure-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/azure-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/azure-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/azure-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/azure-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/azure-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/azure-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/azure-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/azure-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/azure-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/azure-operator/deployments","created_at":"2017-08-02T10:00:21Z","updated_at":"2018-12-18T20:22:27Z","pushed_at":"2018-12-19T10:42:17Z","git_url":"git://github.com/giantswarm/azure-operator.git","ssh_url":"git@github.com:giantswarm/azure-operator.git","clone_url":"https://github.com/giantswarm/azure-operator.git","svn_url":"https://github.com/giantswarm/azure-operator","homepage":"https://giantswarm.io/","size":64166,"stargazers_count":16,"watchers_count":16,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":18,"watchers":16,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"a364c684894e6215669c822a3ddaf87192e317bb","user":{"login":"giantswarm","id":7556340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NTYzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":99101543,"node_id":"MDEwOlJlcG9zaXRvcnk5OTEwMTU0Mw==","name":"azure-operator","full_name":"giantswarm/azure-operator","private":false,"owner":{"login":"giantswarm","id":7556340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc1NTYzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/7556340?v=4","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/giantswarm/azure-operator","description":"Azure operator manages Kubernetes clusters running in in a Giant Swarm installation on Azure","fork":false,"url":"https://api.github.com/repos/giantswarm/azure-operator","forks_url":"https://api.github.com/repos/giantswarm/azure-operator/forks","keys_url":"https://api.github.com/repos/giantswarm/azure-operator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/azure-operator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/azure-operator/teams","hooks_url":"https://api.github.com/repos/giantswarm/azure-operator/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/azure-operator/events","assignees_url":"https://api.github.com/repos/giantswarm/azure-operator/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/azure-operator/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/azure-operator/tags","blobs_url":"https://api.github.com/repos/giantswarm/azure-operator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/azure-operator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/azure-operator/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/azure-operator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/azure-operator/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/azure-operator/languages","stargazers_url":"https://api.github.com/repos/giantswarm/azure-operator/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/azure-operator/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/azure-operator/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/azure-operator/subscription","commits_url":"https://api.github.com/repos/giantswarm/azure-operator/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/azure-operator/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/azure-operator/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/azure-operator/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/azure-operator/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/azure-operator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/azure-operator/merges","archive_url":"https://api.github.com/repos/giantswarm/azure-operator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/azure-operator/downloads","issues_url":"https://api.github.com/repos/giantswarm/azure-operator/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/azure-operator/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/azure-operator/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/azure-operator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/azure-operator/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/azure-operator/releases{/id}","deployments_url":"https://api.github.com/repos/giantswarm/azure-operator/deployments","created_at":"2017-08-02T10:00:21Z","updated_at":"2018-12-18T20:22:27Z","pushed_at":"2018-12-19T10:42:17Z","git_url":"git://github.com/giantswarm/azure-operator.git","ssh_url":"git@github.com:giantswarm/azure-operator.git","clone_url":"https://github.com/giantswarm/azure-operator.git","svn_url":"https://github.com/giantswarm/azure-operator","homepage":"https://giantswarm.io/","size":64166,"stargazers_count":16,"watchers_count":16,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":18,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395"},"html":{"href":"https://github.com/giantswarm/azure-operator/pull/395"},"issue":{"href":"https://api.github.com/repos/giantswarm/azure-operator/issues/395"},"comments":{"href":"https://api.github.com/repos/giantswarm/azure-operator/issues/395/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/azure-operator/pulls/395/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/azure-operator/statuses/2d4af7837c564d3eb15773fde93d045c1a5c312b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"corest"}}