Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,12 @@ def cpp_bigquery_odbc_development_deps(name = None):
http_archive,
name = "rules_cc",
urls = [
"https://storage.googleapis.com/cloud-cpp-community-archive/rules_cc/rules_cc-0.0.15.tar.gz",
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.15/rules_cc-0.0.15.tar.gz",
],
sha256 = "f4aadd8387f381033a9ad0500443a52a0cea5f8ad1ede4369d3c614eb7b2682e",
strip_prefix = "rules_cc-0.0.15",
)

# Load Abseil
maybe(
http_archive,
name = "com_google_absl",
urls = [
"https://github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz",
],
sha256 = "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3",
strip_prefix = "abseil-cpp-20240722.0",
)

def cpp_bigquery_odbc_deps(name = None):
"""Loads dependencies need to compile the cpp-bigquery-odbc libraries.

Expand Down Expand Up @@ -92,7 +80,7 @@ def cpp_bigquery_odbc_deps(name = None):
http_archive,
name = "com_google_cloud_cpp",
urls = [
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.47.0.tar.gz",
"https://github.com/googleapis/google-cloud-cpp/archive/f6e2b3105d68fa6aaa82d9f8d556263dddb169a0.tar.gz",
],
strip_prefix = "google-cloud-cpp-2.47.0",
strip_prefix = "google-cloud-cpp-f6e2b3105d68fa6aaa82d9f8d556263dddb169a0",
)
124 changes: 124 additions & 0 deletions bazel/remove_upb_c_rules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
diff --git google/api/expr/v1alpha1/BUILD.bazel google/api/expr/v1alpha1/BUILD.bazel
index 9bed46809..197e5249c 100644
--- google/api/expr/v1alpha1/BUILD.bazel
+++ google/api/expr/v1alpha1/BUILD.bazel
@@ -233,32 +233,32 @@ cc_proto_library(
##############################################################################
# upb
##############################################################################
-load(
- "@com_google_googleapis_imports//:imports.bzl",
- "upb_c_proto_library",
-)
-
-upb_c_proto_library(
- name = "checked_upb_proto",
- deps = [":checked_proto"],
-)
-
-upb_c_proto_library(
- name = "eval_upb_proto",
- deps = [":eval_proto"],
-)
-
-upb_c_proto_library(
- name = "explain_upb_proto",
- deps = [":explain_proto"],
-)
-
-upb_c_proto_library(
- name = "syntax_upb_proto",
- deps = [":syntax_proto"],
-)
-
-upb_c_proto_library(
- name = "value_upb_proto",
- deps = [":value_proto"],
-)
+#load(
+ #"@com_google_googleapis_imports//:imports.bzl",
+ #"upb_c_proto_library",
+#)
+#
+#upb_c_proto_library(
+ #name = "checked_upb_proto",
+ #deps = [":checked_proto"],
+#)
+#
+#upb_c_proto_library(
+ #name = "eval_upb_proto",
+ #deps = [":eval_proto"],
+#)
+#
+#upb_c_proto_library(
+ #name = "explain_upb_proto",
+ #deps = [":explain_proto"],
+#)
+#
+#upb_c_proto_library(
+ #name = "syntax_upb_proto",
+ #deps = [":syntax_proto"],
+#)
+#
+#upb_c_proto_library(
+ #name = "value_upb_proto",
+ #deps = [":value_proto"],
+#)
diff --git google/rpc/BUILD.bazel google/rpc/BUILD.bazel
index 31fd6457d..c38f00c46 100644
--- google/rpc/BUILD.bazel
+++ google/rpc/BUILD.bazel
@@ -11,7 +11,7 @@ load(
"php_proto_library",
"py_gapic_assembly_pkg",
"py_proto_library",
- "upb_c_proto_library",
+ #"upb_c_proto_library",
)
load("@rules_proto//proto:defs.bzl", "proto_library")

@@ -104,15 +104,15 @@ cc_proto_library(
deps = [":status_proto"],
)

-upb_c_proto_library(
- name = "code_upb_proto",
- deps = [":code_proto"],
-)
+#upb_c_proto_library(
+ #name = "code_upb_proto",
+ #deps = [":code_proto"],
+#)

-upb_c_proto_library(
- name = "status_upb_proto",
- deps = [":status_proto"],
-)
+#upb_c_proto_library(
+ #name = "status_upb_proto",
+ #deps = [":status_proto"],
+#)

py_proto_library(
name = "code_py_proto",
diff --git repository_rules.bzl repository_rules.bzl
index 2f87ad682..2ab3bd054 100644
--- repository_rules.bzl
+++ repository_rules.bzl
@@ -224,11 +224,11 @@ def switched_rules_by_language(
#
# upb
#
- rules["upb_c_proto_library"] = _switch(
- upb,
- "@com_google_protobuf//bazel:upb_c_proto_library.bzl",
- "upb_c_proto_library",
- )
+ #rules["upb_c_proto_library"] = _switch(
+ # upb,
+ # "@com_google_protobuf//bazel:upb_c_proto_library.bzl",
+ # "upb_c_proto_library",
+ #)

#
# PHP
31 changes: 25 additions & 6 deletions ci/cloudbuild/dockerfiles/ubuntu-22.04-full.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ RUN pip3 install --require-hashes --no-deps -r /var/tmp/ci/requirements.txt
# image smaller (and with fewer layers)

WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20240116.3.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250512.0.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DABSL_BUILD_TESTING=OFF \
-DABSL_PROPAGATE_CXX_STD=ON \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_SHARED_LIBS=yes \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-S . -B cmake-out -GNinja && \
Expand Down Expand Up @@ -156,7 +156,7 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build/protobuf
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.3.tar.gz | \
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v31.1.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -196,7 +196,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2024-07-02.tar.gz | \
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/build/grpc
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.66.0.tar.gz | \
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -216,6 +216,25 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.66.0.tar.gz | \
ldconfig && \
cd /var/tmp && rm -fr build

RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.24.0.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-DBUILD_SHARED_LIBS=ON \
-DWITH_EXAMPLES=OFF \
-DWITH_STL=CXX17 \
-DBUILD_TESTING=OFF \
-DOPENTELEMETRY_INSTALL=ON \
-DOPENTELEMETRY_ABI_VERSION_NO=2 \
-DWITH_TEST=OFF \
-GNinja \
-S . -B cmake-out && \
cmake --build cmake-out --target install && \
ldconfig && \
cd /var/tmp && rm -fr build

# Install ctcache to speed up our clang-tidy build
WORKDIR /var/tmp/build
RUN curl -fsSL https://github.com/matus-chochlik/ctcache/archive/0ad2e227e8a981a9c1a6060ee6c8ec144bb976c6.tar.gz | \
Expand All @@ -233,13 +252,13 @@ RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccac
chmod +x /usr/local/bin/sccache

WORKDIR /var/tmp/google-cloud-cpp
RUN curl -fsSL https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.47.0.tar.gz | \
RUN curl -fsSL https://github.com/googleapis/google-cloud-cpp/archive/f6e2b3105d68fa6aaa82d9f8d556263dddb169a0.tar.gz | \
tar -zxf - --strip-components=1 && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DGOOGLE_CLOUD_CPP_ENABLE_CTYPE_CORD_WORKAROUND=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \
-DGOOGLE_CLOUD_CPP_ENABLE=experimental-bigquery_rest,oauth2,bigquery,resourcemanager,serviceusage \
-S . -B cmake-out -GNinja && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ RUN echo 'Verifying glibc version...'
RUN dpkg -l libc6
RUN if [ $(ldd --version | grep GLIBC | awk '{print $5}') -lt 2.17 ] ; \
then echo 'glibc version is < 2.17: exiting...' ; exit 1 ; fi

4 changes: 2 additions & 2 deletions ci/cloudbuild/dockerfiles/ubuntu-msan.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ RUN cmake --install build
# use `absl::any`, `absl::string_view`, and `absl::variant`. See
# [abseil/abseil-cpp#696] for more information.
WORKDIR /var/tmp/build/abseil-cpp
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20230802.0.tar.gz | \
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250512.0.tar.gz | \
tar -xzf - --strip-components=1 && \
cmake \
-DCMAKE_BUILD_TYPE="Release" \
Expand Down Expand Up @@ -209,7 +209,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.55.0.tar.gz | \

# Install google-cloud-cpp to get bigquery rest client
WORKDIR /var/tmp/google-cloud-cpp
RUN curl -fsSL https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.47.0.tar.gz | \
RUN curl -fsSL https://github.com/googleapis/google-cloud-cpp/archive/f6e2b3105d68fa6aaa82d9f8d556263dddb169a0.tar.gz | \
tar -zxf - --strip-components=1 && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local \
Expand Down
3 changes: 2 additions & 1 deletion google/cloud/odbc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cc_library(
"//google/cloud/odbc/bq_client_interface:odbc_bq_client_interface",
"//google/cloud/odbc/internal:odbc_internal",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:log",
"@com_google_absl//absl/log:initialize",
"@com_google_absl//absl/log:log_sink",
"@com_google_absl//absl/strings",
Expand Down Expand Up @@ -116,5 +116,6 @@ cc_test(
"//google/cloud/odbc/testing:google_cloud_odbc_testing_bq_driver_utils",
"//google/cloud/odbc/testing:google_cloud_odbc_testing_utils",
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/log:log",
],
)
34 changes: 17 additions & 17 deletions google/cloud/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@ endif ()

find_package(absl CONFIG REQUIRED)

if (ODBC_UNIT_TESTING)
FetchContent_Declare(
fuzztest
URL "https://github.com/google/fuzztest/archive/refs/tags/2024-10-28.tar.gz"
)
set(FUZZTEST_USE_EXTERNAL_ABSL
ON
CACHE BOOL "" FORCE)
set(FUZZTEST_USE_EXTERNAL_RE2
ON
CACHE BOOL "" FORCE)
set(FUZZTEST_USE_EXTERNAL_GTEST
ON
CACHE BOOL "" FORCE)

FetchContent_MakeAvailable(fuzztest)
endif ()
# if (ODBC_UNIT_TESTING)
# FetchContent_Declare(
# fuzztest
# URL "https://github.com/google/fuzztest/archive/refs/tags/2024-10-28.tar.gz"
# )
# set(FUZZTEST_USE_EXTERNAL_ABSL
# ON
# CACHE BOOL "" FORCE)
# set(FUZZTEST_USE_EXTERNAL_RE2
# ON
# CACHE BOOL "" FORCE)
# set(FUZZTEST_USE_EXTERNAL_GTEST
# ON
# CACHE BOOL "" FORCE)

# FetchContent_MakeAvailable(fuzztest)
# endif ()

# Arrow is not supported on 32-bit systems
if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT NO_ARROW)
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/odbc/bq_client_interface/projects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "google/cloud/odbc/bq_client_interface/datasets.h"
#include "google/cloud/odbc/internal/sql_state_constants.h"
#include "google/cloud/odbc/internal/status_record_or.h"
#include <google/cloud/resourcemanager/v3/projects.pb.h>
#include "google/cloud/resourcemanager/v3/projects.pb.h"
#include <absl/log/log.h>

namespace google::cloud::odbc_bigquery_client_interface {
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/odbc/bq_client_interface/projects_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "google/cloud/resourcemanager/v3/mocks/mock_projects_connection.h"
#include "google/cloud/resourcemanager/v3/projects_client.h"
#include "google/cloud/serviceusage/v1/mocks/mock_service_usage_connection.h"
#include <google/cloud/resourcemanager/v3/projects.pb.h>
#include "google/cloud/resourcemanager/v3/projects.pb.h"
#include <gmock/gmock.h>

namespace google::cloud::odbc_bigquery_client_interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "google/cloud/odbc/testing/utils/env_vars.h"
#include "google/cloud/odbc/testing/utils/status_matchers.h"
#include "google/cloud/bigquery/v2/minimal/internal/job_client.h"
#include "google/cloud/internal/absl_str_cat_quiet.h"
#include "absl/strings/str_cat.h"
#include <gmock/gmock.h>

namespace google::cloud::odbc_integration_tests_apis {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include "google/cloud/bigquery/v2/minimal/internal/job_client.h"
#include "google/cloud/internal/absl_str_cat_quiet.h"
#include "absl/strings/str_cat.h"
#include "google/cloud/internal/getenv.h"
#include <gtest/gtest.h>

Expand Down