{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments/193047124","pull_request_review_id":125938405,"id":193047124,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzA0NzEyNA==","diff_hunk":"@@ -79,6 +81,23 @@ def in_etc?\n       in_etc_crypttab?\n     end\n \n+    # Returns the absolute path to a file containing the encryption password\n+    #\n+    # To be used as a third field in the crypttab file\n+    #\n+    # @return [String]\n+    def password_file\n+      @password_file","path":"src/lib/y2storage/encryption.rb","position":19,"original_position":19,"commit_id":"6f40441483c5bf116f15a2fbc377ed63fc03bdbf","original_commit_id":"6f40441483c5bf116f15a2fbc377ed63fc03bdbf","user":{"login":"jreidinger","id":478871,"node_id":"MDQ6VXNlcjQ3ODg3MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/478871?v=4","gravatar_id":"","url":"https://api.github.com/users/jreidinger","html_url":"https://github.com/jreidinger","followers_url":"https://api.github.com/users/jreidinger/followers","following_url":"https://api.github.com/users/jreidinger/following{/other_user}","gists_url":"https://api.github.com/users/jreidinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jreidinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreidinger/subscriptions","organizations_url":"https://api.github.com/users/jreidinger/orgs","repos_url":"https://api.github.com/users/jreidinger/repos","events_url":"https://api.github.com/users/jreidinger/events{/privacy}","received_events_url":"https://api.github.com/users/jreidinger/received_events","type":"User","site_admin":false},"body":"you mention that it returns string, but in fact it can also return nil. So allow to return nil in documentation or ensure that nil cannot be returned.","created_at":"2018-06-05T12:07:43Z","updated_at":"2018-06-05T12:07:43Z","html_url":"https://github.com/yast/yast-storage-ng/pull/655#discussion_r193047124","pull_request_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments/193047124"},"html":{"href":"https://github.com/yast/yast-storage-ng/pull/655#discussion_r193047124"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655","id":192678271,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNjc4Mjcx","html_url":"https://github.com/yast/yast-storage-ng/pull/655","diff_url":"https://github.com/yast/yast-storage-ng/pull/655.diff","patch_url":"https://github.com/yast/yast-storage-ng/pull/655.patch","issue_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/655","number":655,"state":"open","locked":false,"title":"[WIP] [RFC] Allows to use a random encryption pwd when filesystem support it","user":{"login":"dgdavid","id":1691872,"node_id":"MDQ6VXNlcjE2OTE4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1691872?v=4","gravatar_id":"","url":"https://api.github.com/users/dgdavid","html_url":"https://github.com/dgdavid","followers_url":"https://api.github.com/users/dgdavid/followers","following_url":"https://api.github.com/users/dgdavid/following{/other_user}","gists_url":"https://api.github.com/users/dgdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dgdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgdavid/subscriptions","organizations_url":"https://api.github.com/users/dgdavid/orgs","repos_url":"https://api.github.com/users/dgdavid/repos","events_url":"https://api.github.com/users/dgdavid/events{/privacy}","received_events_url":"https://api.github.com/users/dgdavid/received_events","type":"User","site_admin":false},"body":"Hi there!\r\n\r\nThis PR tries to resolve the [issue with encryption of swap partitions](https://paste.opensuse.org/14479832) allowing to user sets the encryption password as random when filesystem supports it.\r\n\r\nI am opening it as a request for comments because I need your feedback, opinion, and hints to finish it and, at least in this case, it seems to me a better way that shooting questions in the IRC channel. I mean, at this point maybe async feedback is a better choice.\r\n\r\nSo, let me to leave right here some questions, doubts or alternatives that I thought for which I want to know your feedback about them.\r\n\r\n* Regarding `#finish` method in Filesystem controller, I am not happy at all with nested conditionals. I tried to extract the creation of encryption to a separated method, but it looks a little weird to have the creation in a dedicated method and the deletion directly inside the conditional. Even more, this approach continues growing the length of controller, which has a `TODO` suggesting to split and reduce it.\r\n\r\n  An alternative could be to move the logic inside `to_be_encrypted?` branch to a new `#set_encryption` method at [BlkDevice model](https://github.com/yast/yast-storage-ng/blob/7d909a43f606a257437fa34afbe24bb09b99d332/src/lib/y2storage/blk_device.rb#L32), but I am not sure if it should be within the scope of this PR or not. In addition, I must admit that I do not know if that could collide or overlap with the [`create_encryption` factory method](https://github.com/yast/yast-storage-ng/blob/7d909a43f606a257437fa34afbe24bb09b99d332/src/lib/y2storage/fake_device_factory.rb#L542) since there are few lines doing exactly the same. Thoughts?\r\n\r\n* I simulated the API to add the path to the password file to the crypttab in `Y2Storage::Encryption` class, adding temporary `password_file` and `password_file=` methods. Here is where I think I need the @joseivanlopez's help, as was said in the IRC channel last Friday. Isn't it?\r\n\r\n* I am not sure if breaking the help string in two different parts is a good idea or, instead, a problem for translators.\r\n\r\nRemember that UI was discussed in the IRC channel last Friday, when I proposed both, one [using a checkbox](https://paste.opensuse.org/29804956) and [this with radio buttons]( https://paste.opensuse.org/14479832).\r\n\r\nThanks in advance :)","created_at":"2018-06-05T11:42:34Z","updated_at":"2018-06-05T12:07:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53297a61e8f6af11331c026ec220fe58ebadcf43","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655/commits","review_comments_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655/comments","review_comment_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/655/comments","statuses_url":"https://api.github.com/repos/yast/yast-storage-ng/statuses/6f40441483c5bf116f15a2fbc377ed63fc03bdbf","head":{"label":"dgdavid:feature/allow-random-pw-for-swap-partitions","ref":"feature/allow-random-pw-for-swap-partitions","sha":"6f40441483c5bf116f15a2fbc377ed63fc03bdbf","user":{"login":"dgdavid","id":1691872,"node_id":"MDQ6VXNlcjE2OTE4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1691872?v=4","gravatar_id":"","url":"https://api.github.com/users/dgdavid","html_url":"https://github.com/dgdavid","followers_url":"https://api.github.com/users/dgdavid/followers","following_url":"https://api.github.com/users/dgdavid/following{/other_user}","gists_url":"https://api.github.com/users/dgdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dgdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgdavid/subscriptions","organizations_url":"https://api.github.com/users/dgdavid/orgs","repos_url":"https://api.github.com/users/dgdavid/repos","events_url":"https://api.github.com/users/dgdavid/events{/privacy}","received_events_url":"https://api.github.com/users/dgdavid/received_events","type":"User","site_admin":false},"repo":{"id":135930639,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU5MzA2Mzk=","name":"yast-storage-ng","full_name":"dgdavid/yast-storage-ng","owner":{"login":"dgdavid","id":1691872,"node_id":"MDQ6VXNlcjE2OTE4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1691872?v=4","gravatar_id":"","url":"https://api.github.com/users/dgdavid","html_url":"https://github.com/dgdavid","followers_url":"https://api.github.com/users/dgdavid/followers","following_url":"https://api.github.com/users/dgdavid/following{/other_user}","gists_url":"https://api.github.com/users/dgdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/dgdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgdavid/subscriptions","organizations_url":"https://api.github.com/users/dgdavid/orgs","repos_url":"https://api.github.com/users/dgdavid/repos","events_url":"https://api.github.com/users/dgdavid/events{/privacy}","received_events_url":"https://api.github.com/users/dgdavid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgdavid/yast-storage-ng","description":"Rewrite of https://github.com/yast/yast-storage","fork":true,"url":"https://api.github.com/repos/dgdavid/yast-storage-ng","forks_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/forks","keys_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/teams","hooks_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/hooks","issue_events_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/issues/events{/number}","events_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/events","assignees_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/assignees{/user}","branches_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/branches{/branch}","tags_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/tags","blobs_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/languages","stargazers_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/stargazers","contributors_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/contributors","subscribers_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/subscribers","subscription_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/subscription","commits_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/contents/{+path}","compare_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/merges","archive_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/downloads","issues_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/issues{/number}","pulls_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/labels{/name}","releases_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/releases{/id}","deployments_url":"https://api.github.com/repos/dgdavid/yast-storage-ng/deployments","created_at":"2018-06-03T18:40:14Z","updated_at":"2018-06-03T18:40:18Z","pushed_at":"2018-06-05T11:25:59Z","git_url":"git://github.com/dgdavid/yast-storage-ng.git","ssh_url":"git@github.com:dgdavid/yast-storage-ng.git","clone_url":"https://github.com/dgdavid/yast-storage-ng.git","svn_url":"https://github.com/dgdavid/yast-storage-ng","homepage":"http://yast.github.io/","size":5712,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"7d909a43f606a257437fa34afbe24bb09b99d332","user":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":46064409,"node_id":"MDEwOlJlcG9zaXRvcnk0NjA2NDQwOQ==","name":"yast-storage-ng","full_name":"yast/yast-storage-ng","owner":{"login":"yast","id":909990,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwOTk5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/909990?v=4","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-storage-ng","description":"Rewrite of https://github.com/yast/yast-storage","fork":false,"url":"https://api.github.com/repos/yast/yast-storage-ng","forks_url":"https://api.github.com/repos/yast/yast-storage-ng/forks","keys_url":"https://api.github.com/repos/yast/yast-storage-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-storage-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-storage-ng/teams","hooks_url":"https://api.github.com/repos/yast/yast-storage-ng/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-storage-ng/events","assignees_url":"https://api.github.com/repos/yast/yast-storage-ng/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-storage-ng/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-storage-ng/tags","blobs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-storage-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-storage-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-storage-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-storage-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-storage-ng/languages","stargazers_url":"https://api.github.com/repos/yast/yast-storage-ng/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-storage-ng/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-storage-ng/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-storage-ng/subscription","commits_url":"https://api.github.com/repos/yast/yast-storage-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-storage-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-storage-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-storage-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-storage-ng/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-storage-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-storage-ng/merges","archive_url":"https://api.github.com/repos/yast/yast-storage-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-storage-ng/downloads","issues_url":"https://api.github.com/repos/yast/yast-storage-ng/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-storage-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-storage-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-storage-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-storage-ng/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-storage-ng/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-storage-ng/deployments","created_at":"2015-11-12T16:09:03Z","updated_at":"2018-06-04T16:01:28Z","pushed_at":"2018-06-05T11:42:35Z","git_url":"git://github.com/yast/yast-storage-ng.git","ssh_url":"git@github.com:yast/yast-storage-ng.git","clone_url":"https://github.com/yast/yast-storage-ng.git","svn_url":"https://github.com/yast/yast-storage-ng","homepage":"http://yast.github.io/","size":5732,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":15,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655"},"html":{"href":"https://github.com/yast/yast-storage-ng/pull/655"},"issue":{"href":"https://api.github.com/repos/yast/yast-storage-ng/issues/655"},"comments":{"href":"https://api.github.com/repos/yast/yast-storage-ng/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-storage-ng/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-storage-ng/statuses/6f40441483c5bf116f15a2fbc377ed63fc03bdbf"}},"author_association":"NONE"}}
{"actor":{"display_login":"jreidinger"}}