{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/mysql/issues/402","repository_url":"https://api.github.com/repos/docker-library/mysql","labels_url":"https://api.github.com/repos/docker-library/mysql/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/mysql/issues/402/comments","events_url":"https://api.github.com/repos/docker-library/mysql/issues/402/events","html_url":"https://github.com/docker-library/mysql/pull/402","id":313097973,"number":402,"title":"move init-file processing into a function","user":{"login":"wpalmer","id":357044,"avatar_url":"https://avatars0.githubusercontent.com/u/357044?v=4","gravatar_id":"","url":"https://api.github.com/users/wpalmer","html_url":"https://github.com/wpalmer","followers_url":"https://api.github.com/users/wpalmer/followers","following_url":"https://api.github.com/users/wpalmer/following{/other_user}","gists_url":"https://api.github.com/users/wpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/wpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpalmer/subscriptions","organizations_url":"https://api.github.com/users/wpalmer/orgs","repos_url":"https://api.github.com/users/wpalmer/repos","events_url":"https://api.github.com/users/wpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/wpalmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-10T21:35:47Z","updated_at":"2018-04-10T21:46:56Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/docker-library/mysql/pulls/402","html_url":"https://github.com/docker-library/mysql/pull/402","diff_url":"https://github.com/docker-library/mysql/pull/402.diff","patch_url":"https://github.com/docker-library/mysql/pull/402.patch"},"body":"I have often found myself deriving the mysql image in order to make\r\nit easier to process initialisation files in multiple paths, or to change\r\nthe rules used for processing such initialisation files. After having\r\nmade such extensions repeatedly, I have now attempted to clean\r\nthem up and make them generic enough for inclusion into the\r\nupstream repository.\r\n\r\nfiles found within /docker-entrypoint-initdb.d/* are processed using\r\nspecific rules based on their filename. It was previously difficult to\r\nre-use this logic recursively, or to add logic for handling additional\r\nfiletypes.\r\n\r\nBy moving this logic into a shell function, we both enable inner shell\r\nscripts to easily re-use the same logic (for example, for including\r\nfiles from additional directories or sub-directories), and the\r\npossibility of overriding these processing rules entirely, for example\r\nto enable handling of additional filename patterns.\r\n\r\nThere is a potential change of functionality compared to the previous\r\nversion: the mysql command can no-longer be overridden by changing the\r\nmysql variable. Instead, the mysql command may be overridden only by\r\noverriding the process_init_file() function.\r\n\r\nThere is a potentially loss of functionality in that included scripts\r\ncan no-longer use \"break\" to escape the file loop. There is presently\r\nno work-around for this, as this is not expected to have been an\r\nintended feature."},"comment":{"url":"https://api.github.com/repos/docker-library/mysql/issues/comments/380257988","html_url":"https://github.com/docker-library/mysql/pull/402#issuecomment-380257988","issue_url":"https://api.github.com/repos/docker-library/mysql/issues/402","id":380257988,"user":{"login":"wpalmer","id":357044,"avatar_url":"https://avatars0.githubusercontent.com/u/357044?v=4","gravatar_id":"","url":"https://api.github.com/users/wpalmer","html_url":"https://github.com/wpalmer","followers_url":"https://api.github.com/users/wpalmer/followers","following_url":"https://api.github.com/users/wpalmer/following{/other_user}","gists_url":"https://api.github.com/users/wpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/wpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpalmer/subscriptions","organizations_url":"https://api.github.com/users/wpalmer/orgs","repos_url":"https://api.github.com/users/wpalmer/repos","events_url":"https://api.github.com/users/wpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/wpalmer/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T21:46:56Z","updated_at":"2018-04-10T21:46:56Z","author_association":"NONE","body":"though automated travis-ci has failed, (if I am reading the log correctly) these failures appear to be unrelated to the requested change."}}
{"actor":{"display_login":"wpalmer"}}