HomePhabricator

Add a land bot script for running smoke tests before landing patches

Description

Add a land bot script for running smoke tests before landing patches

Summary:
This patch provides a way for the CI to make sure a given patch is
rebased on master, smoke tested, and still landed as the submitter as one
would normally expect from a landing workflow.

The land workflow, once complete, will be roughly this:

  1. User runs arc land
  2. A custom ABC Arcanist workflow intercepts the land command and diverts it to abc-land workflow rather than the default. The default workflow will still be available under another name, if needed.
  3. The abc-land workflow sends the REVISION and encrypted CONDUIT_TOKEN to abcbot.
  4. abcbot queues the build.
  5. The build decrypts CONDUIT_TOKEN and runs land-patch.sh

Some parts are obviously missing, but these will come later:

  • Applying autogen onto a patch in-flight, such as updating manpages
  • Being able to land unreviewed diffs (reserved for automated commits such as updating chainparams).

Regarding the CONDUIT_TOKEN, note that the script needs it unencrypted in order to land the patch
as you. This is safe to run locally. For the complete land-bot pipeline, your Conduit token will
be encrypted before passing along via arc land. This prevents the token from accidentally
getting logged while your request is on its journey through abcbot and the patch queue. It will only
be unencrypted once the land-bot begins working on your patch, immediately before calling this script.

While this infra is being worked on, feel free to run this script directly and provide additional feedback.

Test Plan:

./land-patch.sh -h
./land-patch.sh           # errors as expected
./land-patch.sh -r D5780  # errors as expected

CONDUIT_TOKEN=<token> ./land-patch.sh -r D5780 --dry-run
CONDUIT_TOKEN=<token> ./land-patch.sh -r D5780  # was used to land https://reviews.bitcoinabc.org/D5780

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5801

Details

Provenance
jasonbcoxAuthored on Mar 20 2020, 17:32
nakihitoPushed on Apr 28 2020, 23:30
Reviewer
Restricted Project
Differential Revision
D5801: Add a land bot script for running smoke tests before landing patches
Parents
rSTAGING39c9afd531ad: [backport#10973] Remove use CValidationInterface in wallet code
Branches
Unknown
Tags
Unknown