Closed Bug 1835962 Opened 2 years ago Closed 2 years ago

make `mach try` submit to Lando instead of hgmo ( --push-to-lando implementation )

Categories

(Developer Infrastructure :: Try, enhancement)

enhancement

Tracking

(firefox120 fixed)

RESOLVED FIXED
Tracking Status
firefox120 --- fixed

People

(Reporter: sheehan, Assigned: sheehan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Once bug 1835959 and its dependencies are completed we will need to update mach try to submit to Lando instead of directly to hgmo. The amount of work here will vary depending on the final design of the new API, but will likely include:

  • Add Auth0 authentication to mach try. We already have a working PoC for this piece.
  • Make mach try resolve the commits that need to be sent to Lando. This will likely be done with hg out against mozilla-unified.
  • Change mach try to submit to Lando. We may also want to add a fallback to submitting directly to hgmo. We could do this with an option on the mach try CLI.

Add support for submitting stacks of commits to Lando for queueing
on Try, instead of pushing to hg.mozilla.org directly. This patch
implements the Device Code Authorization flow for Auth0, simple changeset
discovery and patch gathering, and submissing to Lando via HTTP POST.

Add a try.txt virtualenv site that contains packages from the common
virtualenv as well as the auth0-python package for verifying Auth0
JWTs. Use this new virtualenv for mach try and related subcommands.
Add a --push-to-lando flag that controls whether the push will be made
via the Lando API or using the VCS to hg.mozilla.org directly.

Create a lando.py module in the tryselect package that handles the
details around submitting to Lando. Authentication is handled by the
Device Code Authorization flow, and the returned access token is saved
to the mozbuild state directory. This module also includes patch stack
gathering and discovery via mozversioncontrol.

mozversioncontrol's Repository subclass is extended with helper functions
to gather patch files from Mercurial and Git. We also add a try_config_commit
context manager that creates a temporary commit to hold try syntax commit
messages and/or a try_task_config.json file, which is removed from version
control on submission.

Depends on: 1854004
Depends on: 1854496
Assignee: nobody → sheehan
Attachment #9351933 - Attachment description: WIP: Bug 1835962: add support for `mach try` to submit to Lando → Bug 1835962: add support for `mach try` to submit to Lando r?#mach-reviewers,zeid
Status: NEW → ASSIGNED
Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4fd5a40ee741 add support for `mach try` to submit to Lando r=zeid,mach-reviewers,ahochheiden
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Summary: make `mach try` submit to Lando instead of hgmo → make `mach try` submit to Lando instead of hgmo ( --push-to-lando implementation )
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: