{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/release-services/issues/1270","repository_url":"https://api.github.com/repos/mozilla/release-services","labels_url":"https://api.github.com/repos/mozilla/release-services/issues/1270/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/release-services/issues/1270/comments","events_url":"https://api.github.com/repos/mozilla/release-services/issues/1270/events","html_url":"https://github.com/mozilla/release-services/issues/1270","id":341895494,"node_id":"MDU6SXNzdWUzNDE4OTU0OTQ=","number":1270,"title":"shipit_bot_uplift: Automate Firefox patch uplifts","user":{"login":"jankeromnes","id":599268,"node_id":"MDQ6VXNlcjU5OTI2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/599268?v=4","gravatar_id":"","url":"https://api.github.com/users/jankeromnes","html_url":"https://github.com/jankeromnes","followers_url":"https://api.github.com/users/jankeromnes/followers","following_url":"https://api.github.com/users/jankeromnes/following{/other_user}","gists_url":"https://api.github.com/users/jankeromnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jankeromnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jankeromnes/subscriptions","organizations_url":"https://api.github.com/users/jankeromnes/orgs","repos_url":"https://api.github.com/users/jankeromnes/repos","events_url":"https://api.github.com/users/jankeromnes/events{/privacy}","received_events_url":"https://api.github.com/users/jankeromnes/received_events","type":"User","site_admin":false},"labels":[{"id":528690706,"node_id":"MDU6TGFiZWw1Mjg2OTA3MDY=","url":"https://api.github.com/repos/mozilla/release-services/labels/app:shipit_bot_uplift","name":"app:shipit_bot_uplift","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-17T12:21:40Z","updated_at":"2018-08-20T13:45:03Z","closed_at":null,"author_association":"MEMBER","body":"Every now and then, a Firefox patch needs to be uplifted (i.e. backported) from the development branch ([mozilla-central](https://hg.mozilla.org/mozilla-central/)) to a more stable branch (e.g. [mozilla-beta](https://hg.mozilla.org/releases/mozilla-beta/) or [mozilla-esr60](https://hg.mozilla.org/releases/mozilla-esr60/)), bypassing the normal release cycle.\r\n\r\nThis requires a special [approval process](https://wiki.mozilla.org/Release_Management/Uplift_rules), and incurs repeated manual work from the [Release Management](https://wiki.mozilla.org/Release_Management) team, with the risk of accidentally introducing new bugs to existing Firefox releases.\r\n\r\nThe uplift process is ripe for automation, and there are several opportunities for us to save time; move faster; and reduce the risk of introducing new bugs to Firefox releases.\r\n\r\nTODO:\r\n- [ ] react to new uplift requests, and run some basic sanity checks on the patch\r\n  - [ ] if it doesn't apply cleanly, clear the uplift request, and needinfo the patch author (so that they can rebase the patch)\r\n  - [ ] if possible, properly handle patch dependencies (e.g. apply batches of 7-8 patches, ordered by \"last resolved\" to preserve landing order)\r\n- [ ] react to uplift approvals (granted by relman), and automatically apply the patch to the targeted release branch (e.g. via Phabricator and Lando)\r\n  - [ ] check bugzilla report of approved uplift + not fixed on target branch\r\n  - [ ] graft mozilla-central changeset onto target branch (batch of 7-8 patches, order by \"last resolved\")\r\n  - [ ] edit the commit message with \"a=approver\" (relman) \r\n  - [ ] ... but defer the actual merging to a Human operator (e.g. a sheriff clicking on Lando's \"merge\" button)\r\n- [ ] finally, when we've gained sufficient confidence in our uplift bot, automatically trigger the final merge step as well\r\n  - [ ] also auto-fix bugzilla tracking flags using bugherder"},"comment":{"url":"https://api.github.com/repos/mozilla/release-services/issues/comments/414321425","html_url":"https://github.com/mozilla/release-services/issues/1270#issuecomment-414321425","issue_url":"https://api.github.com/repos/mozilla/release-services/issues/1270","id":414321425,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDMyMTQyNQ==","user":{"login":"jankeromnes","id":599268,"node_id":"MDQ6VXNlcjU5OTI2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/599268?v=4","gravatar_id":"","url":"https://api.github.com/users/jankeromnes","html_url":"https://github.com/jankeromnes","followers_url":"https://api.github.com/users/jankeromnes/followers","following_url":"https://api.github.com/users/jankeromnes/following{/other_user}","gists_url":"https://api.github.com/users/jankeromnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jankeromnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jankeromnes/subscriptions","organizations_url":"https://api.github.com/users/jankeromnes/orgs","repos_url":"https://api.github.com/users/jankeromnes/repos","events_url":"https://api.github.com/users/jankeromnes/events{/privacy}","received_events_url":"https://api.github.com/users/jankeromnes/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T13:45:03Z","updated_at":"2018-08-20T13:45:03Z","author_association":"MEMBER","body":"The upliftbot code now lives under [/src/uplift/bot/](https://github.com/mozilla/release-services/blob/master/src/uplift/bot/).\r\n\r\nEvery 60 minutes, the bot fetches all the bugs with an uplift approval-request flag (set to `?`):\r\n\r\nhttps://github.com/mozilla/release-services/blob/4786e978be95930eb7dc59f7560f550f5ff0783a/src/uplift/bot/uplift_bot/sync.py#L353-L364\r\n\r\n... and iterates over every patch (grouped by branch), trying to merge them like so:\r\n\r\nhttps://github.com/mozilla/release-services/blob/4786e978be95930eb7dc59f7560f550f5ff0783a/src/uplift/bot/uplift_bot/mercurial.py#L90-L121\r\n\r\n(Note: `is_mergeable` should probably be renamed to `merge` because it actually merges the patch.)\r\n\r\nWhen a merge fails, I believe it's simply reported to the uplift backend (along with other analysis results and bug data).\r\n\r\nInstead, when a merge fails, we should make the bot clear the uplift request in Bugzilla, and needinfo the patch author with a comment indicating that the patch didn't apply cleanly."}}
{"actor":{"display_login":"jankeromnes"}}