From 1a5ff81f3c9b59ff3cf02ad122253be4949606b7 Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Fri, 19 Dec 2025 10:21:17 +0000 Subject: [PATCH 1/3] Fix thrift error: could not find include file thrift/annotation/thrift.thrift D89334763 introduce the using of `include "thrift/annotation/thrift.thrift"`. ``` Making all in carbon make[4]: Entering directory '/home/runner/work/mcrouter/mcrouter/mcrouter/lib/carbon' /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/bin//thrift1 -gen mstch_cpp2:stack_arguments,sync_methods_return_try,include_prefix=mcrouter/lib/carbon/ carbon_result.thrift /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/bin//thrift1 -gen mstch_cpp2:stack_arguments,sync_methods_return_try,include_prefix=mcrouter/lib/carbon/ -I /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/ carbon.thrift [ERROR:carbon_result.thrift:8] Could not find include file thrift/annotation/thrift.thrift make[4]: *** [Makefile:521: gen-cpp2/carbon_result_data.h] Error 1 make[4]: *** Waiting for unfinished jobs.... ``` This should be fixed by `-I $(INSTALL_DIR)/include/` for generating gen-cpp2 for carbon_result.thrift. --- mcrouter/lib/carbon/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcrouter/lib/carbon/Makefile.am b/mcrouter/lib/carbon/Makefile.am index 30484c517..7860aaa29 100644 --- a/mcrouter/lib/carbon/Makefile.am +++ b/mcrouter/lib/carbon/Makefile.am @@ -29,7 +29,7 @@ gen-cpp2/carbon_result_types.h: gen-cpp2/carbon_result_types_custom_protocol.h gen-cpp2/carbon_result_types_custom_protocol.h: gen-cpp2/carbon_result_data.cpp gen-cpp2/carbon_result_data.cpp: gen-cpp2/carbon_result_data.h gen-cpp2/carbon_result_data.h: carbon_result.thrift - @FBTHRIFT@ -gen mstch_cpp2:stack_arguments,sync_methods_return_try,include_prefix=mcrouter/lib/carbon/ carbon_result.thrift + @FBTHRIFT@ -gen mstch_cpp2:stack_arguments,sync_methods_return_try,include_prefix=mcrouter/lib/carbon/ -I $(INSTALL_DIR)/include/ carbon_result.thrift gen-cpp2/carbon_types.cpp: gen-cpp2/carbon_types.h gen-cpp2/carbon_types_binary.cpp: gen-cpp2/carbon_types.h From eb7581df2e0988af7bc65674509ba722fb4162ca Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Fri, 19 Dec 2025 10:28:55 +0000 Subject: [PATCH 2/3] Guarding the internal feature Tupperware is the internal tool of Meta, so guarding it out in order to fix OSS build failure. --- mcrouter/McrouterLogger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mcrouter/McrouterLogger.cpp b/mcrouter/McrouterLogger.cpp index 47eba2df4..3effe2af2 100644 --- a/mcrouter/McrouterLogger.cpp +++ b/mcrouter/McrouterLogger.cpp @@ -162,6 +162,7 @@ bool McrouterLogger::start() { } else { // If default path is not available and TW backup is enabled, try backup // path +#ifndef MCROUTER_OSS_BUILD if (router_.opts().enable_tw_crash_config_backup_path && additionalLogger_) { auto backupPath = additionalLogger_->getBackupStatsRootPath(); @@ -177,11 +178,14 @@ bool McrouterLogger::start() { return false; } } else { +#endif LOG(WARNING) << "Can't create or chmod " << router_.opts().stats_root << ", disabling stats logging"; return false; } +#ifndef MCROUTER_OSS_BUILD } +#endif boost::filesystem::path path(statsRoot_); path /= getStatPrefix(router_.opts()) + "." + kStatsStartupOptionsSfx; From c2838dd072cc529b246567dd6c7afa1ea1d6078d Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Tue, 20 Jan 2026 20:37:46 +0700 Subject: [PATCH 3/3] Guarding TW specific test in options_test.cpp --- mcrouter/test/cpp_unit_tests/options_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mcrouter/test/cpp_unit_tests/options_test.cpp b/mcrouter/test/cpp_unit_tests/options_test.cpp index b3bca55dc..5b4b82997 100644 --- a/mcrouter/test/cpp_unit_tests/options_test.cpp +++ b/mcrouter/test/cpp_unit_tests/options_test.cpp @@ -50,9 +50,11 @@ TEST(OptionsSetFromDictTest, sanity) { /* unchanged */ EXPECT_TRUE(opts.num_proxies == 4); +#ifndef MCROUTER_OSS_BUILD dict.clear(); dict["enable_tw_crash_config_backup_path"] = "1"; e = opts.updateFromDict(dict); EXPECT_TRUE(e.empty()); EXPECT_TRUE(opts.enable_tw_crash_config_backup_path); +#endif }