Release Management/Requesting an Uplift: Difference between revisions
(Updated the moz-phab uplifts steps to mention git and conflicts) |
(Update manual cherry-pick section to match what is currently necessary. Also reformat the page to make it easier to read, using sub-bullets, and using code annotations.) |
||
| Line 20: | Line 20: | ||
=== Requesting Uplift using Lando === | === Requesting Uplift using Lando === | ||
# | # Go to the Lando page for the stack of revisions to uplift. | ||
# | #* Note: the maximum stack size for use in the web UI is 5 patches. Please use moz-phab to submit larger patch stacks. | ||
# ' | #* You can get here from the Phabricator revision by using the “View stack in Lando” option on the right side menu. | ||
# | # Click the Log In button in the top right of Lando, if you're not already logged in. | ||
# | # If you haven't added a Phabricator API token (or it has expired i.e. you don't see the Request Uplift button), click your username in the top right corner and paste the Phabricator API token there. | ||
#* Tokens are in the form ''api-XXXXX…''. This token can be found here (replace <code><USERNAME></code> with your phab username): <code>https://phabricator.services.mozilla.com/settings/user/<USERNAME>/page/apitokens/</code> [[File:Lando-phab-api-token.png|thumb|Click your username in the top right corner and paste the Phabricator API token there.]] | |||
# Click the “Request Uplift” button. There should be a new button on the bottom right of the modal that is shown. | |||
# Select the target repo (beta) from the list and click “request uplift”. | |||
#* This will create a new Phabricator diff against the requested target. [[File:Request-uplift-button-lando.png|thumb|Click the "Request uplift" button in the bottom right.]] | |||
# Complete the uplift request form in the newly created diff. See the section below on how to submit the form. | |||
| Line 30: | Line 35: | ||
If your Phabricator revision(s) require more attention, perhaps because it's expected they won't apply cleanly to the target, you'll need to apply the commit locally and submit using moz-phab. | If your Phabricator revision(s) require more attention, perhaps because it's expected they won't apply cleanly to the target, you'll need to apply the commit locally and submit using moz-phab. | ||
'''Note:''' you must use <code>moz-phab uplift</code>, not <code>moz-phab submit</code> or any other unsupported tool to submit uplift requests. | |||
=== Requesting Uplift using ''moz-phab'' === | === Requesting Uplift using ''moz-phab'' === | ||
# | # Ensure you are using the [https://github.com/mozilla-firefox/firefox mozilla-firefox] repository. | ||
# | # Switch to the appropriate branch (e.g. beta, ESR140, etc.). | ||
# | # Make sure your local repository is up to date with the target branch head. | ||
# | # Find the patch or series of patches in your local VCS. | ||
# | #* You can <code>moz-phab patch</code> patches onto your local machine if need be. | ||
# | # Use <code>moz-phab uplift --list-trains</code> to determine which uplift train you want to request an uplift for. | ||
# | #* Note: Train names generally start with <code>firefox-</code> and are not simply the branch name. | ||
# Run <code>moz-phab uplift --train <train> <first revision of patches to uplift> <last revision of patches to uplift></code>. | |||
#* This will create new revisions in Phabricator that will be uplifted to the specified train. | |||
#* Most of the arguments to <code>moz-phab uplift</code> are the same as <code>moz-phab submit</code>. | |||
#* The <code>moz-phab uplift</code> command requires the commit hash of the revision immediately before the first one in the patch stack, and the commit hash of the last revision to uplift. | |||
# Open the URL as suggested at the bottom of the output. | |||
# Complete the uplift request form. See the section below on how to submit the form. | |||
=== Manual Cherry-Pick (Recommended if Conflicts Are Likely) === | === Manual Cherry-Pick (Recommended if Conflicts Are Likely) === | ||
If you expect merge conflicts or want finer control over the uplift, you may prefer manually cherry-picking commits and uploading with <code>moz-phab | If you expect merge conflicts or want finer control over the uplift, you may prefer manually cherry-picking commits and uploading with <code>moz-phab uplift --no-rebase</code>. This avoids the behavior of <code>moz-phab uplift</code>, which will '''fail without recovery options if any conflicts are encountered.''' | ||
# | # Ensure you are using the [https://github.com/mozilla-firefox/firefox mozilla-firefox] repository. | ||
# | # Switch to the appropriate branch (e.g. beta, ESR140, etc.). | ||
# | # Make sure your local repository is up to date with the target branch head. | ||
# | # Create a new branch for your uplift, e.g. <code>git switch -c <new branch name></code> | ||
# | # Cherry-pick each commit or range, e.g. <code>git cherry-pick <commit-hash></code> | ||
# | # Resolve any merge conflicts as needed. | ||
# Use <code>moz-phab uplift --list-trains</code> to determine which uplift train you want to request an uplift for. | |||
#* Note: Train names generally start with <code>firefox-</code> and are not simply the branch name. | |||
# Submit the uplifts using <code>moz-phab uplift --no-rebase --train <train name> <first revision of patches to uplift> <last revision of patches to uplift></code> | |||
# Open the URL as suggested at the bottom of the output. | |||
# Complete the uplift request form. See the section below on how to submit the form. | |||
== Submit the Uplift Request Form == | == Submit the Uplift Request Form == | ||
| Line 57: | Line 74: | ||
Once your revision is created in Phabricator, you must complete the uplift request form. This form is a short questionnaire that helps Release Managers understand the reasoning behind the uplift request and the risk associated with this patch landing directly on a release repository without riding the release trains. | Once your revision is created in Phabricator, you must complete the uplift request form. This form is a short questionnaire that helps Release Managers understand the reasoning behind the uplift request and the risk associated with this patch landing directly on a release repository without riding the release trains. | ||
# | # Go to a revision in the uplift request stack. | ||
# | # Navigate to the bottom of the page where you would “approve” or “request changes” for a patch and select “Change uplift request form”. [[File:Phab-Uplift-request-form-action.png|thumb|Select "Change uplift request form".]] | ||
# | # Complete the form and press “request uplift”. [[File:Phab-Uplift-request-button.png|thumb|Complete the form and click "Request uplift".]] | ||
# | # Wait for Release Manager approval. | ||
A bot will automatically set Release Managers as reviewers for the patch after submitting the form. If the patch stack does not apply cleanly to the uplift train due to a merge conflict, you may need to resolve merge conflicts and re-submit the stack. The uplift request will sit in a pending state until a Release Manager approves, the Release Manager will land after approval. | |||
Revision as of 10:52, 28 July 2025
See the uplift rules Wiki page for more information on uplifts.
Please file a bug if you encounter issues requesting an uplift, or tell us about the problem in #uplift-pilot on Slack.
Requesting an Uplift
Requesting a patch uplift is completed using the standard Mozilla code review and landing tools and processes. Creating an uplift request can be done either:
- By finding the patch in your local VCS and submitting via moz-phab uplift.
- By finding the patch on Phabricator and submitting via Lando.
After submitting the patch stack via either method, you must complete the Uplift Request form on the tip of the patch stack. This will request review from Release Management.
Uplifting a simple change that won't require local modification or testing
If your Phabricator revision(s) are straightforward and won't require local testing prior to requesting an uplift you can use Lando to create the uplift revision. Follow the Requesting Uplift using Lando process.
Requesting Uplift using Lando
- Go to the Lando page for the stack of revisions to uplift.
- Note: the maximum stack size for use in the web UI is 5 patches. Please use moz-phab to submit larger patch stacks.
- You can get here from the Phabricator revision by using the “View stack in Lando” option on the right side menu.
- Click the Log In button in the top right of Lando, if you're not already logged in.
- If you haven't added a Phabricator API token (or it has expired i.e. you don't see the Request Uplift button), click your username in the top right corner and paste the Phabricator API token there.
- Tokens are in the form api-XXXXX…. This token can be found here (replace
<USERNAME>with your phab username):https://phabricator.services.mozilla.com/settings/user/<USERNAME>/page/apitokens/
- Tokens are in the form api-XXXXX…. This token can be found here (replace
- Click the “Request Uplift” button. There should be a new button on the bottom right of the modal that is shown.
- Select the target repo (beta) from the list and click “request uplift”.
- This will create a new Phabricator diff against the requested target.
- Complete the uplift request form in the newly created diff. See the section below on how to submit the form.
Uplifting a change that you want to apply and test locally first
If your Phabricator revision(s) require more attention, perhaps because it's expected they won't apply cleanly to the target, you'll need to apply the commit locally and submit using moz-phab.
Note: you must use moz-phab uplift, not moz-phab submit or any other unsupported tool to submit uplift requests.
Requesting Uplift using moz-phab
- Ensure you are using the mozilla-firefox repository.
- Switch to the appropriate branch (e.g. beta, ESR140, etc.).
- Make sure your local repository is up to date with the target branch head.
- Find the patch or series of patches in your local VCS.
- You can
moz-phab patchpatches onto your local machine if need be.
- You can
- Use
moz-phab uplift --list-trainsto determine which uplift train you want to request an uplift for.- Note: Train names generally start with
firefox-and are not simply the branch name.
- Note: Train names generally start with
- Run
moz-phab uplift --train <train> <first revision of patches to uplift> <last revision of patches to uplift>.- This will create new revisions in Phabricator that will be uplifted to the specified train.
- Most of the arguments to
moz-phab upliftare the same asmoz-phab submit. - The
moz-phab upliftcommand requires the commit hash of the revision immediately before the first one in the patch stack, and the commit hash of the last revision to uplift.
- Open the URL as suggested at the bottom of the output.
- Complete the uplift request form. See the section below on how to submit the form.
Manual Cherry-Pick (Recommended if Conflicts Are Likely)
If you expect merge conflicts or want finer control over the uplift, you may prefer manually cherry-picking commits and uploading with moz-phab uplift --no-rebase. This avoids the behavior of moz-phab uplift, which will fail without recovery options if any conflicts are encountered.
- Ensure you are using the mozilla-firefox repository.
- Switch to the appropriate branch (e.g. beta, ESR140, etc.).
- Make sure your local repository is up to date with the target branch head.
- Create a new branch for your uplift, e.g.
git switch -c <new branch name> - Cherry-pick each commit or range, e.g.
git cherry-pick <commit-hash> - Resolve any merge conflicts as needed.
- Use
moz-phab uplift --list-trainsto determine which uplift train you want to request an uplift for.- Note: Train names generally start with
firefox-and are not simply the branch name.
- Note: Train names generally start with
- Submit the uplifts using
moz-phab uplift --no-rebase --train <train name> <first revision of patches to uplift> <last revision of patches to uplift> - Open the URL as suggested at the bottom of the output.
- Complete the uplift request form. See the section below on how to submit the form.
Submit the Uplift Request Form
Once your revision is created in Phabricator, you must complete the uplift request form. This form is a short questionnaire that helps Release Managers understand the reasoning behind the uplift request and the risk associated with this patch landing directly on a release repository without riding the release trains.
- Go to a revision in the uplift request stack.
- Navigate to the bottom of the page where you would “approve” or “request changes” for a patch and select “Change uplift request form”.
- Complete the form and press “request uplift”.
- Wait for Release Manager approval.
A bot will automatically set Release Managers as reviewers for the patch after submitting the form. If the patch stack does not apply cleanly to the uplift train due to a merge conflict, you may need to resolve merge conflicts and re-submit the stack. The uplift request will sit in a pending state until a Release Manager approves, the Release Manager will land after approval.