airbyte-internal-ops 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {airbyte_internal_ops-0.2.0.dist-info → airbyte_internal_ops-0.2.2.dist-info}/METADATA +19 -3
  2. {airbyte_internal_ops-0.2.0.dist-info → airbyte_internal_ops-0.2.2.dist-info}/RECORD +41 -41
  3. airbyte_ops_mcp/__init__.py +2 -2
  4. airbyte_ops_mcp/cli/cloud.py +207 -306
  5. airbyte_ops_mcp/cloud_admin/api_client.py +51 -26
  6. airbyte_ops_mcp/cloud_admin/connection_config.py +2 -2
  7. airbyte_ops_mcp/constants.py +61 -1
  8. airbyte_ops_mcp/github_actions.py +69 -1
  9. airbyte_ops_mcp/mcp/_http_headers.py +56 -0
  10. airbyte_ops_mcp/mcp/_mcp_utils.py +2 -2
  11. airbyte_ops_mcp/mcp/cloud_connector_versions.py +57 -43
  12. airbyte_ops_mcp/mcp/github.py +34 -1
  13. airbyte_ops_mcp/mcp/prerelease.py +3 -3
  14. airbyte_ops_mcp/mcp/prod_db_queries.py +293 -50
  15. airbyte_ops_mcp/mcp/{live_tests.py → regression_tests.py} +158 -176
  16. airbyte_ops_mcp/mcp/server.py +3 -3
  17. airbyte_ops_mcp/prod_db_access/db_engine.py +7 -11
  18. airbyte_ops_mcp/prod_db_access/queries.py +79 -0
  19. airbyte_ops_mcp/prod_db_access/sql.py +86 -0
  20. airbyte_ops_mcp/{live_tests → regression_tests}/__init__.py +3 -3
  21. airbyte_ops_mcp/{live_tests → regression_tests}/cdk_secrets.py +1 -1
  22. airbyte_ops_mcp/{live_tests → regression_tests}/connection_secret_retriever.py +3 -3
  23. airbyte_ops_mcp/{live_tests → regression_tests}/connector_runner.py +1 -1
  24. airbyte_ops_mcp/{live_tests → regression_tests}/message_cache/__init__.py +3 -1
  25. airbyte_ops_mcp/{live_tests → regression_tests}/regression/__init__.py +1 -1
  26. airbyte_ops_mcp/{live_tests → regression_tests}/schema_generation.py +3 -1
  27. airbyte_ops_mcp/{live_tests → regression_tests}/validation/__init__.py +2 -2
  28. airbyte_ops_mcp/{live_tests → regression_tests}/validation/record_validators.py +4 -2
  29. {airbyte_internal_ops-0.2.0.dist-info → airbyte_internal_ops-0.2.2.dist-info}/WHEEL +0 -0
  30. {airbyte_internal_ops-0.2.0.dist-info → airbyte_internal_ops-0.2.2.dist-info}/entry_points.txt +0 -0
  31. /airbyte_ops_mcp/{live_tests → regression_tests}/ci_output.py +0 -0
  32. /airbyte_ops_mcp/{live_tests → regression_tests}/commons/__init__.py +0 -0
  33. /airbyte_ops_mcp/{live_tests → regression_tests}/config.py +0 -0
  34. /airbyte_ops_mcp/{live_tests → regression_tests}/connection_fetcher.py +0 -0
  35. /airbyte_ops_mcp/{live_tests → regression_tests}/evaluation_modes.py +0 -0
  36. /airbyte_ops_mcp/{live_tests → regression_tests}/http_metrics.py +0 -0
  37. /airbyte_ops_mcp/{live_tests → regression_tests}/message_cache/duckdb_cache.py +0 -0
  38. /airbyte_ops_mcp/{live_tests → regression_tests}/models.py +0 -0
  39. /airbyte_ops_mcp/{live_tests → regression_tests}/obfuscation.py +0 -0
  40. /airbyte_ops_mcp/{live_tests → regression_tests}/regression/comparators.py +0 -0
  41. /airbyte_ops_mcp/{live_tests → regression_tests}/validation/catalog_validators.py +0 -0
@@ -131,6 +131,61 @@ SELECT_CONNECTIONS_BY_CONNECTOR_AND_ORG = sqlalchemy.text(
131
131
  """
132
132
  )
133
133
 
134
+ # Query connections by DESTINATION connector type (no organization filter)
135
+ SELECT_CONNECTIONS_BY_DESTINATION_CONNECTOR = sqlalchemy.text(
136
+ """
137
+ SELECT
138
+ connection.id AS connection_id,
139
+ connection.name AS connection_name,
140
+ connection.destination_id,
141
+ workspace.id AS workspace_id,
142
+ workspace.name AS workspace_name,
143
+ workspace.organization_id,
144
+ workspace.dataplane_group_id,
145
+ dataplane_group.name AS dataplane_name,
146
+ destination_actor.actor_definition_id AS destination_definition_id,
147
+ destination_actor.name AS destination_name
148
+ FROM connection
149
+ JOIN actor AS destination_actor
150
+ ON connection.destination_id = destination_actor.id
151
+ JOIN workspace
152
+ ON destination_actor.workspace_id = workspace.id
153
+ LEFT JOIN dataplane_group
154
+ ON workspace.dataplane_group_id = dataplane_group.id
155
+ WHERE
156
+ destination_actor.actor_definition_id = :connector_definition_id
157
+ LIMIT :limit
158
+ """
159
+ )
160
+
161
+ # Query connections by DESTINATION connector type, filtered by organization
162
+ SELECT_CONNECTIONS_BY_DESTINATION_CONNECTOR_AND_ORG = sqlalchemy.text(
163
+ """
164
+ SELECT
165
+ connection.id AS connection_id,
166
+ connection.name AS connection_name,
167
+ connection.destination_id,
168
+ workspace.id AS workspace_id,
169
+ workspace.name AS workspace_name,
170
+ workspace.organization_id,
171
+ workspace.dataplane_group_id,
172
+ dataplane_group.name AS dataplane_name,
173
+ destination_actor.actor_definition_id AS destination_definition_id,
174
+ destination_actor.name AS destination_name
175
+ FROM connection
176
+ JOIN actor AS destination_actor
177
+ ON connection.destination_id = destination_actor.id
178
+ JOIN workspace
179
+ ON destination_actor.workspace_id = workspace.id
180
+ LEFT JOIN dataplane_group
181
+ ON workspace.dataplane_group_id = dataplane_group.id
182
+ WHERE
183
+ destination_actor.actor_definition_id = :connector_definition_id
184
+ AND workspace.organization_id = :organization_id
185
+ LIMIT :limit
186
+ """
187
+ )
188
+
134
189
  # =============================================================================
135
190
  # Connector Version Queries
136
191
  # =============================================================================
@@ -441,3 +496,34 @@ SELECT_ORG_WORKSPACES = sqlalchemy.text(
441
496
  workspace.name
442
497
  """
443
498
  )
499
+
500
+ # =============================================================================
501
+ # Workspace Lookup by Email Domain
502
+ # =============================================================================
503
+
504
+ # Find workspaces by email domain
505
+ # This is useful for identifying workspaces based on user email domains
506
+ # (e.g., finding partner accounts like MotherDuck by searching for "motherduck.com")
507
+ SELECT_WORKSPACES_BY_EMAIL_DOMAIN = sqlalchemy.text(
508
+ """
509
+ SELECT DISTINCT
510
+ workspace.organization_id,
511
+ workspace.id AS workspace_id,
512
+ workspace.name AS workspace_name,
513
+ workspace.slug,
514
+ workspace.email,
515
+ workspace.dataplane_group_id,
516
+ dataplane_group.name AS dataplane_name,
517
+ workspace.created_at
518
+ FROM workspace
519
+ LEFT JOIN dataplane_group
520
+ ON workspace.dataplane_group_id = dataplane_group.id
521
+ WHERE
522
+ workspace.email LIKE '%@' || :email_domain
523
+ AND workspace.tombstone = false
524
+ ORDER BY
525
+ workspace.organization_id,
526
+ workspace.name
527
+ LIMIT :limit
528
+ """
529
+ )
@@ -5,17 +5,17 @@ This module provides tools for testing Airbyte connectors against live data
5
5
  without using Dagger. It uses Docker SDK directly for container orchestration.
6
6
  """
7
7
 
8
- from airbyte_ops_mcp.live_tests.connection_fetcher import (
8
+ from airbyte_ops_mcp.regression_tests.connection_fetcher import (
9
9
  ConnectionData,
10
10
  fetch_connection_data,
11
11
  )
12
- from airbyte_ops_mcp.live_tests.connection_secret_retriever import (
12
+ from airbyte_ops_mcp.regression_tests.connection_secret_retriever import (
13
13
  enrich_config_with_secrets,
14
14
  is_secret_retriever_enabled,
15
15
  retrieve_unmasked_config,
16
16
  should_use_secret_retriever,
17
17
  )
18
- from airbyte_ops_mcp.live_tests.models import (
18
+ from airbyte_ops_mcp.regression_tests.models import (
19
19
  Command,
20
20
  ConnectorUnderTest,
21
21
  ExecutionResult,
@@ -5,7 +5,7 @@ This module uses the PyAirbyte GoogleGSMSecretManager to retrieve
5
5
  integration test secrets from Google Secret Manager for connectors.
6
6
 
7
7
  Usage:
8
- from airbyte_ops_mcp.live_tests.cdk_secrets import get_first_config_from_secrets
8
+ from airbyte_ops_mcp.regression_tests.cdk_secrets import get_first_config_from_secrets
9
9
 
10
10
  # Fetch the first config for a connector
11
11
  config = get_first_config_from_secrets("source-github")
@@ -11,8 +11,8 @@ The secret retriever requires:
11
11
  - Cloud SQL Proxy running to internal Postgres (or CI environment)
12
12
 
13
13
  Usage:
14
- from airbyte_ops_mcp.live_tests.connection_fetcher import fetch_connection_data
15
- from airbyte_ops_mcp.live_tests.connection_secret_retriever import (
14
+ from airbyte_ops_mcp.regression_tests.connection_fetcher import fetch_connection_data
15
+ from airbyte_ops_mcp.regression_tests.connection_secret_retriever import (
16
16
  enrich_config_with_secrets,
17
17
  should_use_secret_retriever,
18
18
  )
@@ -42,7 +42,7 @@ from airbyte_ops_mcp.connection_config_retriever import (
42
42
  from airbyte_ops_mcp.gcp_auth import ensure_adc_credentials
43
43
 
44
44
  if TYPE_CHECKING:
45
- from airbyte_ops_mcp.live_tests.connection_fetcher import ConnectionData
45
+ from airbyte_ops_mcp.regression_tests.connection_fetcher import ConnectionData
46
46
 
47
47
  logger = logging.getLogger(__name__)
48
48
 
@@ -15,7 +15,7 @@ import uuid
15
15
  from pathlib import Path
16
16
  from typing import TYPE_CHECKING
17
17
 
18
- from airbyte_ops_mcp.live_tests.models import (
18
+ from airbyte_ops_mcp.regression_tests.models import (
19
19
  Command,
20
20
  ExecutionInputs,
21
21
  ExecutionResult,
@@ -8,7 +8,9 @@ Based on airbyte-ci implementation:
8
8
  https://github.com/airbytehq/airbyte/tree/master/airbyte-ci/connectors/live-tests/src/live_tests/commons/backends
9
9
  """
10
10
 
11
- from airbyte_ops_mcp.live_tests.message_cache.duckdb_cache import DuckDbMessageCache
11
+ from airbyte_ops_mcp.regression_tests.message_cache.duckdb_cache import (
12
+ DuckDbMessageCache,
13
+ )
12
14
 
13
15
  __all__ = [
14
16
  "DuckDbMessageCache",
@@ -8,7 +8,7 @@ Based on airbyte-ci implementation:
8
8
  https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/live-tests/src/live_tests/regression_tests/test_read.py
9
9
  """
10
10
 
11
- from airbyte_ops_mcp.live_tests.regression.comparators import (
11
+ from airbyte_ops_mcp.regression_tests.regression.comparators import (
12
12
  ComparisonResult,
13
13
  RecordDiff,
14
14
  StreamComparisonResult,
@@ -19,7 +19,9 @@ from airbyte_protocol.models import AirbyteMessage
19
19
  from airbyte_protocol.models import Type as AirbyteMessageType
20
20
  from genson import SchemaBuilder
21
21
 
22
- from airbyte_ops_mcp.live_tests.obfuscation import convert_obfuscated_record_to_typed
22
+ from airbyte_ops_mcp.regression_tests.obfuscation import (
23
+ convert_obfuscated_record_to_typed,
24
+ )
23
25
 
24
26
  logger = logging.getLogger(__name__)
25
27
 
@@ -8,7 +8,7 @@ Based on airbyte-ci validation tests:
8
8
  https://github.com/airbytehq/airbyte/tree/master/airbyte-ci/connectors/live-tests/src/live_tests/validation_tests
9
9
  """
10
10
 
11
- from airbyte_ops_mcp.live_tests.validation.catalog_validators import (
11
+ from airbyte_ops_mcp.regression_tests.validation.catalog_validators import (
12
12
  ValidationResult,
13
13
  validate_additional_properties_is_true,
14
14
  validate_catalog,
@@ -20,7 +20,7 @@ from airbyte_ops_mcp.live_tests.validation.catalog_validators import (
20
20
  validate_schemas_are_valid_json_schema,
21
21
  validate_streams_have_sync_modes,
22
22
  )
23
- from airbyte_ops_mcp.live_tests.validation.record_validators import (
23
+ from airbyte_ops_mcp.regression_tests.validation.record_validators import (
24
24
  validate_primary_keys_in_records,
25
25
  validate_records_conform_to_schema,
26
26
  validate_state_messages_emitted,
@@ -15,10 +15,12 @@ import jsonschema
15
15
  from airbyte_protocol.models import AirbyteMessage, AirbyteStateType
16
16
  from airbyte_protocol.models import Type as AirbyteMessageType
17
17
 
18
- from airbyte_ops_mcp.live_tests.validation.catalog_validators import ValidationResult
18
+ from airbyte_ops_mcp.regression_tests.validation.catalog_validators import (
19
+ ValidationResult,
20
+ )
19
21
 
20
22
  if TYPE_CHECKING:
21
- from airbyte_ops_mcp.live_tests.models import ExecutionResult
23
+ from airbyte_ops_mcp.regression_tests.models import ExecutionResult
22
24
 
23
25
 
24
26
  def validate_records_conform_to_schema(