abandon_old_changes: Get SA from bb api
Get the service account from the buildbucket api, not from the build
object directly.
Bug: b/368181572
Change-Id: I547711fda10857e3cc073dbcb25df1f32dbdc2a1
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/237094
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
diff --git a/recipe_modules/abandon_old_changes/api.py b/recipe_modules/abandon_old_changes/api.py
index 2c0c12d..e962e12 100644
--- a/recipe_modules/abandon_old_changes/api.py
+++ b/recipe_modules/abandon_old_changes/api.py
@@ -57,7 +57,7 @@
):
query_string = (
f'is:open '
- f'owner:{self.m.buildbucket.build.infra.swarming.task_service_account} '
+ f'owner:{self.m.buildbucket.swarming_task_service_account} '
f'age:{age_days}d '
)