HomePhabricator

[land-bot] Ensure changes to the land bot script do not modify its execution in…

Description

[land-bot] Ensure changes to the land bot script do not modify its execution in-flight

Summary:
I encountered this issue while testing locally. Even normal errors can turn
into very bizarre behavior that are impossible to comprehend when this is triggered.

There is an alternative approach where a wrapper script copies land-patch.sh and runs the copy,
but this approach is nearly as easy to maintain and does not require that developers know that
running land-patch.sh directly can cause debugging nightmares.

Test Plan:
It's a bit hard to trigger this consistently, but for sanity:

CONDUIT_TOKEN=<token> ./land-patch --dry-run -r Dxxxx

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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