diff --git a/core/dbt/adapters/events/adapter_types.proto b/core/dbt/adapters/events/adapter_types.proto index aa0b507c41e..f04047fc4cd 100644 --- a/core/dbt/adapters/events/adapter_types.proto +++ b/core/dbt/adapters/events/adapter_types.proto @@ -346,19 +346,7 @@ message CacheDumpGraphMsg { // Skipping E032, E033, E034 - - - -// E034 -message AdapterRegistered { - string adapter_name = 1; - string adapter_version = 2; -} - -message AdapterRegisteredMsg { - AdapterCommonEventInfo info = 1; - AdapterRegistered data = 2; -} +// E034 is defined in dbt-core // E035 message AdapterImportError { diff --git a/core/dbt/adapters/events/adapter_types_pb2.py b/core/dbt/adapters/events/adapter_types_pb2.py index f9010e9fdc7..3eb09da0ac7 100644 --- a/core/dbt/adapters/events/adapter_types_pb2.py +++ b/core/dbt/adapters/events/adapter_types_pb2.py @@ -6,7 +6,6 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,194 +15,188 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x13\x61\x64\x61pter_types.proto\x12\x0bproto_types\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto"\xab\x02\n\x16\x41\x64\x61pterCommonEventInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0b\n\x03msg\x18\x03 \x01(\t\x12\r\n\x05level\x18\x04 \x01(\t\x12\x15\n\rinvocation_id\x18\x05 \x01(\t\x12\x0b\n\x03pid\x18\x06 \x01(\x05\x12\x0e\n\x06thread\x18\x07 \x01(\t\x12&\n\x02ts\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\x05\x65xtra\x18\t \x03(\x0b\x32..proto_types.AdapterCommonEventInfo.ExtraEntry\x12\x10\n\x08\x63\x61tegory\x18\n \x01(\t\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"]\n\x13\x41\x64\x61pterNodeRelation\x12\x10\n\x08\x64\x61tabase\x18\n \x01(\t\x12\x0e\n\x06schema\x18\x0b \x01(\t\x12\r\n\x05\x61lias\x18\x0c \x01(\t\x12\x15\n\rrelation_name\x18\r \x01(\t"\x9f\x02\n\x0f\x41\x64\x61pterNodeInfo\x12\x11\n\tnode_path\x18\x01 \x01(\t\x12\x11\n\tnode_name\x18\x02 \x01(\t\x12\x11\n\tunique_id\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\x14\n\x0cmaterialized\x18\x05 \x01(\t\x12\x13\n\x0bnode_status\x18\x06 \x01(\t\x12\x17\n\x0fnode_started_at\x18\x07 \x01(\t\x12\x18\n\x10node_finished_at\x18\x08 \x01(\t\x12%\n\x04meta\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x37\n\rnode_relation\x18\n \x01(\x0b\x32 .proto_types.AdapterNodeRelation"G\n\x0fReferenceKeyMsg\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x12\n\nidentifier\x18\x03 \x01(\t"?\n\x19\x41\x64\x61pterDeprecationWarning\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t"\x87\x01\n\x1c\x41\x64\x61pterDeprecationWarningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.AdapterDeprecationWarning"!\n\x1f\x43ollectFreshnessReturnSignature"\x93\x01\n"CollectFreshnessReturnSignatureMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12:\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32,.proto_types.CollectFreshnessReturnSignature"\x8e\x01\n\x11\x41\x64\x61pterEventDebug\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue"w\n\x14\x41\x64\x61pterEventDebugMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterEventDebug"\x8d\x01\n\x10\x41\x64\x61pterEventInfo\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue"u\n\x13\x41\x64\x61pterEventInfoMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.AdapterEventInfo"\x90\x01\n\x13\x41\x64\x61pterEventWarning\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue"{\n\x16\x41\x64\x61pterEventWarningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.AdapterEventWarning"\xa0\x01\n\x11\x41\x64\x61pterEventError\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue\x12\x10\n\x08\x65xc_info\x18\x05 \x01(\t"w\n\x14\x41\x64\x61pterEventErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterEventError"f\n\rNewConnection\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_type\x18\x02 \x01(\t\x12\x11\n\tconn_name\x18\x03 \x01(\t"o\n\x10NewConnectionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.NewConnection"=\n\x10\x43onnectionReused\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x16\n\x0eorig_conn_name\x18\x02 \x01(\t"u\n\x13\x43onnectionReusedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.ConnectionReused"0\n\x1b\x43onnectionLeftOpenInCleanup\x12\x11\n\tconn_name\x18\x01 \x01(\t"\x8b\x01\n\x1e\x43onnectionLeftOpenInCleanupMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConnectionLeftOpenInCleanup".\n\x19\x43onnectionClosedInCleanup\x12\x11\n\tconn_name\x18\x01 \x01(\t"\x87\x01\n\x1c\x43onnectionClosedInCleanupMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.ConnectionClosedInCleanup"f\n\x0eRollbackFailed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\x12\x10\n\x08\x65xc_info\x18\x03 \x01(\t"q\n\x11RollbackFailedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.RollbackFailed"V\n\x10\x43onnectionClosed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t"u\n\x13\x43onnectionClosedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.ConnectionClosed"X\n\x12\x43onnectionLeftOpen\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t"y\n\x15\x43onnectionLeftOpenMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.ConnectionLeftOpen"N\n\x08Rollback\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t"e\n\x0bRollbackMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12#\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x15.proto_types.Rollback"@\n\tCacheMiss\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t"g\n\x0c\x43\x61\x63heMissMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.proto_types.CacheMiss"b\n\rListRelations\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12/\n\trelations\x18\x03 \x03(\x0b\x32\x1c.proto_types.ReferenceKeyMsg"o\n\x10ListRelationsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.ListRelations"g\n\x0e\x43onnectionUsed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_type\x18\x02 \x01(\t\x12\x11\n\tconn_name\x18\x03 \x01(\t"q\n\x11\x43onnectionUsedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.ConnectionUsed"[\n\x08SQLQuery\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\x12\x0b\n\x03sql\x18\x03 \x01(\t"e\n\x0bSQLQueryMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12#\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x15.proto_types.SQLQuery"b\n\x0eSQLQueryStatus\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x0f\n\x07\x65lapsed\x18\x03 \x01(\x02"q\n\x11SQLQueryStatusMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.SQLQueryStatus"O\n\tSQLCommit\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t"g\n\x0cSQLCommitMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.proto_types.SQLCommit"a\n\rColTypeChange\x12\x11\n\torig_type\x18\x01 \x01(\t\x12\x10\n\x08new_type\x18\x02 \x01(\t\x12+\n\x05table\x18\x03 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg"o\n\x10\x43olTypeChangeMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.ColTypeChange"@\n\x0eSchemaCreation\x12.\n\x08relation\x18\x01 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg"q\n\x11SchemaCreationMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.SchemaCreation"<\n\nSchemaDrop\x12.\n\x08relation\x18\x01 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg"i\n\rSchemaDropMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.proto_types.SchemaDrop"\xde\x01\n\x0b\x43\x61\x63heAction\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\x12-\n\x07ref_key\x18\x02 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12/\n\tref_key_2\x18\x03 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12/\n\tref_key_3\x18\x04 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12.\n\x08ref_list\x18\x05 \x03(\x0b\x32\x1c.proto_types.ReferenceKeyMsg"k\n\x0e\x43\x61\x63heActionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12&\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x18.proto_types.CacheAction"\x98\x01\n\x0e\x43\x61\x63heDumpGraph\x12\x33\n\x04\x64ump\x18\x01 \x03(\x0b\x32%.proto_types.CacheDumpGraph.DumpEntry\x12\x14\n\x0c\x62\x65\x66ore_after\x18\x02 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x1a+\n\tDumpEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"q\n\x11\x43\x61\x63heDumpGraphMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.CacheDumpGraph"B\n\x11\x41\x64\x61pterRegistered\x12\x14\n\x0c\x61\x64\x61pter_name\x18\x01 \x01(\t\x12\x17\n\x0f\x61\x64\x61pter_version\x18\x02 \x01(\t"w\n\x14\x41\x64\x61pterRegisteredMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterRegistered"!\n\x12\x41\x64\x61pterImportError\x12\x0b\n\x03\x65xc\x18\x01 \x01(\t"y\n\x15\x41\x64\x61pterImportErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.AdapterImportError"#\n\x0fPluginLoadError\x12\x10\n\x08\x65xc_info\x18\x01 \x01(\t"s\n\x12PluginLoadErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.PluginLoadError"a\n\x14NewConnectionOpening\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x18\n\x10\x63onnection_state\x18\x02 \x01(\t"}\n\x17NewConnectionOpeningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12/\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32!.proto_types.NewConnectionOpening"8\n\rCodeExecution\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ode_content\x18\x02 \x01(\t"o\n\x10\x43odeExecutionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.CodeExecution"6\n\x13\x43odeExecutionStatus\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x0f\n\x07\x65lapsed\x18\x02 \x01(\x02"{\n\x16\x43odeExecutionStatusMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.CodeExecutionStatus"%\n\x16\x43\x61talogGenerationError\x12\x0b\n\x03\x65xc\x18\x01 \x01(\t"\x81\x01\n\x19\x43\x61talogGenerationErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x31\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32#.proto_types.CatalogGenerationError"-\n\x13WriteCatalogFailure\x12\x16\n\x0enum_exceptions\x18\x01 \x01(\x05"{\n\x16WriteCatalogFailureMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.WriteCatalogFailure"\x1e\n\x0e\x43\x61talogWritten\x12\x0c\n\x04path\x18\x01 \x01(\t"q\n\x11\x43\x61talogWrittenMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.CatalogWritten"\x14\n\x12\x43\x61nnotGenerateDocs"y\n\x15\x43\x61nnotGenerateDocsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.CannotGenerateDocs"\x11\n\x0f\x42uildingCatalog"s\n\x12\x42uildingCatalogMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.BuildingCatalog"-\n\x18\x44\x61tabaseErrorRunningHook\x12\x11\n\thook_type\x18\x01 \x01(\t"\x85\x01\n\x1b\x44\x61tabaseErrorRunningHookMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x33\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.proto_types.DatabaseErrorRunningHook"4\n\x0cHooksRunning\x12\x11\n\tnum_hooks\x18\x01 \x01(\x05\x12\x11\n\thook_type\x18\x02 \x01(\t"m\n\x0fHooksRunningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\'\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x19.proto_types.HooksRunning"T\n\x14\x46inishedRunningStats\x12\x11\n\tstat_line\x18\x01 \x01(\t\x12\x11\n\texecution\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_time\x18\x03 \x01(\x02"}\n\x17\x46inishedRunningStatsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12/\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32!.proto_types.FinishedRunningStats"<\n\x15\x43onstraintNotEnforced\x12\x12\n\nconstraint\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t"\x7f\n\x18\x43onstraintNotEnforcedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x30\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32".proto_types.ConstraintNotEnforced"=\n\x16\x43onstraintNotSupported\x12\x12\n\nconstraint\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t"\x81\x01\n\x19\x43onstraintNotSupportedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x31\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32#.proto_types.ConstraintNotSupportedb\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x61\x64\x61pter_types.proto\x12\x0bproto_types\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xab\x02\n\x16\x41\x64\x61pterCommonEventInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0b\n\x03msg\x18\x03 \x01(\t\x12\r\n\x05level\x18\x04 \x01(\t\x12\x15\n\rinvocation_id\x18\x05 \x01(\t\x12\x0b\n\x03pid\x18\x06 \x01(\x05\x12\x0e\n\x06thread\x18\x07 \x01(\t\x12&\n\x02ts\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\x05\x65xtra\x18\t \x03(\x0b\x32..proto_types.AdapterCommonEventInfo.ExtraEntry\x12\x10\n\x08\x63\x61tegory\x18\n \x01(\t\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"]\n\x13\x41\x64\x61pterNodeRelation\x12\x10\n\x08\x64\x61tabase\x18\n \x01(\t\x12\x0e\n\x06schema\x18\x0b \x01(\t\x12\r\n\x05\x61lias\x18\x0c \x01(\t\x12\x15\n\rrelation_name\x18\r \x01(\t\"\x9f\x02\n\x0f\x41\x64\x61pterNodeInfo\x12\x11\n\tnode_path\x18\x01 \x01(\t\x12\x11\n\tnode_name\x18\x02 \x01(\t\x12\x11\n\tunique_id\x18\x03 \x01(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\x14\n\x0cmaterialized\x18\x05 \x01(\t\x12\x13\n\x0bnode_status\x18\x06 \x01(\t\x12\x17\n\x0fnode_started_at\x18\x07 \x01(\t\x12\x18\n\x10node_finished_at\x18\x08 \x01(\t\x12%\n\x04meta\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x37\n\rnode_relation\x18\n \x01(\x0b\x32 .proto_types.AdapterNodeRelation\"G\n\x0fReferenceKeyMsg\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x12\n\nidentifier\x18\x03 \x01(\t\"?\n\x19\x41\x64\x61pterDeprecationWarning\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"\x87\x01\n\x1c\x41\x64\x61pterDeprecationWarningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.AdapterDeprecationWarning\"!\n\x1f\x43ollectFreshnessReturnSignature\"\x93\x01\n\"CollectFreshnessReturnSignatureMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12:\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32,.proto_types.CollectFreshnessReturnSignature\"\x8e\x01\n\x11\x41\x64\x61pterEventDebug\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue\"w\n\x14\x41\x64\x61pterEventDebugMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterEventDebug\"\x8d\x01\n\x10\x41\x64\x61pterEventInfo\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue\"u\n\x13\x41\x64\x61pterEventInfoMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.AdapterEventInfo\"\x90\x01\n\x13\x41\x64\x61pterEventWarning\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue\"{\n\x16\x41\x64\x61pterEventWarningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.AdapterEventWarning\"\xa0\x01\n\x11\x41\x64\x61pterEventError\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_msg\x18\x03 \x01(\t\x12(\n\x04\x61rgs\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValue\x12\x10\n\x08\x65xc_info\x18\x05 \x01(\t\"w\n\x14\x41\x64\x61pterEventErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterEventError\"f\n\rNewConnection\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_type\x18\x02 \x01(\t\x12\x11\n\tconn_name\x18\x03 \x01(\t\"o\n\x10NewConnectionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.NewConnection\"=\n\x10\x43onnectionReused\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x16\n\x0eorig_conn_name\x18\x02 \x01(\t\"u\n\x13\x43onnectionReusedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.ConnectionReused\"0\n\x1b\x43onnectionLeftOpenInCleanup\x12\x11\n\tconn_name\x18\x01 \x01(\t\"\x8b\x01\n\x1e\x43onnectionLeftOpenInCleanupMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConnectionLeftOpenInCleanup\".\n\x19\x43onnectionClosedInCleanup\x12\x11\n\tconn_name\x18\x01 \x01(\t\"\x87\x01\n\x1c\x43onnectionClosedInCleanupMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.ConnectionClosedInCleanup\"f\n\x0eRollbackFailed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\x12\x10\n\x08\x65xc_info\x18\x03 \x01(\t\"q\n\x11RollbackFailedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.RollbackFailed\"V\n\x10\x43onnectionClosed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\"u\n\x13\x43onnectionClosedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1d.proto_types.ConnectionClosed\"X\n\x12\x43onnectionLeftOpen\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\"y\n\x15\x43onnectionLeftOpenMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.ConnectionLeftOpen\"N\n\x08Rollback\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\"e\n\x0bRollbackMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12#\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x15.proto_types.Rollback\"@\n\tCacheMiss\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\"g\n\x0c\x43\x61\x63heMissMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.proto_types.CacheMiss\"b\n\rListRelations\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12/\n\trelations\x18\x03 \x03(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\"o\n\x10ListRelationsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.ListRelations\"g\n\x0e\x43onnectionUsed\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_type\x18\x02 \x01(\t\x12\x11\n\tconn_name\x18\x03 \x01(\t\"q\n\x11\x43onnectionUsedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.ConnectionUsed\"[\n\x08SQLQuery\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\x12\x0b\n\x03sql\x18\x03 \x01(\t\"e\n\x0bSQLQueryMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12#\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x15.proto_types.SQLQuery\"b\n\x0eSQLQueryStatus\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x0f\n\x07\x65lapsed\x18\x03 \x01(\x02\"q\n\x11SQLQueryStatusMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.SQLQueryStatus\"O\n\tSQLCommit\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x11\n\tconn_name\x18\x02 \x01(\t\"g\n\x0cSQLCommitMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.proto_types.SQLCommit\"a\n\rColTypeChange\x12\x11\n\torig_type\x18\x01 \x01(\t\x12\x10\n\x08new_type\x18\x02 \x01(\t\x12+\n\x05table\x18\x03 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\"o\n\x10\x43olTypeChangeMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.ColTypeChange\"@\n\x0eSchemaCreation\x12.\n\x08relation\x18\x01 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\"q\n\x11SchemaCreationMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.SchemaCreation\"<\n\nSchemaDrop\x12.\n\x08relation\x18\x01 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\"i\n\rSchemaDropMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.proto_types.SchemaDrop\"\xde\x01\n\x0b\x43\x61\x63heAction\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\x12-\n\x07ref_key\x18\x02 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12/\n\tref_key_2\x18\x03 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12/\n\tref_key_3\x18\x04 \x01(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\x12.\n\x08ref_list\x18\x05 \x03(\x0b\x32\x1c.proto_types.ReferenceKeyMsg\"k\n\x0e\x43\x61\x63heActionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12&\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x18.proto_types.CacheAction\"\x98\x01\n\x0e\x43\x61\x63heDumpGraph\x12\x33\n\x04\x64ump\x18\x01 \x03(\x0b\x32%.proto_types.CacheDumpGraph.DumpEntry\x12\x14\n\x0c\x62\x65\x66ore_after\x18\x02 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x1a+\n\tDumpEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x11\x43\x61\x63heDumpGraphMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.CacheDumpGraph\"!\n\x12\x41\x64\x61pterImportError\x12\x0b\n\x03\x65xc\x18\x01 \x01(\t\"y\n\x15\x41\x64\x61pterImportErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.AdapterImportError\"#\n\x0fPluginLoadError\x12\x10\n\x08\x65xc_info\x18\x01 \x01(\t\"s\n\x12PluginLoadErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.PluginLoadError\"a\n\x14NewConnectionOpening\x12/\n\tnode_info\x18\x01 \x01(\x0b\x32\x1c.proto_types.AdapterNodeInfo\x12\x18\n\x10\x63onnection_state\x18\x02 \x01(\t\"}\n\x17NewConnectionOpeningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12/\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32!.proto_types.NewConnectionOpening\"8\n\rCodeExecution\x12\x11\n\tconn_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ode_content\x18\x02 \x01(\t\"o\n\x10\x43odeExecutionMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12(\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1a.proto_types.CodeExecution\"6\n\x13\x43odeExecutionStatus\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x0f\n\x07\x65lapsed\x18\x02 \x01(\x02\"{\n\x16\x43odeExecutionStatusMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.CodeExecutionStatus\"%\n\x16\x43\x61talogGenerationError\x12\x0b\n\x03\x65xc\x18\x01 \x01(\t\"\x81\x01\n\x19\x43\x61talogGenerationErrorMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x31\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32#.proto_types.CatalogGenerationError\"-\n\x13WriteCatalogFailure\x12\x16\n\x0enum_exceptions\x18\x01 \x01(\x05\"{\n\x16WriteCatalogFailureMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.WriteCatalogFailure\"\x1e\n\x0e\x43\x61talogWritten\x12\x0c\n\x04path\x18\x01 \x01(\t\"q\n\x11\x43\x61talogWrittenMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.proto_types.CatalogWritten\"\x14\n\x12\x43\x61nnotGenerateDocs\"y\n\x15\x43\x61nnotGenerateDocsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12-\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1f.proto_types.CannotGenerateDocs\"\x11\n\x0f\x42uildingCatalog\"s\n\x12\x42uildingCatalogMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.BuildingCatalog\"-\n\x18\x44\x61tabaseErrorRunningHook\x12\x11\n\thook_type\x18\x01 \x01(\t\"\x85\x01\n\x1b\x44\x61tabaseErrorRunningHookMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x33\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.proto_types.DatabaseErrorRunningHook\"4\n\x0cHooksRunning\x12\x11\n\tnum_hooks\x18\x01 \x01(\x05\x12\x11\n\thook_type\x18\x02 \x01(\t\"m\n\x0fHooksRunningMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\'\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x19.proto_types.HooksRunning\"T\n\x14\x46inishedRunningStats\x12\x11\n\tstat_line\x18\x01 \x01(\t\x12\x11\n\texecution\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_time\x18\x03 \x01(\x02\"}\n\x17\x46inishedRunningStatsMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12/\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32!.proto_types.FinishedRunningStats\"<\n\x15\x43onstraintNotEnforced\x12\x12\n\nconstraint\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t\"\x7f\n\x18\x43onstraintNotEnforcedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x30\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\".proto_types.ConstraintNotEnforced\"=\n\x16\x43onstraintNotSupported\x12\x12\n\nconstraint\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t\"\x81\x01\n\x19\x43onstraintNotSupportedMsg\x12\x31\n\x04info\x18\x01 \x01(\x0b\x32#.proto_types.AdapterCommonEventInfo\x12\x31\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32#.proto_types.ConstraintNotSupportedb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "adapter_types_pb2", _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'adapter_types_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _ADAPTERCOMMONEVENTINFO_EXTRAENTRY._options = None - _ADAPTERCOMMONEVENTINFO_EXTRAENTRY._serialized_options = b"8\001" - _CACHEDUMPGRAPH_DUMPENTRY._options = None - _CACHEDUMPGRAPH_DUMPENTRY._serialized_options = b"8\001" - _globals["_ADAPTERCOMMONEVENTINFO"]._serialized_start = 100 - _globals["_ADAPTERCOMMONEVENTINFO"]._serialized_end = 399 - _globals["_ADAPTERCOMMONEVENTINFO_EXTRAENTRY"]._serialized_start = 355 - _globals["_ADAPTERCOMMONEVENTINFO_EXTRAENTRY"]._serialized_end = 399 - _globals["_ADAPTERNODERELATION"]._serialized_start = 401 - _globals["_ADAPTERNODERELATION"]._serialized_end = 494 - _globals["_ADAPTERNODEINFO"]._serialized_start = 497 - _globals["_ADAPTERNODEINFO"]._serialized_end = 784 - _globals["_REFERENCEKEYMSG"]._serialized_start = 786 - _globals["_REFERENCEKEYMSG"]._serialized_end = 857 - _globals["_ADAPTERDEPRECATIONWARNING"]._serialized_start = 859 - _globals["_ADAPTERDEPRECATIONWARNING"]._serialized_end = 922 - _globals["_ADAPTERDEPRECATIONWARNINGMSG"]._serialized_start = 925 - _globals["_ADAPTERDEPRECATIONWARNINGMSG"]._serialized_end = 1060 - _globals["_COLLECTFRESHNESSRETURNSIGNATURE"]._serialized_start = 1062 - _globals["_COLLECTFRESHNESSRETURNSIGNATURE"]._serialized_end = 1095 - _globals["_COLLECTFRESHNESSRETURNSIGNATUREMSG"]._serialized_start = 1098 - _globals["_COLLECTFRESHNESSRETURNSIGNATUREMSG"]._serialized_end = 1245 - _globals["_ADAPTEREVENTDEBUG"]._serialized_start = 1248 - _globals["_ADAPTEREVENTDEBUG"]._serialized_end = 1390 - _globals["_ADAPTEREVENTDEBUGMSG"]._serialized_start = 1392 - _globals["_ADAPTEREVENTDEBUGMSG"]._serialized_end = 1511 - _globals["_ADAPTEREVENTINFO"]._serialized_start = 1514 - _globals["_ADAPTEREVENTINFO"]._serialized_end = 1655 - _globals["_ADAPTEREVENTINFOMSG"]._serialized_start = 1657 - _globals["_ADAPTEREVENTINFOMSG"]._serialized_end = 1774 - _globals["_ADAPTEREVENTWARNING"]._serialized_start = 1777 - _globals["_ADAPTEREVENTWARNING"]._serialized_end = 1921 - _globals["_ADAPTEREVENTWARNINGMSG"]._serialized_start = 1923 - _globals["_ADAPTEREVENTWARNINGMSG"]._serialized_end = 2046 - _globals["_ADAPTEREVENTERROR"]._serialized_start = 2049 - _globals["_ADAPTEREVENTERROR"]._serialized_end = 2209 - _globals["_ADAPTEREVENTERRORMSG"]._serialized_start = 2211 - _globals["_ADAPTEREVENTERRORMSG"]._serialized_end = 2330 - _globals["_NEWCONNECTION"]._serialized_start = 2332 - _globals["_NEWCONNECTION"]._serialized_end = 2434 - _globals["_NEWCONNECTIONMSG"]._serialized_start = 2436 - _globals["_NEWCONNECTIONMSG"]._serialized_end = 2547 - _globals["_CONNECTIONREUSED"]._serialized_start = 2549 - _globals["_CONNECTIONREUSED"]._serialized_end = 2610 - _globals["_CONNECTIONREUSEDMSG"]._serialized_start = 2612 - _globals["_CONNECTIONREUSEDMSG"]._serialized_end = 2729 - _globals["_CONNECTIONLEFTOPENINCLEANUP"]._serialized_start = 2731 - _globals["_CONNECTIONLEFTOPENINCLEANUP"]._serialized_end = 2779 - _globals["_CONNECTIONLEFTOPENINCLEANUPMSG"]._serialized_start = 2782 - _globals["_CONNECTIONLEFTOPENINCLEANUPMSG"]._serialized_end = 2921 - _globals["_CONNECTIONCLOSEDINCLEANUP"]._serialized_start = 2923 - _globals["_CONNECTIONCLOSEDINCLEANUP"]._serialized_end = 2969 - _globals["_CONNECTIONCLOSEDINCLEANUPMSG"]._serialized_start = 2972 - _globals["_CONNECTIONCLOSEDINCLEANUPMSG"]._serialized_end = 3107 - _globals["_ROLLBACKFAILED"]._serialized_start = 3109 - _globals["_ROLLBACKFAILED"]._serialized_end = 3211 - _globals["_ROLLBACKFAILEDMSG"]._serialized_start = 3213 - _globals["_ROLLBACKFAILEDMSG"]._serialized_end = 3326 - _globals["_CONNECTIONCLOSED"]._serialized_start = 3328 - _globals["_CONNECTIONCLOSED"]._serialized_end = 3414 - _globals["_CONNECTIONCLOSEDMSG"]._serialized_start = 3416 - _globals["_CONNECTIONCLOSEDMSG"]._serialized_end = 3533 - _globals["_CONNECTIONLEFTOPEN"]._serialized_start = 3535 - _globals["_CONNECTIONLEFTOPEN"]._serialized_end = 3623 - _globals["_CONNECTIONLEFTOPENMSG"]._serialized_start = 3625 - _globals["_CONNECTIONLEFTOPENMSG"]._serialized_end = 3746 - _globals["_ROLLBACK"]._serialized_start = 3748 - _globals["_ROLLBACK"]._serialized_end = 3826 - _globals["_ROLLBACKMSG"]._serialized_start = 3828 - _globals["_ROLLBACKMSG"]._serialized_end = 3929 - _globals["_CACHEMISS"]._serialized_start = 3931 - _globals["_CACHEMISS"]._serialized_end = 3995 - _globals["_CACHEMISSMSG"]._serialized_start = 3997 - _globals["_CACHEMISSMSG"]._serialized_end = 4100 - _globals["_LISTRELATIONS"]._serialized_start = 4102 - _globals["_LISTRELATIONS"]._serialized_end = 4200 - _globals["_LISTRELATIONSMSG"]._serialized_start = 4202 - _globals["_LISTRELATIONSMSG"]._serialized_end = 4313 - _globals["_CONNECTIONUSED"]._serialized_start = 4315 - _globals["_CONNECTIONUSED"]._serialized_end = 4418 - _globals["_CONNECTIONUSEDMSG"]._serialized_start = 4420 - _globals["_CONNECTIONUSEDMSG"]._serialized_end = 4533 - _globals["_SQLQUERY"]._serialized_start = 4535 - _globals["_SQLQUERY"]._serialized_end = 4626 - _globals["_SQLQUERYMSG"]._serialized_start = 4628 - _globals["_SQLQUERYMSG"]._serialized_end = 4729 - _globals["_SQLQUERYSTATUS"]._serialized_start = 4731 - _globals["_SQLQUERYSTATUS"]._serialized_end = 4829 - _globals["_SQLQUERYSTATUSMSG"]._serialized_start = 4831 - _globals["_SQLQUERYSTATUSMSG"]._serialized_end = 4944 - _globals["_SQLCOMMIT"]._serialized_start = 4946 - _globals["_SQLCOMMIT"]._serialized_end = 5025 - _globals["_SQLCOMMITMSG"]._serialized_start = 5027 - _globals["_SQLCOMMITMSG"]._serialized_end = 5130 - _globals["_COLTYPECHANGE"]._serialized_start = 5132 - _globals["_COLTYPECHANGE"]._serialized_end = 5229 - _globals["_COLTYPECHANGEMSG"]._serialized_start = 5231 - _globals["_COLTYPECHANGEMSG"]._serialized_end = 5342 - _globals["_SCHEMACREATION"]._serialized_start = 5344 - _globals["_SCHEMACREATION"]._serialized_end = 5408 - _globals["_SCHEMACREATIONMSG"]._serialized_start = 5410 - _globals["_SCHEMACREATIONMSG"]._serialized_end = 5523 - _globals["_SCHEMADROP"]._serialized_start = 5525 - _globals["_SCHEMADROP"]._serialized_end = 5585 - _globals["_SCHEMADROPMSG"]._serialized_start = 5587 - _globals["_SCHEMADROPMSG"]._serialized_end = 5692 - _globals["_CACHEACTION"]._serialized_start = 5695 - _globals["_CACHEACTION"]._serialized_end = 5917 - _globals["_CACHEACTIONMSG"]._serialized_start = 5919 - _globals["_CACHEACTIONMSG"]._serialized_end = 6026 - _globals["_CACHEDUMPGRAPH"]._serialized_start = 6029 - _globals["_CACHEDUMPGRAPH"]._serialized_end = 6181 - _globals["_CACHEDUMPGRAPH_DUMPENTRY"]._serialized_start = 6138 - _globals["_CACHEDUMPGRAPH_DUMPENTRY"]._serialized_end = 6181 - _globals["_CACHEDUMPGRAPHMSG"]._serialized_start = 6183 - _globals["_CACHEDUMPGRAPHMSG"]._serialized_end = 6296 - _globals["_ADAPTERREGISTERED"]._serialized_start = 6298 - _globals["_ADAPTERREGISTERED"]._serialized_end = 6364 - _globals["_ADAPTERREGISTEREDMSG"]._serialized_start = 6366 - _globals["_ADAPTERREGISTEREDMSG"]._serialized_end = 6485 - _globals["_ADAPTERIMPORTERROR"]._serialized_start = 6487 - _globals["_ADAPTERIMPORTERROR"]._serialized_end = 6520 - _globals["_ADAPTERIMPORTERRORMSG"]._serialized_start = 6522 - _globals["_ADAPTERIMPORTERRORMSG"]._serialized_end = 6643 - _globals["_PLUGINLOADERROR"]._serialized_start = 6645 - _globals["_PLUGINLOADERROR"]._serialized_end = 6680 - _globals["_PLUGINLOADERRORMSG"]._serialized_start = 6682 - _globals["_PLUGINLOADERRORMSG"]._serialized_end = 6797 - _globals["_NEWCONNECTIONOPENING"]._serialized_start = 6799 - _globals["_NEWCONNECTIONOPENING"]._serialized_end = 6896 - _globals["_NEWCONNECTIONOPENINGMSG"]._serialized_start = 6898 - _globals["_NEWCONNECTIONOPENINGMSG"]._serialized_end = 7023 - _globals["_CODEEXECUTION"]._serialized_start = 7025 - _globals["_CODEEXECUTION"]._serialized_end = 7081 - _globals["_CODEEXECUTIONMSG"]._serialized_start = 7083 - _globals["_CODEEXECUTIONMSG"]._serialized_end = 7194 - _globals["_CODEEXECUTIONSTATUS"]._serialized_start = 7196 - _globals["_CODEEXECUTIONSTATUS"]._serialized_end = 7250 - _globals["_CODEEXECUTIONSTATUSMSG"]._serialized_start = 7252 - _globals["_CODEEXECUTIONSTATUSMSG"]._serialized_end = 7375 - _globals["_CATALOGGENERATIONERROR"]._serialized_start = 7377 - _globals["_CATALOGGENERATIONERROR"]._serialized_end = 7414 - _globals["_CATALOGGENERATIONERRORMSG"]._serialized_start = 7417 - _globals["_CATALOGGENERATIONERRORMSG"]._serialized_end = 7546 - _globals["_WRITECATALOGFAILURE"]._serialized_start = 7548 - _globals["_WRITECATALOGFAILURE"]._serialized_end = 7593 - _globals["_WRITECATALOGFAILUREMSG"]._serialized_start = 7595 - _globals["_WRITECATALOGFAILUREMSG"]._serialized_end = 7718 - _globals["_CATALOGWRITTEN"]._serialized_start = 7720 - _globals["_CATALOGWRITTEN"]._serialized_end = 7750 - _globals["_CATALOGWRITTENMSG"]._serialized_start = 7752 - _globals["_CATALOGWRITTENMSG"]._serialized_end = 7865 - _globals["_CANNOTGENERATEDOCS"]._serialized_start = 7867 - _globals["_CANNOTGENERATEDOCS"]._serialized_end = 7887 - _globals["_CANNOTGENERATEDOCSMSG"]._serialized_start = 7889 - _globals["_CANNOTGENERATEDOCSMSG"]._serialized_end = 8010 - _globals["_BUILDINGCATALOG"]._serialized_start = 8012 - _globals["_BUILDINGCATALOG"]._serialized_end = 8029 - _globals["_BUILDINGCATALOGMSG"]._serialized_start = 8031 - _globals["_BUILDINGCATALOGMSG"]._serialized_end = 8146 - _globals["_DATABASEERRORRUNNINGHOOK"]._serialized_start = 8148 - _globals["_DATABASEERRORRUNNINGHOOK"]._serialized_end = 8193 - _globals["_DATABASEERRORRUNNINGHOOKMSG"]._serialized_start = 8196 - _globals["_DATABASEERRORRUNNINGHOOKMSG"]._serialized_end = 8329 - _globals["_HOOKSRUNNING"]._serialized_start = 8331 - _globals["_HOOKSRUNNING"]._serialized_end = 8383 - _globals["_HOOKSRUNNINGMSG"]._serialized_start = 8385 - _globals["_HOOKSRUNNINGMSG"]._serialized_end = 8494 - _globals["_FINISHEDRUNNINGSTATS"]._serialized_start = 8496 - _globals["_FINISHEDRUNNINGSTATS"]._serialized_end = 8580 - _globals["_FINISHEDRUNNINGSTATSMSG"]._serialized_start = 8582 - _globals["_FINISHEDRUNNINGSTATSMSG"]._serialized_end = 8707 - _globals["_CONSTRAINTNOTENFORCED"]._serialized_start = 8709 - _globals["_CONSTRAINTNOTENFORCED"]._serialized_end = 8769 - _globals["_CONSTRAINTNOTENFORCEDMSG"]._serialized_start = 8771 - _globals["_CONSTRAINTNOTENFORCEDMSG"]._serialized_end = 8898 - _globals["_CONSTRAINTNOTSUPPORTED"]._serialized_start = 8900 - _globals["_CONSTRAINTNOTSUPPORTED"]._serialized_end = 8961 - _globals["_CONSTRAINTNOTSUPPORTEDMSG"]._serialized_start = 8964 - _globals["_CONSTRAINTNOTSUPPORTEDMSG"]._serialized_end = 9093 + DESCRIPTOR._options = None + _ADAPTERCOMMONEVENTINFO_EXTRAENTRY._options = None + _ADAPTERCOMMONEVENTINFO_EXTRAENTRY._serialized_options = b'8\001' + _CACHEDUMPGRAPH_DUMPENTRY._options = None + _CACHEDUMPGRAPH_DUMPENTRY._serialized_options = b'8\001' + _globals['_ADAPTERCOMMONEVENTINFO']._serialized_start=100 + _globals['_ADAPTERCOMMONEVENTINFO']._serialized_end=399 + _globals['_ADAPTERCOMMONEVENTINFO_EXTRAENTRY']._serialized_start=355 + _globals['_ADAPTERCOMMONEVENTINFO_EXTRAENTRY']._serialized_end=399 + _globals['_ADAPTERNODERELATION']._serialized_start=401 + _globals['_ADAPTERNODERELATION']._serialized_end=494 + _globals['_ADAPTERNODEINFO']._serialized_start=497 + _globals['_ADAPTERNODEINFO']._serialized_end=784 + _globals['_REFERENCEKEYMSG']._serialized_start=786 + _globals['_REFERENCEKEYMSG']._serialized_end=857 + _globals['_ADAPTERDEPRECATIONWARNING']._serialized_start=859 + _globals['_ADAPTERDEPRECATIONWARNING']._serialized_end=922 + _globals['_ADAPTERDEPRECATIONWARNINGMSG']._serialized_start=925 + _globals['_ADAPTERDEPRECATIONWARNINGMSG']._serialized_end=1060 + _globals['_COLLECTFRESHNESSRETURNSIGNATURE']._serialized_start=1062 + _globals['_COLLECTFRESHNESSRETURNSIGNATURE']._serialized_end=1095 + _globals['_COLLECTFRESHNESSRETURNSIGNATUREMSG']._serialized_start=1098 + _globals['_COLLECTFRESHNESSRETURNSIGNATUREMSG']._serialized_end=1245 + _globals['_ADAPTEREVENTDEBUG']._serialized_start=1248 + _globals['_ADAPTEREVENTDEBUG']._serialized_end=1390 + _globals['_ADAPTEREVENTDEBUGMSG']._serialized_start=1392 + _globals['_ADAPTEREVENTDEBUGMSG']._serialized_end=1511 + _globals['_ADAPTEREVENTINFO']._serialized_start=1514 + _globals['_ADAPTEREVENTINFO']._serialized_end=1655 + _globals['_ADAPTEREVENTINFOMSG']._serialized_start=1657 + _globals['_ADAPTEREVENTINFOMSG']._serialized_end=1774 + _globals['_ADAPTEREVENTWARNING']._serialized_start=1777 + _globals['_ADAPTEREVENTWARNING']._serialized_end=1921 + _globals['_ADAPTEREVENTWARNINGMSG']._serialized_start=1923 + _globals['_ADAPTEREVENTWARNINGMSG']._serialized_end=2046 + _globals['_ADAPTEREVENTERROR']._serialized_start=2049 + _globals['_ADAPTEREVENTERROR']._serialized_end=2209 + _globals['_ADAPTEREVENTERRORMSG']._serialized_start=2211 + _globals['_ADAPTEREVENTERRORMSG']._serialized_end=2330 + _globals['_NEWCONNECTION']._serialized_start=2332 + _globals['_NEWCONNECTION']._serialized_end=2434 + _globals['_NEWCONNECTIONMSG']._serialized_start=2436 + _globals['_NEWCONNECTIONMSG']._serialized_end=2547 + _globals['_CONNECTIONREUSED']._serialized_start=2549 + _globals['_CONNECTIONREUSED']._serialized_end=2610 + _globals['_CONNECTIONREUSEDMSG']._serialized_start=2612 + _globals['_CONNECTIONREUSEDMSG']._serialized_end=2729 + _globals['_CONNECTIONLEFTOPENINCLEANUP']._serialized_start=2731 + _globals['_CONNECTIONLEFTOPENINCLEANUP']._serialized_end=2779 + _globals['_CONNECTIONLEFTOPENINCLEANUPMSG']._serialized_start=2782 + _globals['_CONNECTIONLEFTOPENINCLEANUPMSG']._serialized_end=2921 + _globals['_CONNECTIONCLOSEDINCLEANUP']._serialized_start=2923 + _globals['_CONNECTIONCLOSEDINCLEANUP']._serialized_end=2969 + _globals['_CONNECTIONCLOSEDINCLEANUPMSG']._serialized_start=2972 + _globals['_CONNECTIONCLOSEDINCLEANUPMSG']._serialized_end=3107 + _globals['_ROLLBACKFAILED']._serialized_start=3109 + _globals['_ROLLBACKFAILED']._serialized_end=3211 + _globals['_ROLLBACKFAILEDMSG']._serialized_start=3213 + _globals['_ROLLBACKFAILEDMSG']._serialized_end=3326 + _globals['_CONNECTIONCLOSED']._serialized_start=3328 + _globals['_CONNECTIONCLOSED']._serialized_end=3414 + _globals['_CONNECTIONCLOSEDMSG']._serialized_start=3416 + _globals['_CONNECTIONCLOSEDMSG']._serialized_end=3533 + _globals['_CONNECTIONLEFTOPEN']._serialized_start=3535 + _globals['_CONNECTIONLEFTOPEN']._serialized_end=3623 + _globals['_CONNECTIONLEFTOPENMSG']._serialized_start=3625 + _globals['_CONNECTIONLEFTOPENMSG']._serialized_end=3746 + _globals['_ROLLBACK']._serialized_start=3748 + _globals['_ROLLBACK']._serialized_end=3826 + _globals['_ROLLBACKMSG']._serialized_start=3828 + _globals['_ROLLBACKMSG']._serialized_end=3929 + _globals['_CACHEMISS']._serialized_start=3931 + _globals['_CACHEMISS']._serialized_end=3995 + _globals['_CACHEMISSMSG']._serialized_start=3997 + _globals['_CACHEMISSMSG']._serialized_end=4100 + _globals['_LISTRELATIONS']._serialized_start=4102 + _globals['_LISTRELATIONS']._serialized_end=4200 + _globals['_LISTRELATIONSMSG']._serialized_start=4202 + _globals['_LISTRELATIONSMSG']._serialized_end=4313 + _globals['_CONNECTIONUSED']._serialized_start=4315 + _globals['_CONNECTIONUSED']._serialized_end=4418 + _globals['_CONNECTIONUSEDMSG']._serialized_start=4420 + _globals['_CONNECTIONUSEDMSG']._serialized_end=4533 + _globals['_SQLQUERY']._serialized_start=4535 + _globals['_SQLQUERY']._serialized_end=4626 + _globals['_SQLQUERYMSG']._serialized_start=4628 + _globals['_SQLQUERYMSG']._serialized_end=4729 + _globals['_SQLQUERYSTATUS']._serialized_start=4731 + _globals['_SQLQUERYSTATUS']._serialized_end=4829 + _globals['_SQLQUERYSTATUSMSG']._serialized_start=4831 + _globals['_SQLQUERYSTATUSMSG']._serialized_end=4944 + _globals['_SQLCOMMIT']._serialized_start=4946 + _globals['_SQLCOMMIT']._serialized_end=5025 + _globals['_SQLCOMMITMSG']._serialized_start=5027 + _globals['_SQLCOMMITMSG']._serialized_end=5130 + _globals['_COLTYPECHANGE']._serialized_start=5132 + _globals['_COLTYPECHANGE']._serialized_end=5229 + _globals['_COLTYPECHANGEMSG']._serialized_start=5231 + _globals['_COLTYPECHANGEMSG']._serialized_end=5342 + _globals['_SCHEMACREATION']._serialized_start=5344 + _globals['_SCHEMACREATION']._serialized_end=5408 + _globals['_SCHEMACREATIONMSG']._serialized_start=5410 + _globals['_SCHEMACREATIONMSG']._serialized_end=5523 + _globals['_SCHEMADROP']._serialized_start=5525 + _globals['_SCHEMADROP']._serialized_end=5585 + _globals['_SCHEMADROPMSG']._serialized_start=5587 + _globals['_SCHEMADROPMSG']._serialized_end=5692 + _globals['_CACHEACTION']._serialized_start=5695 + _globals['_CACHEACTION']._serialized_end=5917 + _globals['_CACHEACTIONMSG']._serialized_start=5919 + _globals['_CACHEACTIONMSG']._serialized_end=6026 + _globals['_CACHEDUMPGRAPH']._serialized_start=6029 + _globals['_CACHEDUMPGRAPH']._serialized_end=6181 + _globals['_CACHEDUMPGRAPH_DUMPENTRY']._serialized_start=6138 + _globals['_CACHEDUMPGRAPH_DUMPENTRY']._serialized_end=6181 + _globals['_CACHEDUMPGRAPHMSG']._serialized_start=6183 + _globals['_CACHEDUMPGRAPHMSG']._serialized_end=6296 + _globals['_ADAPTERIMPORTERROR']._serialized_start=6298 + _globals['_ADAPTERIMPORTERROR']._serialized_end=6331 + _globals['_ADAPTERIMPORTERRORMSG']._serialized_start=6333 + _globals['_ADAPTERIMPORTERRORMSG']._serialized_end=6454 + _globals['_PLUGINLOADERROR']._serialized_start=6456 + _globals['_PLUGINLOADERROR']._serialized_end=6491 + _globals['_PLUGINLOADERRORMSG']._serialized_start=6493 + _globals['_PLUGINLOADERRORMSG']._serialized_end=6608 + _globals['_NEWCONNECTIONOPENING']._serialized_start=6610 + _globals['_NEWCONNECTIONOPENING']._serialized_end=6707 + _globals['_NEWCONNECTIONOPENINGMSG']._serialized_start=6709 + _globals['_NEWCONNECTIONOPENINGMSG']._serialized_end=6834 + _globals['_CODEEXECUTION']._serialized_start=6836 + _globals['_CODEEXECUTION']._serialized_end=6892 + _globals['_CODEEXECUTIONMSG']._serialized_start=6894 + _globals['_CODEEXECUTIONMSG']._serialized_end=7005 + _globals['_CODEEXECUTIONSTATUS']._serialized_start=7007 + _globals['_CODEEXECUTIONSTATUS']._serialized_end=7061 + _globals['_CODEEXECUTIONSTATUSMSG']._serialized_start=7063 + _globals['_CODEEXECUTIONSTATUSMSG']._serialized_end=7186 + _globals['_CATALOGGENERATIONERROR']._serialized_start=7188 + _globals['_CATALOGGENERATIONERROR']._serialized_end=7225 + _globals['_CATALOGGENERATIONERRORMSG']._serialized_start=7228 + _globals['_CATALOGGENERATIONERRORMSG']._serialized_end=7357 + _globals['_WRITECATALOGFAILURE']._serialized_start=7359 + _globals['_WRITECATALOGFAILURE']._serialized_end=7404 + _globals['_WRITECATALOGFAILUREMSG']._serialized_start=7406 + _globals['_WRITECATALOGFAILUREMSG']._serialized_end=7529 + _globals['_CATALOGWRITTEN']._serialized_start=7531 + _globals['_CATALOGWRITTEN']._serialized_end=7561 + _globals['_CATALOGWRITTENMSG']._serialized_start=7563 + _globals['_CATALOGWRITTENMSG']._serialized_end=7676 + _globals['_CANNOTGENERATEDOCS']._serialized_start=7678 + _globals['_CANNOTGENERATEDOCS']._serialized_end=7698 + _globals['_CANNOTGENERATEDOCSMSG']._serialized_start=7700 + _globals['_CANNOTGENERATEDOCSMSG']._serialized_end=7821 + _globals['_BUILDINGCATALOG']._serialized_start=7823 + _globals['_BUILDINGCATALOG']._serialized_end=7840 + _globals['_BUILDINGCATALOGMSG']._serialized_start=7842 + _globals['_BUILDINGCATALOGMSG']._serialized_end=7957 + _globals['_DATABASEERRORRUNNINGHOOK']._serialized_start=7959 + _globals['_DATABASEERRORRUNNINGHOOK']._serialized_end=8004 + _globals['_DATABASEERRORRUNNINGHOOKMSG']._serialized_start=8007 + _globals['_DATABASEERRORRUNNINGHOOKMSG']._serialized_end=8140 + _globals['_HOOKSRUNNING']._serialized_start=8142 + _globals['_HOOKSRUNNING']._serialized_end=8194 + _globals['_HOOKSRUNNINGMSG']._serialized_start=8196 + _globals['_HOOKSRUNNINGMSG']._serialized_end=8305 + _globals['_FINISHEDRUNNINGSTATS']._serialized_start=8307 + _globals['_FINISHEDRUNNINGSTATS']._serialized_end=8391 + _globals['_FINISHEDRUNNINGSTATSMSG']._serialized_start=8393 + _globals['_FINISHEDRUNNINGSTATSMSG']._serialized_end=8518 + _globals['_CONSTRAINTNOTENFORCED']._serialized_start=8520 + _globals['_CONSTRAINTNOTENFORCED']._serialized_end=8580 + _globals['_CONSTRAINTNOTENFORCEDMSG']._serialized_start=8582 + _globals['_CONSTRAINTNOTENFORCEDMSG']._serialized_end=8709 + _globals['_CONSTRAINTNOTSUPPORTED']._serialized_start=8711 + _globals['_CONSTRAINTNOTSUPPORTED']._serialized_end=8772 + _globals['_CONSTRAINTNOTSUPPORTEDMSG']._serialized_start=8775 + _globals['_CONSTRAINTNOTSUPPORTEDMSG']._serialized_end=8904 # @@protoc_insertion_point(module_scope) diff --git a/core/dbt/adapters/events/types.py b/core/dbt/adapters/events/types.py index d3aa0a87214..d6a1ef62503 100644 --- a/core/dbt/adapters/events/types.py +++ b/core/dbt/adapters/events/types.py @@ -272,17 +272,7 @@ def message(self) -> str: return f"dump {self.before_after} {self.action} : {self.dump}" -# Skipping E032, E033, E034 - - -class AdapterRegistered(InfoLevel): - def code(self) -> str: - return "E034" - - def message(self) -> str: - return f"Registered adapter: {self.adapter_name}{self.adapter_version}" - - +# Skipping E032, E033 class AdapterImportError(InfoLevel): def code(self) -> str: return "E035" diff --git a/core/dbt/adapters/include/global_project/__init__.py b/core/dbt/adapters/include/global_project/__init__.py index 4043ffebb6e..bd2602683fc 100644 --- a/core/dbt/adapters/include/global_project/__init__.py +++ b/core/dbt/adapters/include/global_project/__init__.py @@ -2,3 +2,11 @@ PACKAGE_PATH = os.path.dirname(__file__) PROJECT_NAME = "dbt" + + +def get_global_project_path() -> str: + return PACKAGE_PATH + + +def get_global_project_name() -> str: + return PROJECT_NAME diff --git a/core/dbt/adapters/load_adapter.py b/core/dbt/adapters/load_adapter.py new file mode 100644 index 00000000000..734548d8a60 --- /dev/null +++ b/core/dbt/adapters/load_adapter.py @@ -0,0 +1,26 @@ +import traceback +from importlib import import_module +from types import ModuleType + + +from dbt.adapters.events.types import AdapterImportError, PluginLoadError +from dbt.common.events.functions import fire_event +from dbt.common.exceptions import DbtRuntimeError + + +def get_adapter_by_name(name: str) -> ModuleType: + try: + # mypy doesn't think modules have any attributes. + mod: ModuleType = import_module("." + name, "dbt.adapters") + return mod + except ModuleNotFoundError as exc: + # if we failed to import the target module in particular, inform + # the user about it via a runtime error + if exc.name == "dbt.adapters." + name: + fire_event(AdapterImportError(exc=str(exc))) + raise DbtRuntimeError(f"Could not find adapter type {name}!") + # otherwise, the error had to have come from some underlying + # library. Log the stack trace. + + fire_event(PluginLoadError(exc_info=traceback.format_exc())) + raise diff --git a/core/dbt/cli/requires.py b/core/dbt/cli/requires.py index 1aff882b569..d6042ba1491 100644 --- a/core/dbt/cli/requires.py +++ b/core/dbt/cli/requires.py @@ -1,7 +1,7 @@ import dbt.tracking from dbt.common.invocation import reset_invocation_id from dbt.version import installed as installed_version -from dbt.adapters.factory import adapter_management, register_adapter, get_adapter +from dbt.clients.adapter import adapter_management, register_adapter, get_adapter from dbt.flags import set_flags, get_flag_dict from dbt.cli.exceptions import ( ExceptionExit, diff --git a/core/dbt/clients/adapter/__init__.py b/core/dbt/clients/adapter/__init__.py new file mode 100644 index 00000000000..acacf2145e2 --- /dev/null +++ b/core/dbt/clients/adapter/__init__.py @@ -0,0 +1 @@ +from dbt.clients.adapter.client import * # noqa diff --git a/core/dbt/clients/adapter/client.py b/core/dbt/clients/adapter/client.py new file mode 100644 index 00000000000..70ef66c23b1 --- /dev/null +++ b/core/dbt/clients/adapter/client.py @@ -0,0 +1,88 @@ +from contextlib import contextmanager + +from pathlib import Path + +from typing import Type, Optional, List +from dbt.adapters.contracts.connection import AdapterRequiredConfig, Credentials +from dbt.adapters.protocol import AdapterProtocol, AdapterConfig, RelationProtocol +from dbt.clients.adapter.container import AdapterContainer + +_FACTORY: AdapterContainer = AdapterContainer() + + +def register_adapter(config: AdapterRequiredConfig) -> None: + global _FACTORY + _FACTORY.register_adapter(config) + + +def get_adapter(config: AdapterRequiredConfig): + global _FACTORY + return _FACTORY.lookup_adapter(config.credentials.type) + + +def get_adapter_by_type(adapter_type): + global _FACTORY + return _FACTORY.lookup_adapter(adapter_type) + + +def reset_adapters(): + """Clear the adapters. This is useful for tests, which change configs.""" + global _FACTORY + _FACTORY.reset_adapters() + + +def cleanup_connections(): + """Only clean up the adapter connections list without resetting the actual + adapters. + """ + global _FACTORY + _FACTORY.cleanup_connections() + + +def get_adapter_class_by_name(name: str) -> Type[AdapterProtocol]: + global _FACTORY + return _FACTORY.get_adapter_class_by_name(name) + + +def get_config_class_by_name(name: str) -> Type[AdapterConfig]: + global _FACTORY + return _FACTORY.get_config_class_by_name(name) + + +def get_relation_class_by_name(name: str) -> Type[RelationProtocol]: + global _FACTORY + return _FACTORY.get_relation_class_by_name(name) + + +def load_plugin(name: str) -> Type[Credentials]: + global _FACTORY + return _FACTORY.load_plugin(name) + + +def get_include_paths(name: Optional[str]) -> List[Path]: + global _FACTORY + return _FACTORY.get_include_paths(name) + + +def get_adapter_package_names(name: Optional[str]) -> List[str]: + global _FACTORY + return _FACTORY.get_adapter_package_names(name) + + +def get_adapter_type_names(name: Optional[str]) -> List[str]: + global _FACTORY + return _FACTORY.get_adapter_type_names(name) + + +def get_adapter_constraint_support(name: Optional[str]) -> List[str]: + global _FACTORY + return _FACTORY.get_adapter_constraint_support(name) + + +@contextmanager +def adapter_management(): + reset_adapters() + try: + yield + finally: + cleanup_connections() diff --git a/core/dbt/adapters/factory.py b/core/dbt/clients/adapter/container.py similarity index 62% rename from core/dbt/adapters/factory.py rename to core/dbt/clients/adapter/container.py index e5414ea4ccd..56c9ecc3a7e 100644 --- a/core/dbt/adapters/factory.py +++ b/core/dbt/clients/adapter/container.py @@ -1,28 +1,30 @@ -import threading -import traceback -from contextlib import contextmanager from importlib import import_module + from pathlib import Path -from typing import Any, Dict, List, Optional, Set, Type -from dbt.adapters.base.plugin import AdapterPlugin -from dbt.adapters.protocol import AdapterConfig, AdapterProtocol, RelationProtocol -from dbt.adapters.contracts.connection import AdapterRequiredConfig, Credentials +from typing import Dict, Type, Any, Optional, List, Set + +import threading + +from dbt.adapters.base import AdapterPlugin +from dbt.adapters.contracts.connection import Credentials, AdapterRequiredConfig +from dbt.adapters.include.global_project import ( + PROJECT_NAME as GLOBAL_PROJECT_NAME, + PACKAGE_PATH as GLOBAL_PROJECT_PATH, +) +from dbt.adapters import load_adapter +from dbt.adapters.protocol import RelationProtocol, AdapterConfig, AdapterProtocol from dbt.common.events.functions import fire_event -from dbt.adapters.events.types import AdapterImportError, PluginLoadError, AdapterRegistered -from dbt.common.exceptions import DbtInternalError, DbtRuntimeError -from dbt.adapters.include.global_project import PACKAGE_PATH as GLOBAL_PROJECT_PATH -from dbt.adapters.include.global_project import PROJECT_NAME as GLOBAL_PROJECT_NAME +from dbt.common.exceptions import DbtRuntimeError, DbtInternalError from dbt.common.semver import VersionSpecifier +from dbt.events.types import AdapterRegistered from dbt.mp_context import get_mp_context -Adapter = AdapterProtocol - class AdapterContainer: def __init__(self) -> None: self.lock = threading.Lock() - self.adapters: Dict[str, Adapter] = {} + self.adapters: Dict[str, AdapterProtocol] = {} self.plugins: Dict[str, AdapterPlugin] = {} # map package names to their include paths self.packages: Dict[str, Path] = { @@ -38,7 +40,7 @@ def get_plugin_by_name(self, name: str) -> AdapterPlugin: message = f"Invalid adapter type {name}! Must be one of {names}" raise DbtRuntimeError(message) - def get_adapter_class_by_name(self, name: str) -> Type[Adapter]: + def get_adapter_class_by_name(self, name: str) -> Type[AdapterProtocol]: plugin = self.get_plugin_by_name(name) return plugin.adapter @@ -54,20 +56,8 @@ def load_plugin(self, name: str) -> Type[Credentials]: # this doesn't need a lock: in the worst case we'll overwrite packages # and adapter_type entries with the same value, as they're all # singletons - try: - # mypy doesn't think modules have any attributes. - mod: Any = import_module("." + name, "dbt.adapters") - except ModuleNotFoundError as exc: - # if we failed to import the target module in particular, inform - # the user about it via a runtime error - if exc.name == "dbt.adapters." + name: - fire_event(AdapterImportError(exc=str(exc))) - raise DbtRuntimeError(f"Could not find adapter type {name}!") - # otherwise, the error had to have come from some underlying - # library. Log the stack trace. - - fire_event(PluginLoadError(exc_info=traceback.format_exc())) - raise + mod: Any = load_adapter.get_adapter_by_name(name) + plugin: AdapterPlugin = mod.Plugin plugin_type = plugin.adapter.type() @@ -103,10 +93,10 @@ def register_adapter(self, config: AdapterRequiredConfig) -> None: # this shouldn't really happen... return - adapter: Adapter = adapter_type(config, get_mp_context()) # type: ignore + adapter: AdapterProtocol = adapter_type(config, get_mp_context()) # type: ignore self.adapters[adapter_name] = adapter - def lookup_adapter(self, adapter_name: str) -> Adapter: + def lookup_adapter(self, adapter_name: str) -> AdapterProtocol: return self.adapters[adapter_name] def reset_adapters(self): @@ -168,71 +158,3 @@ def get_adapter_type_names(self, name: Optional[str]) -> List[str]: def get_adapter_constraint_support(self, name: Optional[str]) -> List[str]: return self.lookup_adapter(name).CONSTRAINT_SUPPORT # type: ignore - - -FACTORY: AdapterContainer = AdapterContainer() - - -def register_adapter(config: AdapterRequiredConfig) -> None: - FACTORY.register_adapter(config) - - -def get_adapter(config: AdapterRequiredConfig): - return FACTORY.lookup_adapter(config.credentials.type) - - -def get_adapter_by_type(adapter_type): - return FACTORY.lookup_adapter(adapter_type) - - -def reset_adapters(): - """Clear the adapters. This is useful for tests, which change configs.""" - FACTORY.reset_adapters() - - -def cleanup_connections(): - """Only clean up the adapter connections list without resetting the actual - adapters. - """ - FACTORY.cleanup_connections() - - -def get_adapter_class_by_name(name: str) -> Type[AdapterProtocol]: - return FACTORY.get_adapter_class_by_name(name) - - -def get_config_class_by_name(name: str) -> Type[AdapterConfig]: - return FACTORY.get_config_class_by_name(name) - - -def get_relation_class_by_name(name: str) -> Type[RelationProtocol]: - return FACTORY.get_relation_class_by_name(name) - - -def load_plugin(name: str) -> Type[Credentials]: - return FACTORY.load_plugin(name) - - -def get_include_paths(name: Optional[str]) -> List[Path]: - return FACTORY.get_include_paths(name) - - -def get_adapter_package_names(name: Optional[str]) -> List[str]: - return FACTORY.get_adapter_package_names(name) - - -def get_adapter_type_names(name: Optional[str]) -> List[str]: - return FACTORY.get_adapter_type_names(name) - - -def get_adapter_constraint_support(name: Optional[str]) -> List[str]: - return FACTORY.get_adapter_constraint_support(name) - - -@contextmanager -def adapter_management(): - reset_adapters() - try: - yield - finally: - cleanup_connections() diff --git a/core/dbt/common/contracts/config/base.py b/core/dbt/common/contracts/config/base.py index 47bcfe7489a..f95bd8988f5 100644 --- a/core/dbt/common/contracts/config/base.py +++ b/core/dbt/common/contracts/config/base.py @@ -145,7 +145,7 @@ def update_from(self: T, data: Dict[str, Any], adapter_type: str, validate: bool it, and return a new config with the updated values """ # sadly, this is a circular import - from dbt.adapters.factory import get_config_class_by_name + from dbt.clients.adapter import get_config_class_by_name dct = self.to_dict(omit_none=False) diff --git a/core/dbt/compilation.py b/core/dbt/compilation.py index cb9ff4f8ef9..48b9d2ef02d 100644 --- a/core/dbt/compilation.py +++ b/core/dbt/compilation.py @@ -9,7 +9,7 @@ from dbt.common.invocation import get_invocation_id from dbt.flags import get_flags -from dbt.adapters.factory import get_adapter +from dbt.clients.adapter import get_adapter from dbt.clients import jinja from dbt.clients.system import make_directory from dbt.context.providers import generate_runtime_model_context diff --git a/core/dbt/config/profile.py b/core/dbt/config/profile.py index 47ab790638b..4065c7bac7b 100644 --- a/core/dbt/config/profile.py +++ b/core/dbt/config/profile.py @@ -153,7 +153,7 @@ def _credentials_from_profile( profile: Dict[str, Any], profile_name: str, target_name: str ) -> Credentials: # avoid an import cycle - from dbt.adapters.factory import load_plugin + from dbt.clients.adapter import load_plugin # credentials carry their 'type' in their actual type, not their # attributes. We do want this in order to pick our Credentials class. diff --git a/core/dbt/config/runtime.py b/core/dbt/config/runtime.py index 76b10e009da..63db45e87fb 100644 --- a/core/dbt/config/runtime.py +++ b/core/dbt/config/runtime.py @@ -15,7 +15,7 @@ Type, ) -from dbt.adapters.factory import get_include_paths, get_relation_class_by_name +from dbt.clients.adapter import get_include_paths, get_relation_class_by_name from dbt.adapters.contracts.connection import AdapterRequiredConfig, Credentials, HasCredentials from dbt.adapters.contracts.relation import ComponentName from dbt.flags import get_flags diff --git a/core/dbt/context/manifest.py b/core/dbt/context/manifest.py index 76d196374fa..f91df926615 100644 --- a/core/dbt/context/manifest.py +++ b/core/dbt/context/manifest.py @@ -44,7 +44,7 @@ def _build_namespace(self): def _get_namespace_builder(self) -> MacroNamespaceBuilder: # avoid an import loop - from dbt.adapters.factory import get_adapter_package_names + from dbt.clients.adapter import get_adapter_package_names internal_packages: List[str] = get_adapter_package_names(self.config.credentials.type) return MacroNamespaceBuilder( diff --git a/core/dbt/context/providers.py b/core/dbt/context/providers.py index 1f99665af7e..2019f428e02 100644 --- a/core/dbt/context/providers.py +++ b/core/dbt/context/providers.py @@ -15,8 +15,8 @@ from typing_extensions import Protocol from dbt.adapters.base.column import Column +from dbt.clients.adapter import get_adapter, get_adapter_package_names, get_adapter_type_names from dbt.common.clients.jinja import MacroProtocol -from dbt.adapters.factory import get_adapter, get_adapter_package_names, get_adapter_type_names from dbt.common.clients import agate_helper from dbt.clients.jinja import get_rendered, MacroGenerator, MacroStack from dbt.config import RuntimeConfig, Project diff --git a/core/dbt/contracts/graph/manifest.py b/core/dbt/contracts/graph/manifest.py index 9b6c1412bdf..c73d8650501 100644 --- a/core/dbt/contracts/graph/manifest.py +++ b/core/dbt/contracts/graph/manifest.py @@ -745,7 +745,7 @@ def _find_macros_by_name( ) -> CandidateList: """Find macros by their name.""" # avoid an import cycle - from dbt.adapters.factory import get_adapter_package_names + from dbt.clients.adapter import get_adapter_package_names candidates: CandidateList = CandidateList() packages = set(get_adapter_package_names(self.metadata.adapter_type)) @@ -876,7 +876,7 @@ def build_disabled_by_file_id(self): def _get_parent_adapter_types(self, adapter_type: str) -> List[str]: # This is duplicated logic from core/dbt/context/providers.py # Ideally this would instead be incorporating actual dispatch logic - from dbt.adapters.factory import get_adapter_type_names + from dbt.clients.adapter import get_adapter_type_names # order matters for dispatch: # 1. current adapter diff --git a/core/dbt/contracts/graph/nodes.py b/core/dbt/contracts/graph/nodes.py index 5b5f2eeb797..f2e458845da 100644 --- a/core/dbt/contracts/graph/nodes.py +++ b/core/dbt/contracts/graph/nodes.py @@ -678,7 +678,7 @@ def same_contract(self, old, adapter_type=None) -> bool: contract_enforced_disabled = True # TODO: this avoid the circular imports but isn't ideal - from dbt.adapters.factory import get_adapter_constraint_support + from dbt.clients.adapter import get_adapter_constraint_support from dbt.adapters.base import ConstraintSupport constraint_support = get_adapter_constraint_support(adapter_type) diff --git a/core/dbt/events/core_types.proto b/core/dbt/events/core_types.proto index bdd68ad4679..1d554b2f39b 100644 --- a/core/dbt/events/core_types.proto +++ b/core/dbt/events/core_types.proto @@ -18,6 +18,19 @@ message CoreEventInfo { string category = 10; } +// E - Adapter related events +// E034 +message AdapterRegistered { + string adapter_name = 1; + string adapter_version = 2; +} + +message AdapterRegisteredMsg { + CoreEventInfo info = 1; + AdapterRegistered data = 2; +} + + // D - Deprecation // D001 diff --git a/core/dbt/events/core_types_pb2.py b/core/dbt/events/core_types_pb2.py index 20a90dabb28..c91f1c6d818 100644 --- a/core/dbt/events/core_types_pb2.py +++ b/core/dbt/events/core_types_pb2.py @@ -14,7 +14,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63ore_types.proto\x12\x0bproto_types\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x02\n\rCoreEventInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0b\n\x03msg\x18\x03 \x01(\t\x12\r\n\x05level\x18\x04 \x01(\t\x12\x15\n\rinvocation_id\x18\x05 \x01(\t\x12\x0b\n\x03pid\x18\x06 \x01(\x05\x12\x0e\n\x06thread\x18\x07 \x01(\t\x12&\n\x02ts\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x05\x65xtra\x18\t \x03(\x0b\x32%.proto_types.CoreEventInfo.ExtraEntry\x12\x10\n\x08\x63\x61tegory\x18\n \x01(\t\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"@\n\x1aPackageRedirectDeprecation\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"\x80\x01\n\x1dPackageRedirectDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.proto_types.PackageRedirectDeprecation\"\x1f\n\x1dPackageInstallPathDeprecation\"\x86\x01\n PackageInstallPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x38\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32*.proto_types.PackageInstallPathDeprecation\"H\n\x1b\x43onfigSourcePathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\x12\x10\n\x08\x65xp_path\x18\x02 \x01(\t\"\x82\x01\n\x1e\x43onfigSourcePathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConfigSourcePathDeprecation\"F\n\x19\x43onfigDataPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\x12\x10\n\x08\x65xp_path\x18\x02 \x01(\t\"~\n\x1c\x43onfigDataPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.ConfigDataPathDeprecation\".\n\x17MetricAttributesRenamed\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t\"z\n\x1aMetricAttributesRenamedMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.MetricAttributesRenamed\"+\n\x17\x45xposureNameDeprecation\x12\x10\n\x08\x65xposure\x18\x01 \x01(\t\"z\n\x1a\x45xposureNameDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.ExposureNameDeprecation\"^\n\x13InternalDeprecation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x18\n\x10suggested_action\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\"r\n\x16InternalDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.InternalDeprecation\"@\n\x1a\x45nvironmentVariableRenamed\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"\x80\x01\n\x1d\x45nvironmentVariableRenamedMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.proto_types.EnvironmentVariableRenamed\"3\n\x18\x43onfigLogPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\"|\n\x1b\x43onfigLogPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x33\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.proto_types.ConfigLogPathDeprecation\"6\n\x1b\x43onfigTargetPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\"\x82\x01\n\x1e\x43onfigTargetPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConfigTargetPathDeprecation\"V\n\x0f\x44\x65precatedModel\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12\x15\n\rmodel_version\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65precation_date\x18\x03 \x01(\t\"j\n\x12\x44\x65precatedModelMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.DeprecatedModel\"/\n\x17\x44\x65psScrubbedPackageName\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\"z\n\x1a\x44\x65psScrubbedPackageNameMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.DepsScrubbedPackageNameb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63ore_types.proto\x12\x0bproto_types\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x02\n\rCoreEventInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0b\n\x03msg\x18\x03 \x01(\t\x12\r\n\x05level\x18\x04 \x01(\t\x12\x15\n\rinvocation_id\x18\x05 \x01(\t\x12\x0b\n\x03pid\x18\x06 \x01(\x05\x12\x0e\n\x06thread\x18\x07 \x01(\t\x12&\n\x02ts\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x05\x65xtra\x18\t \x03(\x0b\x32%.proto_types.CoreEventInfo.ExtraEntry\x12\x10\n\x08\x63\x61tegory\x18\n \x01(\t\x1a,\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x11\x41\x64\x61pterRegistered\x12\x14\n\x0c\x61\x64\x61pter_name\x18\x01 \x01(\t\x12\x17\n\x0f\x61\x64\x61pter_version\x18\x02 \x01(\t\"n\n\x14\x41\x64\x61pterRegisteredMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12,\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1e.proto_types.AdapterRegistered\"@\n\x1aPackageRedirectDeprecation\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"\x80\x01\n\x1dPackageRedirectDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.proto_types.PackageRedirectDeprecation\"\x1f\n\x1dPackageInstallPathDeprecation\"\x86\x01\n PackageInstallPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x38\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32*.proto_types.PackageInstallPathDeprecation\"H\n\x1b\x43onfigSourcePathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\x12\x10\n\x08\x65xp_path\x18\x02 \x01(\t\"\x82\x01\n\x1e\x43onfigSourcePathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConfigSourcePathDeprecation\"F\n\x19\x43onfigDataPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\x12\x10\n\x08\x65xp_path\x18\x02 \x01(\t\"~\n\x1c\x43onfigDataPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32&.proto_types.ConfigDataPathDeprecation\".\n\x17MetricAttributesRenamed\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t\"z\n\x1aMetricAttributesRenamedMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.MetricAttributesRenamed\"+\n\x17\x45xposureNameDeprecation\x12\x10\n\x08\x65xposure\x18\x01 \x01(\t\"z\n\x1a\x45xposureNameDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.ExposureNameDeprecation\"^\n\x13InternalDeprecation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x18\n\x10suggested_action\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\"r\n\x16InternalDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12.\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32 .proto_types.InternalDeprecation\"@\n\x1a\x45nvironmentVariableRenamed\x12\x10\n\x08old_name\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"\x80\x01\n\x1d\x45nvironmentVariableRenamedMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x35\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\'.proto_types.EnvironmentVariableRenamed\"3\n\x18\x43onfigLogPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\"|\n\x1b\x43onfigLogPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x33\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32%.proto_types.ConfigLogPathDeprecation\"6\n\x1b\x43onfigTargetPathDeprecation\x12\x17\n\x0f\x64\x65precated_path\x18\x01 \x01(\t\"\x82\x01\n\x1e\x43onfigTargetPathDeprecationMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x36\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32(.proto_types.ConfigTargetPathDeprecation\"V\n\x0f\x44\x65precatedModel\x12\x12\n\nmodel_name\x18\x01 \x01(\t\x12\x15\n\rmodel_version\x18\x02 \x01(\t\x12\x18\n\x10\x64\x65precation_date\x18\x03 \x01(\t\"j\n\x12\x44\x65precatedModelMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.proto_types.DeprecatedModel\"/\n\x17\x44\x65psScrubbedPackageName\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\"z\n\x1a\x44\x65psScrubbedPackageNameMsg\x12(\n\x04info\x18\x01 \x01(\x0b\x32\x1a.proto_types.CoreEventInfo\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.proto_types.DepsScrubbedPackageNameb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,52 +28,56 @@ _globals['_COREEVENTINFO']._serialized_end=348 _globals['_COREEVENTINFO_EXTRAENTRY']._serialized_start=304 _globals['_COREEVENTINFO_EXTRAENTRY']._serialized_end=348 - _globals['_PACKAGEREDIRECTDEPRECATION']._serialized_start=350 - _globals['_PACKAGEREDIRECTDEPRECATION']._serialized_end=414 - _globals['_PACKAGEREDIRECTDEPRECATIONMSG']._serialized_start=417 - _globals['_PACKAGEREDIRECTDEPRECATIONMSG']._serialized_end=545 - _globals['_PACKAGEINSTALLPATHDEPRECATION']._serialized_start=547 - _globals['_PACKAGEINSTALLPATHDEPRECATION']._serialized_end=578 - _globals['_PACKAGEINSTALLPATHDEPRECATIONMSG']._serialized_start=581 - _globals['_PACKAGEINSTALLPATHDEPRECATIONMSG']._serialized_end=715 - _globals['_CONFIGSOURCEPATHDEPRECATION']._serialized_start=717 - _globals['_CONFIGSOURCEPATHDEPRECATION']._serialized_end=789 - _globals['_CONFIGSOURCEPATHDEPRECATIONMSG']._serialized_start=792 - _globals['_CONFIGSOURCEPATHDEPRECATIONMSG']._serialized_end=922 - _globals['_CONFIGDATAPATHDEPRECATION']._serialized_start=924 - _globals['_CONFIGDATAPATHDEPRECATION']._serialized_end=994 - _globals['_CONFIGDATAPATHDEPRECATIONMSG']._serialized_start=996 - _globals['_CONFIGDATAPATHDEPRECATIONMSG']._serialized_end=1122 - _globals['_METRICATTRIBUTESRENAMED']._serialized_start=1124 - _globals['_METRICATTRIBUTESRENAMED']._serialized_end=1170 - _globals['_METRICATTRIBUTESRENAMEDMSG']._serialized_start=1172 - _globals['_METRICATTRIBUTESRENAMEDMSG']._serialized_end=1294 - _globals['_EXPOSURENAMEDEPRECATION']._serialized_start=1296 - _globals['_EXPOSURENAMEDEPRECATION']._serialized_end=1339 - _globals['_EXPOSURENAMEDEPRECATIONMSG']._serialized_start=1341 - _globals['_EXPOSURENAMEDEPRECATIONMSG']._serialized_end=1463 - _globals['_INTERNALDEPRECATION']._serialized_start=1465 - _globals['_INTERNALDEPRECATION']._serialized_end=1559 - _globals['_INTERNALDEPRECATIONMSG']._serialized_start=1561 - _globals['_INTERNALDEPRECATIONMSG']._serialized_end=1675 - _globals['_ENVIRONMENTVARIABLERENAMED']._serialized_start=1677 - _globals['_ENVIRONMENTVARIABLERENAMED']._serialized_end=1741 - _globals['_ENVIRONMENTVARIABLERENAMEDMSG']._serialized_start=1744 - _globals['_ENVIRONMENTVARIABLERENAMEDMSG']._serialized_end=1872 - _globals['_CONFIGLOGPATHDEPRECATION']._serialized_start=1874 - _globals['_CONFIGLOGPATHDEPRECATION']._serialized_end=1925 - _globals['_CONFIGLOGPATHDEPRECATIONMSG']._serialized_start=1927 - _globals['_CONFIGLOGPATHDEPRECATIONMSG']._serialized_end=2051 - _globals['_CONFIGTARGETPATHDEPRECATION']._serialized_start=2053 - _globals['_CONFIGTARGETPATHDEPRECATION']._serialized_end=2107 - _globals['_CONFIGTARGETPATHDEPRECATIONMSG']._serialized_start=2110 - _globals['_CONFIGTARGETPATHDEPRECATIONMSG']._serialized_end=2240 - _globals['_DEPRECATEDMODEL']._serialized_start=2242 - _globals['_DEPRECATEDMODEL']._serialized_end=2328 - _globals['_DEPRECATEDMODELMSG']._serialized_start=2330 - _globals['_DEPRECATEDMODELMSG']._serialized_end=2436 - _globals['_DEPSSCRUBBEDPACKAGENAME']._serialized_start=2438 - _globals['_DEPSSCRUBBEDPACKAGENAME']._serialized_end=2485 - _globals['_DEPSSCRUBBEDPACKAGENAMEMSG']._serialized_start=2487 - _globals['_DEPSSCRUBBEDPACKAGENAMEMSG']._serialized_end=2609 + _globals['_ADAPTERREGISTERED']._serialized_start=350 + _globals['_ADAPTERREGISTERED']._serialized_end=416 + _globals['_ADAPTERREGISTEREDMSG']._serialized_start=418 + _globals['_ADAPTERREGISTEREDMSG']._serialized_end=528 + _globals['_PACKAGEREDIRECTDEPRECATION']._serialized_start=530 + _globals['_PACKAGEREDIRECTDEPRECATION']._serialized_end=594 + _globals['_PACKAGEREDIRECTDEPRECATIONMSG']._serialized_start=597 + _globals['_PACKAGEREDIRECTDEPRECATIONMSG']._serialized_end=725 + _globals['_PACKAGEINSTALLPATHDEPRECATION']._serialized_start=727 + _globals['_PACKAGEINSTALLPATHDEPRECATION']._serialized_end=758 + _globals['_PACKAGEINSTALLPATHDEPRECATIONMSG']._serialized_start=761 + _globals['_PACKAGEINSTALLPATHDEPRECATIONMSG']._serialized_end=895 + _globals['_CONFIGSOURCEPATHDEPRECATION']._serialized_start=897 + _globals['_CONFIGSOURCEPATHDEPRECATION']._serialized_end=969 + _globals['_CONFIGSOURCEPATHDEPRECATIONMSG']._serialized_start=972 + _globals['_CONFIGSOURCEPATHDEPRECATIONMSG']._serialized_end=1102 + _globals['_CONFIGDATAPATHDEPRECATION']._serialized_start=1104 + _globals['_CONFIGDATAPATHDEPRECATION']._serialized_end=1174 + _globals['_CONFIGDATAPATHDEPRECATIONMSG']._serialized_start=1176 + _globals['_CONFIGDATAPATHDEPRECATIONMSG']._serialized_end=1302 + _globals['_METRICATTRIBUTESRENAMED']._serialized_start=1304 + _globals['_METRICATTRIBUTESRENAMED']._serialized_end=1350 + _globals['_METRICATTRIBUTESRENAMEDMSG']._serialized_start=1352 + _globals['_METRICATTRIBUTESRENAMEDMSG']._serialized_end=1474 + _globals['_EXPOSURENAMEDEPRECATION']._serialized_start=1476 + _globals['_EXPOSURENAMEDEPRECATION']._serialized_end=1519 + _globals['_EXPOSURENAMEDEPRECATIONMSG']._serialized_start=1521 + _globals['_EXPOSURENAMEDEPRECATIONMSG']._serialized_end=1643 + _globals['_INTERNALDEPRECATION']._serialized_start=1645 + _globals['_INTERNALDEPRECATION']._serialized_end=1739 + _globals['_INTERNALDEPRECATIONMSG']._serialized_start=1741 + _globals['_INTERNALDEPRECATIONMSG']._serialized_end=1855 + _globals['_ENVIRONMENTVARIABLERENAMED']._serialized_start=1857 + _globals['_ENVIRONMENTVARIABLERENAMED']._serialized_end=1921 + _globals['_ENVIRONMENTVARIABLERENAMEDMSG']._serialized_start=1924 + _globals['_ENVIRONMENTVARIABLERENAMEDMSG']._serialized_end=2052 + _globals['_CONFIGLOGPATHDEPRECATION']._serialized_start=2054 + _globals['_CONFIGLOGPATHDEPRECATION']._serialized_end=2105 + _globals['_CONFIGLOGPATHDEPRECATIONMSG']._serialized_start=2107 + _globals['_CONFIGLOGPATHDEPRECATIONMSG']._serialized_end=2231 + _globals['_CONFIGTARGETPATHDEPRECATION']._serialized_start=2233 + _globals['_CONFIGTARGETPATHDEPRECATION']._serialized_end=2287 + _globals['_CONFIGTARGETPATHDEPRECATIONMSG']._serialized_start=2290 + _globals['_CONFIGTARGETPATHDEPRECATIONMSG']._serialized_end=2420 + _globals['_DEPRECATEDMODEL']._serialized_start=2422 + _globals['_DEPRECATEDMODEL']._serialized_end=2508 + _globals['_DEPRECATEDMODELMSG']._serialized_start=2510 + _globals['_DEPRECATEDMODELMSG']._serialized_end=2616 + _globals['_DEPSSCRUBBEDPACKAGENAME']._serialized_start=2618 + _globals['_DEPSSCRUBBEDPACKAGENAME']._serialized_end=2665 + _globals['_DEPSSCRUBBEDPACKAGENAMEMSG']._serialized_start=2667 + _globals['_DEPSSCRUBBEDPACKAGENAMEMSG']._serialized_end=2789 # @@protoc_insertion_point(module_scope) diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index 42007f9c419..36d11e49c1c 100644 --- a/core/dbt/events/types.py +++ b/core/dbt/events/types.py @@ -1,7 +1,25 @@ -from dbt.events.base_types import WarnLevel +from dbt.events.base_types import WarnLevel, InfoLevel from dbt.common.ui import warning_tag, line_wrap_message +# ======================================================= +# E Adapter Events +# ======================================================= + + +class AdapterRegistered(InfoLevel): + """ + This event signifies that an adapter has been registered with dbt-core. + While it is about an adapter it specifically signifies a point in the dbt runner's workflow + """ + + def code(self) -> str: + return "E034" + + def message(self) -> str: + return f"Registered adapter: {self.adapter_name}{self.adapter_version}" + + # ======================================================= # D - Deprecations # ======================================================= diff --git a/core/dbt/parser/base.py b/core/dbt/parser/base.py index b79c3f155fb..0890a6f108f 100644 --- a/core/dbt/parser/base.py +++ b/core/dbt/parser/base.py @@ -11,7 +11,7 @@ generate_parser_model_context, generate_generate_name_macro_context, ) -from dbt.adapters.factory import get_adapter # noqa: F401 +from dbt.clients.adapter import get_adapter # noqa: F401 from dbt.clients.jinja import get_rendered from dbt.config import Project, RuntimeConfig from dbt.context.context_config import ContextConfig diff --git a/core/dbt/parser/manifest.py b/core/dbt/parser/manifest.py index bad24eeeaa5..2ac9ea61599 100644 --- a/core/dbt/parser/manifest.py +++ b/core/dbt/parser/manifest.py @@ -31,7 +31,7 @@ import dbt.utils from dbt.flags import get_flags -from dbt.adapters.factory import ( +from dbt.clients.adapter import ( get_adapter, get_relation_class_by_name, get_adapter_package_names, @@ -1627,7 +1627,7 @@ def _process_metric_node( metric.type_params.input_measures.extend(target_metric.type_params.input_measures) metric.depends_on.add_node(target_metric.unique_id) else: - assert_values_exhausted(metric.type) + assert_values_exhausted(metric.type) # type: ignore[arg-type] def _process_metrics_for_node( diff --git a/core/dbt/parser/schema_generic_tests.py b/core/dbt/parser/schema_generic_tests.py index 499753d5f94..2a87112f532 100644 --- a/core/dbt/parser/schema_generic_tests.py +++ b/core/dbt/parser/schema_generic_tests.py @@ -29,7 +29,7 @@ from dbt.contracts.files import FileHash from dbt.utils import md5, get_pseudo_test_path from dbt.clients.jinja import get_rendered, add_rendered_test_kwargs -from dbt.adapters.factory import get_adapter, get_adapter_package_names +from dbt.clients.adapter import get_adapter, get_adapter_package_names from dbt.node_types import NodeType from dbt.context.macro_resolver import MacroResolver diff --git a/core/dbt/parser/sources.py b/core/dbt/parser/sources.py index a0d43d0f9ea..4d8395e9593 100644 --- a/core/dbt/parser/sources.py +++ b/core/dbt/parser/sources.py @@ -3,7 +3,7 @@ from typing import Iterable, Dict, Optional, Set, Any, List from dbt.adapters.capability import Capability -from dbt.adapters.factory import get_adapter +from dbt.clients.adapter import get_adapter from dbt.config import RuntimeConfig from dbt.context.context_config import ( BaseContextConfigGenerator, diff --git a/core/dbt/task/debug.py b/core/dbt/task/debug.py index ba297d5fef4..ee58887148f 100644 --- a/core/dbt/task/debug.py +++ b/core/dbt/task/debug.py @@ -18,7 +18,7 @@ import dbt.clients.system import dbt.exceptions import dbt.common.exceptions -from dbt.adapters.factory import get_adapter, register_adapter +from dbt.clients.adapter import get_adapter, register_adapter from dbt.config import PartialProject, Project, Profile from dbt.config.renderer import DbtProjectYamlRenderer, ProfileRenderer from dbt.contracts.results import RunStatus diff --git a/core/dbt/task/docs/generate.py b/core/dbt/task/docs/generate.py index 0df609635ab..0cbbd63faf1 100644 --- a/core/dbt/task/docs/generate.py +++ b/core/dbt/task/docs/generate.py @@ -12,7 +12,7 @@ from dbt.task.docs import DOCS_INDEX_FILE_PATH from dbt.task.compile import CompileTask -from dbt.adapters.factory import get_adapter +from dbt.clients.adapter import get_adapter from dbt.contracts.graph.nodes import ResultNode from dbt.contracts.graph.manifest import Manifest from dbt.contracts.results import ( diff --git a/core/dbt/task/init.py b/core/dbt/task/init.py index 483cdd991bc..ac875e055f5 100644 --- a/core/dbt/task/init.py +++ b/core/dbt/task/init.py @@ -14,7 +14,7 @@ from dbt.common.exceptions import DbtRuntimeError from dbt.flags import get_flags from dbt.version import _get_adapter_plugin_names -from dbt.adapters.factory import load_plugin, get_include_paths +from dbt.clients.adapter import load_plugin, get_include_paths from dbt.contracts.util import Identifier as ProjectName diff --git a/core/dbt/task/run_operation.py b/core/dbt/task/run_operation.py index 379d5ec6ab8..aa7549aa8ff 100644 --- a/core/dbt/task/run_operation.py +++ b/core/dbt/task/run_operation.py @@ -6,7 +6,7 @@ import agate import dbt.common.exceptions -from dbt.adapters.factory import get_adapter +from dbt.clients.adapter import get_adapter from dbt.contracts.files import FileHash from dbt.contracts.graph.nodes import HookNode from dbt.contracts.results import RunResultsArtifact, RunResult, RunStatus, TimingInfo diff --git a/core/dbt/task/runnable.py b/core/dbt/task/runnable.py index 138dfa5a112..eadbaaad802 100644 --- a/core/dbt/task/runnable.py +++ b/core/dbt/task/runnable.py @@ -7,12 +7,13 @@ from pathlib import Path from typing import AbstractSet, Optional, Dict, List, Set, Tuple, Iterable +import dbt.clients.adapter.client import dbt.common.utils.formatting import dbt.exceptions import dbt.tracking import dbt.utils from dbt.adapters.base import BaseRelation -from dbt.adapters.factory import get_adapter +from dbt.clients.adapter import get_adapter from dbt.contracts.graph.manifest import WritableManifest from dbt.contracts.graph.nodes import ResultNode from dbt.contracts.results import ( @@ -446,7 +447,7 @@ def execute_with_hooks(self, selected_uids: AbstractSet[str]): res = self.execute_nodes() self.after_run(adapter, res) finally: - adapter.cleanup_connections() + dbt.clients.adapter.client.cleanup_connections() elapsed = time.time() - self.started_at self.print_results_line(self.node_results, elapsed) result = self.get_result( diff --git a/core/dbt/tests/fixtures/project.py b/core/dbt/tests/fixtures/project.py index fedc3962d46..17ebf45310d 100644 --- a/core/dbt/tests/fixtures/project.py +++ b/core/dbt/tests/fixtures/project.py @@ -11,8 +11,9 @@ from dbt.common.exceptions import CompilationError, DbtDatabaseError from dbt.context.providers import generate_runtime_macro_context import dbt.flags as flags +import dbt from dbt.config.runtime import RuntimeConfig -from dbt.adapters.factory import get_adapter, register_adapter, reset_adapters, get_adapter_by_type +from dbt.clients.adapter import get_adapter, register_adapter, reset_adapters, get_adapter_by_type from dbt.common.events.event_manager_client import cleanup_event_logger from dbt.events.logging import setup_event_logger from dbt.tests.util import ( @@ -300,7 +301,7 @@ def adapter( adapter.set_macro_resolver(manifest) adapter.set_macro_context_generator(generate_runtime_macro_context) yield adapter - adapter.cleanup_connections() + dbt.clients.adapter.client.cleanup_connections() reset_adapters() diff --git a/core/dbt/tests/util.py b/core/dbt/tests/util.py index 02c98bbfdad..fcd67e9dcff 100644 --- a/core/dbt/tests/util.py +++ b/core/dbt/tests/util.py @@ -7,8 +7,8 @@ from datetime import datetime from typing import Any, Dict, List, Optional from contextlib import contextmanager -from dbt.adapters.factory import Adapter +from dbt.adapters.protocol import AdapterProtocol from dbt.cli.main import dbtRunner from dbt.logger import log_manager from dbt.contracts.graph.manifest import Manifest @@ -427,7 +427,7 @@ def check_relation_has_expected_schema(adapter, relation_name, expected_schema: # adapter.get_rows_different_sql # adapter.execute def check_relations_equal_with_relations( - adapter: Adapter, relations: List, compare_snapshot_cols=False + adapter: AdapterProtocol, relations: List, compare_snapshot_cols=False ): with get_connection(adapter): basis, compares = relations[0], relations[1:] diff --git a/tests/unit/test_adapter_client.py b/tests/unit/test_adapter_client.py new file mode 100644 index 00000000000..ce17780dc6b --- /dev/null +++ b/tests/unit/test_adapter_client.py @@ -0,0 +1,101 @@ +from unittest import mock + +import dbt.clients.adapter.client +from dbt.adapters.base.plugin import AdapterPlugin +from dbt.adapters.include.global_project import ( + PROJECT_NAME as GLOBAL_PROJECT_NAME, +) + + +root_plugin = mock.Mock( + Plugin=AdapterPlugin( + adapter=mock.MagicMock(type=lambda: "root"), + credentials=mock.MagicMock(), + include_path="/path/to/root/plugin", + dependencies=["childa", "childb"], + project_name="root", + ) +) + +childa = mock.Mock( + Plugin=AdapterPlugin( + adapter=mock.MagicMock(type=lambda: "childa"), + credentials=mock.MagicMock(), + include_path="/path/to/childa", + project_name="pkg_childa", + ) +) + +childb = mock.Mock( + Plugin=AdapterPlugin( + adapter=mock.MagicMock(type=lambda: "childb"), + credentials=mock.MagicMock(), + include_path="/path/to/childb", + dependencies=["childc"], + project_name="pkg_childb", + ) +) + +childc = mock.Mock( + Plugin=AdapterPlugin( + adapter=mock.MagicMock(type=lambda: "childc"), + credentials=mock.MagicMock(), + include_path="/path/to/childc", + project_name="pkg_childc", + ) +) + +_mock_modules = { + "root": root_plugin, + "childa": childa, + "childb": childb, + "childc": childc, +} + + +def mock_get_adapter_by_name(name: str): + try: + return _mock_modules[name] + except KeyError: + raise RuntimeError(f"test could not find adapter type {name}!") + + +def test_no_packages(): + assert dbt.clients.adapter.client.get_adapter_package_names(None) == [GLOBAL_PROJECT_NAME] + + +def test_one_package(): + with mock.patch( + "dbt.adapters.load_adapter.get_adapter_by_name", wraps=mock_get_adapter_by_name + ): + dbt.clients.adapter.client.load_plugin("childc") + assert dbt.clients.adapter.client.get_adapter_package_names("childc") == [ + "pkg_childc", + GLOBAL_PROJECT_NAME, + ] + + +def test_simple_child_packages(): + with mock.patch( + "dbt.adapters.load_adapter.get_adapter_by_name", wraps=mock_get_adapter_by_name + ): + dbt.clients.adapter.client.load_plugin("childb") + assert dbt.clients.adapter.client.get_adapter_package_names("childb") == [ + "pkg_childb", + "pkg_childc", + GLOBAL_PROJECT_NAME, + ] + + +def test_layered_child_packages(): + with mock.patch( + "dbt.adapters.load_adapter.get_adapter_by_name", wraps=mock_get_adapter_by_name + ): + dbt.clients.adapter.load_plugin("root") + assert dbt.clients.adapter.client.get_adapter_package_names("root") == [ + "root", + "pkg_childa", + "pkg_childb", + "pkg_childc", + GLOBAL_PROJECT_NAME, + ] diff --git a/tests/unit/test_adapter_factory.py b/tests/unit/test_adapter_factory.py deleted file mode 100644 index 49974d14dfb..00000000000 --- a/tests/unit/test_adapter_factory.py +++ /dev/null @@ -1,93 +0,0 @@ -from pathlib import Path -import unittest -from unittest import mock -from dbt.adapters.factory import AdapterContainer -from dbt.adapters.base.plugin import AdapterPlugin -from dbt.adapters.include.global_project import ( - PROJECT_NAME as GLOBAL_PROJECT_NAME, -) - - -class TestGetPackageNames(unittest.TestCase): - def setUp(self): - self.root_plugin = AdapterPlugin( - adapter=mock.MagicMock(), - credentials=mock.MagicMock(), - include_path="/path/to/root/plugin", - dependencies=["childa", "childb"], - project_name="root", - ) - self.childa = AdapterPlugin( - adapter=mock.MagicMock(), - credentials=mock.MagicMock(), - include_path="/path/to/childa", - project_name="pkg_childa", - ) - self.childb = AdapterPlugin( - adapter=mock.MagicMock(), - credentials=mock.MagicMock(), - include_path="/path/to/childb", - dependencies=["childc"], - project_name="pkg_childb", - ) - self.childc = AdapterPlugin( - adapter=mock.MagicMock(), - credentials=mock.MagicMock(), - include_path="/path/to/childc", - project_name="pkg_childc", - ) - - self._mock_modules = { - "root": self.root_plugin, - "childa": self.childa, - "childb": self.childb, - "childc": self.childc, - } - - self.factory = AdapterContainer() - - self.load_patch = mock.patch.object(AdapterContainer, "load_plugin") - self.mock_load = self.load_patch.start() - - def mock_load_plugin(name: str): - try: - plugin = self._mock_modules[name] - except KeyError: - raise RuntimeError(f"test could not find adapter type {name}!") - self.factory.plugins[name] = plugin - self.factory.packages[plugin.project_name] = Path(plugin.include_path) - for dep in plugin.dependencies: - self.factory.load_plugin(dep) - - self.mock_load.side_effect = mock_load_plugin - - def tearDown(self): - self.load_patch.stop() - - def test_no_packages(self): - assert self.factory.get_adapter_package_names(None) == [GLOBAL_PROJECT_NAME] - - def test_one_package(self): - self.factory.load_plugin("childc") - assert self.factory.get_adapter_package_names("childc") == [ - "pkg_childc", - GLOBAL_PROJECT_NAME, - ] - - def test_simple_child_packages(self): - self.factory.load_plugin("childb") - assert self.factory.get_adapter_package_names("childb") == [ - "pkg_childb", - "pkg_childc", - GLOBAL_PROJECT_NAME, - ] - - def test_layered_child_packages(self): - self.factory.load_plugin("root") - assert self.factory.get_adapter_package_names("root") == [ - "root", - "pkg_childa", - "pkg_childb", - "pkg_childc", - GLOBAL_PROJECT_NAME, - ] diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index 84db51a19ec..293cf66a8d4 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -16,7 +16,7 @@ import dbt.exceptions import dbt.tracking from dbt import flags -from dbt.adapters.factory import load_plugin +from dbt.clients.adapter import load_plugin from dbt.adapters.postgres import PostgresCredentials from dbt.adapters.contracts.connection import QueryComment, DEFAULT_QUERY_COMMENT from dbt.contracts.project import PackageConfig, LocalPackage, GitPackage diff --git a/tests/unit/test_context.py b/tests/unit/test_context.py index 58941553de3..451d025e9c0 100644 --- a/tests/unit/test_context.py +++ b/tests/unit/test_context.py @@ -7,7 +7,7 @@ import pytest from dbt.adapters import postgres -from dbt.adapters import factory +from dbt.clients.adapter import client from dbt.clients.jinja import MacroStack from dbt.contracts.graph.nodes import ( ModelNode, @@ -368,7 +368,7 @@ def get_adapter(): @pytest.fixture def get_include_paths(): - with mock.patch.object(factory, "get_include_paths") as patch: + with mock.patch.object(client, "get_include_paths") as patch: patch.return_value = [] yield patch diff --git a/tests/unit/test_events.py b/tests/unit/test_events.py index b1ef82cf12e..44bbdc2fe72 100644 --- a/tests/unit/test_events.py +++ b/tests/unit/test_events.py @@ -138,6 +138,8 @@ def test_event_codes(self): types.InvalidProfileTemplateYAML(), types.ProjectNameAlreadyExists(name=""), types.ProjectCreated(project_name=""), + # E - Adapter Events ====================== + core_types.AdapterRegistered(adapter_name="dbt-awesome", adapter_version="1.2.3"), # D - Deprecations ====================== core_types.PackageRedirectDeprecation(old_name="", new_name=""), core_types.PackageInstallPathDeprecation(), @@ -156,7 +158,6 @@ def test_event_codes(self): adapter_types.AdapterEventInfo(), adapter_types.AdapterEventWarning(), adapter_types.AdapterEventError(), - adapter_types.AdapterRegistered(adapter_name="dbt-awesome", adapter_version="1.2.3"), adapter_types.NewConnection(conn_type="", conn_name=""), adapter_types.ConnectionReused(conn_name=""), adapter_types.ConnectionLeftOpenInCleanup(conn_name=""), diff --git a/tests/unit/test_graph.py b/tests/unit/test_graph.py index f4ed37c2765..f4e1b16f5d2 100644 --- a/tests/unit/test_graph.py +++ b/tests/unit/test_graph.py @@ -5,7 +5,7 @@ from unittest.mock import MagicMock, patch from dbt.adapters.postgres import Plugin as PostgresPlugin -from dbt.adapters.factory import reset_adapters, register_adapter +from dbt.clients.adapter import reset_adapters, register_adapter import dbt.clients.system import dbt.compilation import dbt.exceptions diff --git a/tests/unit/utils.py b/tests/unit/utils.py index c5ee1329293..fffe8926600 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -10,6 +10,8 @@ import agate import pytest + +import dbt.clients.adapter.client from dbt.common.dataclass_schema import ValidationError from dbt.config.project import PartialProject @@ -107,18 +109,17 @@ def config_from_parts_or_dicts(project, profile, packages=None, selectors=None, def inject_plugin(plugin): - from dbt.adapters.factory import FACTORY + from dbt.clients.adapter.client import _FACTORY key = plugin.adapter.type() - FACTORY.plugins[key] = plugin + _FACTORY.plugins[key] = plugin def inject_plugin_for(config): # from dbt.adapters.postgres import Plugin, PostgresAdapter - from dbt.adapters.factory import FACTORY - FACTORY.load_plugin(config.credentials.type) - adapter = FACTORY.get_adapter(config) + dbt.clients.adapter.client.load_plugin(config.credentials.type) + adapter = dbt.clients.adapter.client.get_adapter(config) return adapter @@ -127,18 +128,18 @@ def inject_adapter(value, plugin): artisanal adapter will be available from get_adapter() as if dbt loaded it. """ inject_plugin(plugin) - from dbt.adapters.factory import FACTORY + from dbt.clients.adapter.client import _FACTORY key = value.type() - FACTORY.adapters[key] = value + _FACTORY.adapters[key] = value def clear_plugin(plugin): - from dbt.adapters.factory import FACTORY + from dbt.clients.adapter.client import _FACTORY key = plugin.adapter.type() - FACTORY.plugins.pop(key, None) - FACTORY.adapters.pop(key, None) + _FACTORY.plugins.pop(key, None) + _FACTORY.adapters.pop(key, None) class ContractTestCase(TestCase):