Release Management/Requesting an Uplift: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(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.
# Go to the Lando page for the stack of revisions to uplift.
# '''Log in to Lando.''' Click the Log In button in the top right.
#* Note: the maximum stack size for use in the web UI is 5 patches. Please use moz-phab to submit larger patch stacks.
# '''Add your Phabricator API token and save changes.''' 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/ [[File:Lando-phab-api-token.png|thumb|Click your username in the top right corner and paste the Phabricator API token there.]]
#* You can get here from the Phabricator revision by using the “View stack in Lando” option on the right side menu.
# '''Click the “Preview Landing” 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.]]
# Click the Log In button in the top right of Lando, if you're not already logged in.
# '''Complete the uplift request form in the newly created diff. See the section below on how to submit the form.'''
# 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.
Follow the '''Requesting Uplift using moz-phab''' process
 
'''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'''
# 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.
# Switch to the appropriate branch (e.g. beta, ESR140, etc.).
# '''Find the patch or series of patches in your local VCS.''' You can ''moz-phab patch'' onto your local machine if need be.
# Make sure your local repository is up to date with the target branch head.
# '''Determine which uplift train you want to request an uplift for.''' You can see which trains are available with ''moz-phab uplift --list-trains''.
# Find the patch or series of patches in your local VCS.
# '''Run ''moz-phab uplift --train <train> <first revision of patches to uplift> <last revision of patches to uplift>''. ''' For Git users: The moz-phab uplift 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.Most of the arguments to ''moz-phab uplift'' are the same as ''moz-phab submit''. This will create new revisions in Phabricator that will be uplifted to the specified train. If ''moz-phab uplift'' is run from mozilla-unified, the stack of patches will be rebased onto the target that will be landed to. For example if you specify ''--train beta'', the patches will be rebased onto the ''beta'' head in your local VCS. If ''moz-phab uplift'' is run from central or another non-unified repo, the commits will be submitted without attempting to rebase them. Note you must use ''moz-phab uplift'', not ''moz-phab sumbit'' or any other unsupported tool to submit uplift requests.
#* You can <code>moz-phab patch</code> patches onto your local machine if need be.
# '''Open the URL as suggested at the bottom of the output.'''
# Use <code>moz-phab uplift --list-trains</code> to determine which uplift train you want to request an uplift for.
# '''Complete the uplift request form. See the section below on how to submit the form.'''
#* 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 submit</code>. This avoids the behavior of <code>moz-phab uplift</code>, which will '''fail without recovery options if any conflicts are encountered.'''
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.'''


# '''Switch to the target uplift branch''' (e.g. beta, ESR140, etc.) Make sure your local repository is up to date with the target branch head.
# Ensure you are using the [https://github.com/mozilla-firefox/firefox mozilla-firefox] repository.
# '''Cherry-pick each commit''' git cherry-pick &lt;commit-hash&gt;
# Switch to the appropriate branch (e.g. beta, ESR140, etc.).
# '''Resolve any merge conflicts as needed.'''
# Make sure your local repository is up to date with the target branch head.
# '''Push the result to a new branch.'''
# Create a new branch for your uplift, e.g. <code>git switch -c <new branch name></code>
# '''Submit the changes to Phabricator''' moz-phab submit
# Cherry-pick each commit or range, e.g. <code>git cherry-pick <commit-hash></code>
# '''Complete the uplift request form. See the section below on how to submit the form.'''
# 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.'''
# 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".]]
# 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".]]
# 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.
# 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

  1. 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.
  2. Click the Log In button in the top right of Lando, if you're not already logged in.
  3. 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/
      Click your username in the top right corner and paste the Phabricator API token there.
  4. Click the “Request Uplift” button. There should be a new button on the bottom right of the modal that is shown.
  5. Select the target repo (beta) from the list and click “request uplift”.
    • This will create a new Phabricator diff against the requested target.
      Click the "Request uplift" button in the bottom right.
  6. 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

  1. Ensure you are using the mozilla-firefox repository.
  2. Switch to the appropriate branch (e.g. beta, ESR140, etc.).
  3. Make sure your local repository is up to date with the target branch head.
  4. Find the patch or series of patches in your local VCS.
    • You can moz-phab patch patches onto your local machine if need be.
  5. Use moz-phab uplift --list-trains to 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.
  6. 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 uplift are the same as moz-phab submit.
    • The moz-phab uplift 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.
  7. Open the URL as suggested at the bottom of the output.
  8. 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.

  1. Ensure you are using the mozilla-firefox repository.
  2. Switch to the appropriate branch (e.g. beta, ESR140, etc.).
  3. Make sure your local repository is up to date with the target branch head.
  4. Create a new branch for your uplift, e.g. git switch -c <new branch name>
  5. Cherry-pick each commit or range, e.g. git cherry-pick <commit-hash>
  6. Resolve any merge conflicts as needed.
  7. Use moz-phab uplift --list-trains to 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.
  8. Submit the uplifts using moz-phab uplift --no-rebase --train <train name> <first revision of patches to uplift> <last revision of patches to uplift>
  9. Open the URL as suggested at the bottom of the output.
  10. 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.

  1. Go to a revision in the uplift request stack.
  2. Navigate to the bottom of the page where you would “approve” or “request changes” for a patch and select “Change uplift request form”.
    Select "Change uplift request form".
  3. Complete the form and press “request uplift”.
    Complete the form and click "Request uplift".
  4. 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.