From 464a78f84ebf3e0b0fb183c0638370142cfc303b Mon Sep 17 00:00:00 2001 From: Privacy Sandbox Team Date: Thu, 7 Nov 2024 23:17:14 -0500 Subject: [PATCH] chore: Rename abort_udf to abort_late_udf Bug: N/A Change-Id: I461bdbbcf7edcb9dfd9212cffcb99c8d39b97ec3 GitOrigin-RevId: d7909912f27a826003a656756fabfa7136c10f4e --- src/roma/byob/dispatcher/BUILD.bazel | 2 +- src/roma/byob/dispatcher/dispatcher_udf_test.cc | 2 +- src/roma/byob/sample_udf/BUILD.bazel | 5 +++-- .../sample_udf/{abort_udf.cc => abort_late_udf.cc} | 13 ++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) rename src/roma/byob/sample_udf/{abort_udf.cc => abort_late_udf.cc} (83%) diff --git a/src/roma/byob/dispatcher/BUILD.bazel b/src/roma/byob/dispatcher/BUILD.bazel index 1471a9d0..e3019efd 100644 --- a/src/roma/byob/dispatcher/BUILD.bazel +++ b/src/roma/byob/dispatcher/BUILD.bazel @@ -76,7 +76,7 @@ cc_test( data = [ ":run_workers_without_sandbox", "//src/roma/byob/sample_udf", - "//src/roma/byob/sample_udf:abort_udf", + "//src/roma/byob/sample_udf:abort_late_udf", "//src/roma/byob/sample_udf:new_udf", "//src/roma/byob/sample_udf:nonzero_return_udf", "//src/roma/byob/sample_udf:pause_udf", diff --git a/src/roma/byob/dispatcher/dispatcher_udf_test.cc b/src/roma/byob/dispatcher/dispatcher_udf_test.cc index deb442c2..89155627 100644 --- a/src/roma/byob/dispatcher/dispatcher_udf_test.cc +++ b/src/roma/byob/dispatcher/dispatcher_udf_test.cc @@ -369,7 +369,7 @@ TEST(DispatcherUdfTest, LoadAndExecuteAbortUdf) { Dispatcher dispatcher; ASSERT_TRUE(dispatcher.Init(fd, /*logdir=*/"").ok()); const absl::StatusOr code_token = - dispatcher.LoadBinary("src/roma/byob/sample_udf/abort_udf", + dispatcher.LoadBinary("src/roma/byob/sample_udf/abort_late_udf", /*num_workers=*/10); ASSERT_TRUE(code_token.ok()); SampleRequest bin_request; diff --git a/src/roma/byob/sample_udf/BUILD.bazel b/src/roma/byob/sample_udf/BUILD.bazel index 8f73fa37..4e4e2a6b 100644 --- a/src/roma/byob/sample_udf/BUILD.bazel +++ b/src/roma/byob/sample_udf/BUILD.bazel @@ -166,8 +166,8 @@ cc_binary( ) cc_binary( - name = "abort_udf", - srcs = ["abort_udf.cc"], + name = "abort_late_udf", + srcs = ["abort_late_udf.cc"], visibility = ["//visibility:public"], deps = [ ":sample_byob_sdk_cc_proto", @@ -343,6 +343,7 @@ native_image( filegroup( name = "udf_binaries", srcs = [ + ":abort_late_udf", ":callback_payload_read_udf", ":callback_payload_write_udf", ":log_benchmark_udf", diff --git a/src/roma/byob/sample_udf/abort_udf.cc b/src/roma/byob/sample_udf/abort_late_udf.cc similarity index 83% rename from src/roma/byob/sample_udf/abort_udf.cc rename to src/roma/byob/sample_udf/abort_late_udf.cc index 74e203c1..640c6db5 100644 --- a/src/roma/byob/sample_udf/abort_udf.cc +++ b/src/roma/byob/sample_udf/abort_late_udf.cc @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - +#include #include #include "google/protobuf/any.pb.h" #include "google/protobuf/util/delimited_message_util.h" #include "src/roma/byob/sample_udf/sample_udf_interface.pb.h" -using ::google::protobuf::io::FileInputStream; -using ::google::protobuf::util::ParseDelimitedFromZeroCopyStream; -using ::google::protobuf::util::SerializeDelimitedToFileDescriptor; -using ::privacy_sandbox::roma_byob::example::SampleResponse; +using google::protobuf::io::FileInputStream; +using google::protobuf::util::ParseDelimitedFromZeroCopyStream; +using google::protobuf::util::SerializeDelimitedToFileDescriptor; +using privacy_sandbox::roma_byob::example::SampleResponse; void ReadRequestFromFd(int fd) { google::protobuf::Any bin_request; @@ -47,5 +46,5 @@ int main(int argc, char* argv[]) { SampleResponse bin_response; bin_response.set_greeting("I am a crashing UDF!"); WriteResponseToFd(fd, std::move(bin_response)); - ::abort(); + std::abort(); }