airbyte-internal-ops 0.2.3__py3-none-any.whl → 0.3.0__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.
- {airbyte_internal_ops-0.2.3.dist-info → airbyte_internal_ops-0.3.0.dist-info}/METADATA +1 -1
- {airbyte_internal_ops-0.2.3.dist-info → airbyte_internal_ops-0.3.0.dist-info}/RECORD +13 -9
- airbyte_ops_mcp/cli/cloud.py +79 -0
- airbyte_ops_mcp/cloud_admin/api_client.py +463 -69
- airbyte_ops_mcp/constants.py +3 -0
- airbyte_ops_mcp/gcp_logs/__init__.py +18 -0
- airbyte_ops_mcp/gcp_logs/error_lookup.py +383 -0
- airbyte_ops_mcp/github_api.py +264 -0
- airbyte_ops_mcp/mcp/cloud_connector_versions.py +68 -33
- airbyte_ops_mcp/mcp/gcp_logs.py +92 -0
- airbyte_ops_mcp/mcp/server.py +2 -0
- {airbyte_internal_ops-0.2.3.dist-info → airbyte_internal_ops-0.3.0.dist-info}/WHEEL +0 -0
- {airbyte_internal_ops-0.2.3.dist-info → airbyte_internal_ops-0.3.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
airbyte_ops_mcp/__init__.py,sha256=tuzdlMkfnWBnsri5KGHM2M_xuNnzFk2u_aR79mmN7Yg,772
|
|
2
2
|
airbyte_ops_mcp/_annotations.py,sha256=MO-SBDnbykxxHDESG7d8rviZZ4WlZgJKv0a8eBqcEzQ,1757
|
|
3
|
-
airbyte_ops_mcp/constants.py,sha256=
|
|
3
|
+
airbyte_ops_mcp/constants.py,sha256=khcv9W3WkApIyPygEGgE2noBIqLomjoOMLxFBU1ArjA,5308
|
|
4
4
|
airbyte_ops_mcp/gcp_auth.py,sha256=5k-k145ZoYhHLjyDES8nrA8f8BBihRI0ykrdD1IcfOs,3599
|
|
5
5
|
airbyte_ops_mcp/github_actions.py,sha256=wKnuIVmF4u1gMYNdSoryD_PUmvMz5SaHgOvbU0dsolA,9957
|
|
6
|
+
airbyte_ops_mcp/github_api.py,sha256=uupbYKAkm7yLHK_1cDXYKl1bOYhUygZhG5IHspS7duE,8104
|
|
6
7
|
airbyte_ops_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
8
|
airbyte_ops_mcp/_legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
9
|
airbyte_ops_mcp/_legacy/airbyte_ci/README.md,sha256=qEYx4geDR8AEDjrcA303h7Nol-CMDLojxUyiGzQprM8,236
|
|
@@ -352,12 +353,12 @@ airbyte_ops_mcp/cli/__init__.py,sha256=XpL7FyVfgabfBF2JR7u7NwJ2krlYqjd_OwLcWf-Xc
|
|
|
352
353
|
airbyte_ops_mcp/cli/_base.py,sha256=I8tWnyQf0ks4r3J8N8h-5GZxyn37T-55KsbuHnxYlcg,415
|
|
353
354
|
airbyte_ops_mcp/cli/_shared.py,sha256=jg-xMyGzTCGPqKd8VTfE_3kGPIyO_3Kx5sQbG4rPc0Y,1311
|
|
354
355
|
airbyte_ops_mcp/cli/app.py,sha256=SEdBpqFUG2O8zGV5ifwptxrLGFph_dLr66-MX9d69gQ,789
|
|
355
|
-
airbyte_ops_mcp/cli/cloud.py,sha256=
|
|
356
|
+
airbyte_ops_mcp/cli/cloud.py,sha256=OmeJPW8ME82PLJSqzoU_tz_3iqsTA-MY4QBO-ad8gfo,44141
|
|
356
357
|
airbyte_ops_mcp/cli/gh.py,sha256=91b1AxFXvHQCFyXhrrym-756ZjnMCqvxFdmwCtma1zI,2046
|
|
357
358
|
airbyte_ops_mcp/cli/registry.py,sha256=tcf_CDiUVJpSdBRNqlEL3zFKMqK53AhFpJjAETM4gLs,9781
|
|
358
359
|
airbyte_ops_mcp/cli/repo.py,sha256=G1hoQpH0XYhUH3FFOsia9xabGB0LP9o3XcwBuqvFVo0,16331
|
|
359
360
|
airbyte_ops_mcp/cloud_admin/__init__.py,sha256=cqE96Q10Kp6elhH9DAi6TVsIwSUy3sooDLLrxTaktGk,816
|
|
360
|
-
airbyte_ops_mcp/cloud_admin/api_client.py,sha256=
|
|
361
|
+
airbyte_ops_mcp/cloud_admin/api_client.py,sha256=ysTztSbLX0SZSK3qneHTSKVODRzVmLbHBC3ND0j_LTc,38020
|
|
361
362
|
airbyte_ops_mcp/cloud_admin/auth.py,sha256=qE2Aqe0qbZB755KscL65s54Jz78-F-X5a8fXKsrYEOQ,3749
|
|
362
363
|
airbyte_ops_mcp/cloud_admin/connection_config.py,sha256=9opGQer-cGMJANmm-LFLMwvMCNu3nzxa2n2XHkZj9Fw,4899
|
|
363
364
|
airbyte_ops_mcp/cloud_admin/models.py,sha256=YZ3FbEW-tZa50khKTTl4Bzvy_LsGyyQd6qcpXo62jls,2670
|
|
@@ -365,13 +366,16 @@ airbyte_ops_mcp/connection_config_retriever/__init__.py,sha256=Xoi-YvARrNPhECdpw
|
|
|
365
366
|
airbyte_ops_mcp/connection_config_retriever/audit_logging.py,sha256=GjT4dVa0TtvGDmiBz9qwzcYCnSf9hTo7UM6l7ubUNE8,2846
|
|
366
367
|
airbyte_ops_mcp/connection_config_retriever/retrieval.py,sha256=s6yeCyrboWkUd6KdaheEo87x-rLtQNTL8XeR8O9z2HI,12160
|
|
367
368
|
airbyte_ops_mcp/connection_config_retriever/secrets_resolution.py,sha256=12g0lZzhCzAPl4Iv4eMW6d76mvXjIBGspOnNhywzks4,3644
|
|
369
|
+
airbyte_ops_mcp/gcp_logs/__init__.py,sha256=IqkxclXJnD1U4L2at7aC9GYqPXnuLdYLgmkm3ZiIu6s,409
|
|
370
|
+
airbyte_ops_mcp/gcp_logs/error_lookup.py,sha256=wtC2pXwUuJQcVyonIcduDyGxk8kjJ8Dj-Vyq9AdnYh4,12763
|
|
368
371
|
airbyte_ops_mcp/mcp/__init__.py,sha256=QqkNkxzdXlg-W03urBAQ3zmtOKFPf35rXgO9ceUjpng,334
|
|
369
372
|
airbyte_ops_mcp/mcp/_guidance.py,sha256=48tQSnDnxqXtyGJxxgjz0ZiI814o_7Fj7f6R8jpQ7so,2375
|
|
370
373
|
airbyte_ops_mcp/mcp/_http_headers.py,sha256=9TAH2RYhFR3z2JugW4Q3WrrqJIdaCzAbyA1GhtQ_EMM,7278
|
|
371
374
|
airbyte_ops_mcp/mcp/_mcp_utils.py,sha256=WNwcGzF7XGKZNAYRt0Uhj5BkRfmwqnFABCrk77OZjRw,11512
|
|
372
|
-
airbyte_ops_mcp/mcp/cloud_connector_versions.py,sha256=
|
|
375
|
+
airbyte_ops_mcp/mcp/cloud_connector_versions.py,sha256=5qUYRZapYBprmmc5J3lKQzeQ3yJUiFQbrxBgUvnLUgQ,16297
|
|
373
376
|
airbyte_ops_mcp/mcp/connector_analysis.py,sha256=OC4KrOSkMkKPkOisWnSv96BDDE5TQYHq-Jxa2vtjJpo,298
|
|
374
377
|
airbyte_ops_mcp/mcp/connector_qa.py,sha256=aImpqdnqBPDrz10BS0owsV4kuIU2XdalzgbaGZsbOL0,258
|
|
378
|
+
airbyte_ops_mcp/mcp/gcp_logs.py,sha256=IPtq4098_LN1Cgeba4jATO1iYFFFpL2-aRO0pGcOdzs,2689
|
|
375
379
|
airbyte_ops_mcp/mcp/github.py,sha256=h3M3VJrq09y_F9ueQVCq3bUbVBNFuTNKprHtGU_ttio,8045
|
|
376
380
|
airbyte_ops_mcp/mcp/github_repo_ops.py,sha256=PiERpt8abo20Gz4CfXhrDNlVM4o4FOt5sweZJND2a0s,5314
|
|
377
381
|
airbyte_ops_mcp/mcp/metadata.py,sha256=fwGW97WknR5lfKcQnFtK6dU87aA6TmLj1NkKyqDAV9g,270
|
|
@@ -380,7 +384,7 @@ airbyte_ops_mcp/mcp/prod_db_queries.py,sha256=FfGoq3aEj6ZUT4ysBIs1w7LzzwBeRXTaRv
|
|
|
380
384
|
airbyte_ops_mcp/mcp/prompts.py,sha256=mJld9mdPECXYZffWXGSvNs4Xevx3rxqUGNlzGKVC2_s,1599
|
|
381
385
|
airbyte_ops_mcp/mcp/registry.py,sha256=PW-VYUj42qx2pQ_apUkVaoUFq7VgB9zEU7-aGrkSCCw,290
|
|
382
386
|
airbyte_ops_mcp/mcp/regression_tests.py,sha256=S1h-5S5gcZA4WEtIZyAQ836hd04tjSRRqMiYMx0S93g,16079
|
|
383
|
-
airbyte_ops_mcp/mcp/server.py,sha256=
|
|
387
|
+
airbyte_ops_mcp/mcp/server.py,sha256=lKAXxt4u4bz7dsKvAYFFHziMbun2pOnxYmrMtRxsZvM,5317
|
|
384
388
|
airbyte_ops_mcp/mcp/server_info.py,sha256=Yi4B1auW64QZGBDas5mro_vwTjvrP785TFNSBP7GhRg,2361
|
|
385
389
|
airbyte_ops_mcp/prod_db_access/__init__.py,sha256=5pxouMPY1beyWlB0UwPnbaLTKTHqU6X82rbbgKY2vYU,1069
|
|
386
390
|
airbyte_ops_mcp/prod_db_access/db_engine.py,sha256=VUqEWZtharJUR-Cri_pMwtGh1C4Neu4s195mbEXlm-w,9190
|
|
@@ -410,7 +414,7 @@ airbyte_ops_mcp/regression_tests/regression/comparators.py,sha256=MJkLZEKHivgrG0
|
|
|
410
414
|
airbyte_ops_mcp/regression_tests/validation/__init__.py,sha256=MBEwGOoNuqT4_oCahtoK62OKWIjUCfWa7vZTxNj_0Ek,1532
|
|
411
415
|
airbyte_ops_mcp/regression_tests/validation/catalog_validators.py,sha256=jqqVAMOk0mtdPgwu4d0hA0ZEjtsNh5gapvGydRv3_qk,12553
|
|
412
416
|
airbyte_ops_mcp/regression_tests/validation/record_validators.py,sha256=RjauAhKWNwxMBTu0eNS2hMFNQVs5CLbQU51kp6FOVDk,7432
|
|
413
|
-
airbyte_internal_ops-0.
|
|
414
|
-
airbyte_internal_ops-0.
|
|
415
|
-
airbyte_internal_ops-0.
|
|
416
|
-
airbyte_internal_ops-0.
|
|
417
|
+
airbyte_internal_ops-0.3.0.dist-info/METADATA,sha256=Gx40HXaZtFle9mxFDJQNYMGccjrZ3d0xirHsaWcg04s,5679
|
|
418
|
+
airbyte_internal_ops-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
419
|
+
airbyte_internal_ops-0.3.0.dist-info/entry_points.txt,sha256=WxP0l7bRFss4Cr5uQqVj9mTEKwnRKouNuphXQF0lotA,171
|
|
420
|
+
airbyte_internal_ops-0.3.0.dist-info/RECORD,,
|
airbyte_ops_mcp/cli/cloud.py
CHANGED
|
@@ -17,6 +17,7 @@ import shutil
|
|
|
17
17
|
import signal
|
|
18
18
|
import socket
|
|
19
19
|
import subprocess
|
|
20
|
+
import sys
|
|
20
21
|
import tempfile
|
|
21
22
|
import time
|
|
22
23
|
from pathlib import Path
|
|
@@ -44,6 +45,7 @@ from airbyte_ops_mcp.constants import (
|
|
|
44
45
|
DEFAULT_CLOUD_SQL_PROXY_PORT,
|
|
45
46
|
ENV_GCP_PROD_DB_ACCESS_CREDENTIALS,
|
|
46
47
|
)
|
|
48
|
+
from airbyte_ops_mcp.gcp_logs import GCPSeverity, fetch_error_logs
|
|
47
49
|
from airbyte_ops_mcp.mcp.cloud_connector_versions import (
|
|
48
50
|
get_cloud_connector_version,
|
|
49
51
|
set_cloud_connector_version_override,
|
|
@@ -98,6 +100,10 @@ cloud_app.command(connector_app)
|
|
|
98
100
|
db_app = App(name="db", help="Database operations for Airbyte Cloud Prod DB Replica.")
|
|
99
101
|
cloud_app.command(db_app)
|
|
100
102
|
|
|
103
|
+
# Create the logs sub-app under cloud
|
|
104
|
+
logs_app = App(name="logs", help="GCP Cloud Logging operations for Airbyte Cloud.")
|
|
105
|
+
cloud_app.command(logs_app)
|
|
106
|
+
|
|
101
107
|
|
|
102
108
|
@db_app.command(name="start-proxy")
|
|
103
109
|
def start_proxy(
|
|
@@ -1128,3 +1134,76 @@ def fetch_connection_config_cmd(
|
|
|
1128
1134
|
else:
|
|
1129
1135
|
print_error(result.message)
|
|
1130
1136
|
print_json(result.model_dump())
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
@logs_app.command(name="lookup-cloud-backend-error")
|
|
1140
|
+
def lookup_cloud_backend_error(
|
|
1141
|
+
error_id: Annotated[
|
|
1142
|
+
str,
|
|
1143
|
+
Parameter(
|
|
1144
|
+
help=(
|
|
1145
|
+
"The error ID (UUID) to search for. This is typically returned "
|
|
1146
|
+
"in API error responses as {'errorId': '...'}"
|
|
1147
|
+
)
|
|
1148
|
+
),
|
|
1149
|
+
],
|
|
1150
|
+
lookback_days: Annotated[
|
|
1151
|
+
int,
|
|
1152
|
+
Parameter(help="Number of days to look back in logs."),
|
|
1153
|
+
] = 7,
|
|
1154
|
+
min_severity_filter: Annotated[
|
|
1155
|
+
GCPSeverity | None,
|
|
1156
|
+
Parameter(
|
|
1157
|
+
help="Optional minimum severity level to filter logs.",
|
|
1158
|
+
),
|
|
1159
|
+
] = None,
|
|
1160
|
+
raw: Annotated[
|
|
1161
|
+
bool,
|
|
1162
|
+
Parameter(help="Output raw JSON instead of formatted text."),
|
|
1163
|
+
] = False,
|
|
1164
|
+
) -> None:
|
|
1165
|
+
"""Look up error details from GCP Cloud Logging by error ID.
|
|
1166
|
+
|
|
1167
|
+
When an Airbyte Cloud API returns an error response with only an error ID
|
|
1168
|
+
(e.g., {"errorId": "3173452e-8f22-4286-a1ec-b0f16c1e078a"}), this command
|
|
1169
|
+
fetches the full stack trace and error details from GCP Cloud Logging.
|
|
1170
|
+
|
|
1171
|
+
Requires GCP credentials with Logs Viewer role on the target project.
|
|
1172
|
+
Set up credentials with: gcloud auth application-default login
|
|
1173
|
+
"""
|
|
1174
|
+
print(f"Searching for error ID: {error_id}", file=sys.stderr)
|
|
1175
|
+
print(f"Lookback days: {lookback_days}", file=sys.stderr)
|
|
1176
|
+
if min_severity_filter:
|
|
1177
|
+
print(f"Severity filter: {min_severity_filter}", file=sys.stderr)
|
|
1178
|
+
print(file=sys.stderr)
|
|
1179
|
+
|
|
1180
|
+
result = fetch_error_logs(
|
|
1181
|
+
error_id=error_id,
|
|
1182
|
+
lookback_days=lookback_days,
|
|
1183
|
+
min_severity_filter=min_severity_filter,
|
|
1184
|
+
)
|
|
1185
|
+
|
|
1186
|
+
if raw:
|
|
1187
|
+
print_json(result.model_dump())
|
|
1188
|
+
return
|
|
1189
|
+
|
|
1190
|
+
print(f"Found {result.total_entries_found} log entries", file=sys.stderr)
|
|
1191
|
+
print(file=sys.stderr)
|
|
1192
|
+
|
|
1193
|
+
if result.payloads:
|
|
1194
|
+
for i, payload in enumerate(result.payloads):
|
|
1195
|
+
print(f"=== Log Group {i + 1} ===")
|
|
1196
|
+
print(f"Timestamp: {payload.timestamp}")
|
|
1197
|
+
print(f"Severity: {payload.severity}")
|
|
1198
|
+
if payload.resource.labels.pod_name:
|
|
1199
|
+
print(f"Pod: {payload.resource.labels.pod_name}")
|
|
1200
|
+
print(f"Lines: {payload.num_log_lines}")
|
|
1201
|
+
print()
|
|
1202
|
+
print(payload.message)
|
|
1203
|
+
print()
|
|
1204
|
+
elif result.entries:
|
|
1205
|
+
print("No grouped payloads, showing raw entries:", file=sys.stderr)
|
|
1206
|
+
for entry in result.entries:
|
|
1207
|
+
print(f"[{entry.timestamp}] {entry.severity}: {entry.payload}")
|
|
1208
|
+
else:
|
|
1209
|
+
print_error("No log entries found for this error ID.")
|