From f0803462279a5ebdf42d0c612cd7f65da24d7879 Mon Sep 17 00:00:00 2001 From: Gerda Shank Date: Tue, 19 Nov 2024 17:37:19 -0500 Subject: [PATCH] Use protobuf >=5.0,<=6.0 (#10969) --- .../Under the Hood-20241104-110509.yaml | 6 ++++ .github/workflows/main.yml | 1 + core/dbt/events/core_types_pb2.py | 29 +++++++++++++------ core/setup.py | 4 +-- dev-requirements.txt | 3 +- 5 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20241104-110509.yaml diff --git a/.changes/unreleased/Under the Hood-20241104-110509.yaml b/.changes/unreleased/Under the Hood-20241104-110509.yaml new file mode 100644 index 00000000000..1036e073775 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20241104-110509.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Upgrade protobuf +time: 2024-11-04T11:05:09.433244-05:00 +custom: + Author: gshank + Issue: "10658" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3d105ae35db..a7a40f94bd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,6 +59,7 @@ jobs: python -m pip install --user --upgrade pip python -m pip --version make dev + make dev_req mypy --version dbt --version diff --git a/core/dbt/events/core_types_pb2.py b/core/dbt/events/core_types_pb2.py index 6d30c60bfc8..17bbef5dec3 100644 --- a/core/dbt/events/core_types_pb2.py +++ b/core/dbt/events/core_types_pb2.py @@ -1,11 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: core_types.proto +# Protobuf Python Version: 5.28.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 3, + '', + 'core_types.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,21 +31,21 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'core_types_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _globals['_COREEVENTINFO_EXTRAENTRY']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals['_COREEVENTINFO_EXTRAENTRY']._loaded_options = None _globals['_COREEVENTINFO_EXTRAENTRY']._serialized_options = b'8\001' - _globals['_MAINREPORTARGS_ARGSENTRY']._options = None + _globals['_MAINREPORTARGS_ARGSENTRY']._loaded_options = None _globals['_MAINREPORTARGS_ARGSENTRY']._serialized_options = b'8\001' - _globals['_PARTIALPARSINGERROR_EXCINFOENTRY']._options = None + _globals['_PARTIALPARSINGERROR_EXCINFOENTRY']._loaded_options = None _globals['_PARTIALPARSINGERROR_EXCINFOENTRY']._serialized_options = b'8\001' - _globals['_DEPSFOUNDDUPLICATEPACKAGE_REMOVEDPACKAGEENTRY']._options = None + _globals['_DEPSFOUNDDUPLICATEPACKAGE_REMOVEDPACKAGEENTRY']._loaded_options = None _globals['_DEPSFOUNDDUPLICATEPACKAGE_REMOVEDPACKAGEENTRY']._serialized_options = b'8\001' - _globals['_GROUP_OWNERENTRY']._options = None + _globals['_GROUP_OWNERENTRY']._loaded_options = None _globals['_GROUP_OWNERENTRY']._serialized_options = b'8\001' - _globals['_LOGSNAPSHOTRESULT_CFGENTRY']._options = None + _globals['_LOGSNAPSHOTRESULT_CFGENTRY']._loaded_options = None _globals['_LOGSNAPSHOTRESULT_CFGENTRY']._serialized_options = b'8\001' - _globals['_STATSLINE_STATSENTRY']._options = None + _globals['_STATSLINE_STATSENTRY']._loaded_options = None _globals['_STATSLINE_STATSENTRY']._serialized_options = b'8\001' _globals['_COREEVENTINFO']._serialized_start=97 _globals['_COREEVENTINFO']._serialized_end=378 diff --git a/core/setup.py b/core/setup.py index 8fdb2731a82..b7345621b3e 100644 --- a/core/setup.py +++ b/core/setup.py @@ -57,7 +57,7 @@ # with major versions in each new minor version of dbt-core. "click>=8.0.2,<9.0", "networkx>=2.3,<4.0", - "protobuf>=4.0.0,<5", + "protobuf>=5.0,<6.0", "requests<3.0.0", # should match dbt-common "snowplow-tracker>=1.0.2,<2.0", # ---- @@ -71,7 +71,7 @@ "dbt-extractor>=0.5.0,<=0.6", "dbt-semantic-interfaces>=0.7.4,<0.8", # Minor versions for these are expected to be backwards-compatible - "dbt-common>=1.11.0,<2.0", + "dbt-common>=1.13.0,<2.0", "dbt-adapters>=1.9.0,<2.0", # ---- # Expect compatibility with all new versions of these packages, so lower bounds only. diff --git a/dev-requirements.txt b/dev-requirements.txt index 20605e632b8..5f393349744 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -19,6 +19,7 @@ isort==5.13.2 mypy==1.4.1 pip-tools pre-commit +protobuf>=5.0,<6.0 pytest>=7.4,<8.0 pytest-cov pytest-csv>=3.0,<4.0 @@ -32,7 +33,7 @@ types-docutils types-PyYAML types-Jinja2 types-mock -types-protobuf>=4.0.0,<5.0.0 +types-protobuf>=5.0,<6.0 types-pytz types-requests types-setuptools