Skip to content

Add a lando.backout action that backs out commits through Lando - #7104

Open
evgenyrp wants to merge 7 commits into
masterfrom
lando-backout-action
Open

evgenyrp wants to merge 7 commits into
masterfrom
lando-backout-action

Conversation

@evgenyrp

@evgenyrp evgenyrp commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Part of #7082. The test-repair agent uses it in #7105.

Adds a lando.backout action that has Lando back out a landed commit with its headless API revert action (mozilla-conduit/lando#1563).

  • lando-client: revert_commit (POST /api/repo/{repo} with {"action": "revert", "commit": ...}), LANDO_HEADLESS_API_TOKEN
  • hackbot-runtime: actions.lando.record_backout records the repo and the full commit sha
  • hackbot-api: BackoutHandler submits the revert and links the Lando job

Lando writes the message itself (git revert --no-edit: Revert "<subject>" / This reverts commit <sha>.) and only reverts commits landed in the last 24 hours.

Deployment: hackbot-api needs LANDO_HEADLESS_API_TOKEN for an account with main.can_revert_commits, and firefox-autoland has to be in Lando's REVERT_ALLOWED_REPOS. The OIDC LANDO_ACCESS_TOKEN used for try pushes is not accepted by the headless API.

@evgenyrp
evgenyrp requested a review from a team as a code owner October 9, 2026 19:23
@evgenyrp
evgenyrp added this pull request to stack #7107 October 9, 2026 19:26
@evgenyrp
evgenyrp requested a review from zzzeid October 9, 2026 19:27
@evgenyrp evgenyrp changed the title Add a lando.backout action to push backouts through Lando Add a lando.backout action that backs out commits through Lando Nov 26, 2026
@evgenyrp
evgenyrp force-pushed the lando-backout-action branch from 80d2d7b to becd9f1 Compare November 26, 2026 21:24
@evgenyrp

Copy link
Copy Markdown
Contributor Author

@suhaibmujahid @zzzeid the PRs are updates to use the new Lando API. To test it on Hackbot Dev we need to LANDO_HEADLESS_API_TOKEN (see description) and push the API to the dev branch (+the agent itself).

@suhaibmujahid

Copy link
Copy Markdown
Member

To test it on Hackbot Dev we need to LANDO_HEADLESS_API_TOKEN (see description) and push the API to the dev branch (+the agent itself).

We already have that configured and points to https://lando-dev.allizom.org.

@evgenyrp

Copy link
Copy Markdown
Contributor Author

@suhaibmujahid @zzzeid, all comments are addressed; pls have another look. We can also deploy it to Hackbot Dev to test integration with Lando Dev a bit later.

@evgenyrp
evgenyrp force-pushed the lando-backout-action branch from ea24d46 to 4aa9f42 Compare December 1, 2026 19:21
@evgenyrp

evgenyrp commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@suhaibmujahid I tested it on dev but it's saying the headless token is not configured: https://hackbot-dev.allizom.org/runs/01a23345-1a1f-7649-b5db-a9f419e4693c

failed
lando.backout
LANDO_HEADLESS_API_TOKEN is not configured

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants