From 5d3b7b4929780b7b3b721aa31751496132a1a976 Mon Sep 17 00:00:00 2001 From: Saul Gutierrez Date: Mon, 12 Aug 2024 06:00:18 -0700 Subject: [PATCH] progress: add a thrift Entry point for reporting progress Summary: surprise_tool Reviewed By: kmancini Differential Revision: D60385450 fbshipit-source-id: e935609cebf7969a84ad88d625283b1c5933752b --- eden/fs/service/eden.thrift | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/eden/fs/service/eden.thrift b/eden/fs/service/eden.thrift index 39ba2be329a5..1f7106339d1c 100644 --- a/eden/fs/service/eden.thrift +++ b/eden/fs/service/eden.thrift @@ -1683,6 +1683,21 @@ struct GetBlockedFaultsResponse { 1: list keyValues; } +struct CheckoutProgressInfo { + 1: i64 updatedInodes; +} + +struct CheckoutNotInProgress {} + +struct CheckoutProgressInfoRequest { + 1: PathString mountPoint; +} + +union CheckoutProgressInfoResponse { + 1: CheckoutProgressInfo checkoutProgressInfo; + 2: CheckoutNotInProgress noProgress; +} + service EdenService extends fb303_core.BaseService { list listMounts() throws (1: EdenError ex); void mount(1: MountArgument info) throws (1: EdenError ex); @@ -1719,6 +1734,16 @@ service EdenService extends fb303_core.BaseService { 4: CheckOutRevisionParams params, ) throws (1: EdenError ex); + /** + * Given an Eden mount point returns progress for the checkOutRevision end + * point. When a checkout is not in progress it returns CheckoutNotInProgress + * + * It errors out when no valid mountPoint is provided. + */ + CheckoutProgressInfoResponse getCheckoutProgressInfo( + 1: CheckoutProgressInfoRequest params, + ) throws (1: EdenError ex); + /** * Reset the working directory's parent commits, without changing the working * directory contents.