airbyte-internal-ops 0.1.6__py3-none-any.whl → 0.1.7__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.1.6.dist-info → airbyte_internal_ops-0.1.7.dist-info}/METADATA +1 -1
- {airbyte_internal_ops-0.1.6.dist-info → airbyte_internal_ops-0.1.7.dist-info}/RECORD +6 -6
- airbyte_ops_mcp/live_tests/connection_secret_retriever.py +16 -5
- airbyte_ops_mcp/prod_db_access/db_engine.py +2 -3
- {airbyte_internal_ops-0.1.6.dist-info → airbyte_internal_ops-0.1.7.dist-info}/WHEEL +0 -0
- {airbyte_internal_ops-0.1.6.dist-info → airbyte_internal_ops-0.1.7.dist-info}/entry_points.txt +0 -0
|
@@ -367,7 +367,7 @@ airbyte_ops_mcp/live_tests/__init__.py,sha256=qJac67dt6DQCqif39HqeiG3Tr9xrxfP-al
|
|
|
367
367
|
airbyte_ops_mcp/live_tests/ci_output.py,sha256=NQATOGid0OCbLEl2NOtGK4cHLL5OxXhjmtanBjIlCyE,11369
|
|
368
368
|
airbyte_ops_mcp/live_tests/config.py,sha256=dwWeY0tatdbwl9BqbhZ7EljoZDCtKmGO5fvOAIxeXmA,5873
|
|
369
369
|
airbyte_ops_mcp/live_tests/connection_fetcher.py,sha256=5wIiA0VvCFNEc-fr6Po18gZMX3E5fyPOGf2SuVOqv5U,12799
|
|
370
|
-
airbyte_ops_mcp/live_tests/connection_secret_retriever.py,sha256=
|
|
370
|
+
airbyte_ops_mcp/live_tests/connection_secret_retriever.py,sha256=C3yGoE8JSlkypKlpGYoI-5oczFexHyl5Z3avkDKyqQc,6445
|
|
371
371
|
airbyte_ops_mcp/live_tests/connector_runner.py,sha256=fGE_TCii9zhC3pbyBupJ3JVkuxOWB59Q1DgigcF3q04,9707
|
|
372
372
|
airbyte_ops_mcp/live_tests/evaluation_modes.py,sha256=lAL6pEDmy_XCC7_m4_NXjt_f6Z8CXeAhMkc0FU8bm_M,1364
|
|
373
373
|
airbyte_ops_mcp/live_tests/http_metrics.py,sha256=oTD7f2MnQOvx4plOxHop2bInQ0-whvuToSsrC7TIM-M,12469
|
|
@@ -399,14 +399,14 @@ airbyte_ops_mcp/mcp/registry.py,sha256=PW-VYUj42qx2pQ_apUkVaoUFq7VgB9zEU7-aGrkSC
|
|
|
399
399
|
airbyte_ops_mcp/mcp/server.py,sha256=7zi91xioVTx1q-bEleekZH2c2JnbzDQt_6zxdEwnLbg,2958
|
|
400
400
|
airbyte_ops_mcp/mcp/server_info.py,sha256=4yNBA_N_vUyLwVJqp7abyFuzZkcnv6-ck_Beb2SXqTE,2426
|
|
401
401
|
airbyte_ops_mcp/prod_db_access/__init__.py,sha256=5pxouMPY1beyWlB0UwPnbaLTKTHqU6X82rbbgKY2vYU,1069
|
|
402
|
-
airbyte_ops_mcp/prod_db_access/db_engine.py,sha256=
|
|
402
|
+
airbyte_ops_mcp/prod_db_access/db_engine.py,sha256=ia1KcuQOXi3Qhy_MnxYmccCBJ4rAt_d4nVDjcyzje6o,4289
|
|
403
403
|
airbyte_ops_mcp/prod_db_access/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
404
404
|
airbyte_ops_mcp/prod_db_access/queries.py,sha256=bZZntlTXzvI2uSAFMkOfb_LcfCOlxyTuOddRVw4yU2M,8676
|
|
405
405
|
airbyte_ops_mcp/prod_db_access/sql.py,sha256=zHPucNuMlfxz3aU8vYo1ziiGk0lIncG9XmblEoRDd4c,12725
|
|
406
406
|
airbyte_ops_mcp/registry/__init__.py,sha256=iEaPlt9GrnlaLbc__98TguNeZG8wuQu7S-_2QkhHcbA,858
|
|
407
407
|
airbyte_ops_mcp/registry/models.py,sha256=B4L4TKr52wo0xs0CqvCBrpowqjShzVnZ5eTr2-EyhNs,2346
|
|
408
408
|
airbyte_ops_mcp/registry/publish.py,sha256=VoPxsM2_0zJ829orzCRN-kjgcJtuBNyXgW4I9J680ro,12717
|
|
409
|
-
airbyte_internal_ops-0.1.
|
|
410
|
-
airbyte_internal_ops-0.1.
|
|
411
|
-
airbyte_internal_ops-0.1.
|
|
412
|
-
airbyte_internal_ops-0.1.
|
|
409
|
+
airbyte_internal_ops-0.1.7.dist-info/METADATA,sha256=lIb2MpFriSDAUAYqwerfgA6a3zz3YOrwzDY17cyIZno,5282
|
|
410
|
+
airbyte_internal_ops-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
411
|
+
airbyte_internal_ops-0.1.7.dist-info/entry_points.txt,sha256=eUgJ9xIy9PlR-CgRbqRMsh1NVp6jz08v9bul9vCYlU4,111
|
|
412
|
+
airbyte_internal_ops-0.1.7.dist-info/RECORD,,
|
|
@@ -32,7 +32,9 @@ from __future__ import annotations
|
|
|
32
32
|
|
|
33
33
|
import logging
|
|
34
34
|
import os
|
|
35
|
+
import tempfile
|
|
35
36
|
from dataclasses import replace
|
|
37
|
+
from pathlib import Path
|
|
36
38
|
from typing import TYPE_CHECKING
|
|
37
39
|
|
|
38
40
|
from airbyte_ops_mcp.connection_config_retriever import (
|
|
@@ -57,18 +59,27 @@ def _ensure_gcp_credentials_env() -> None:
|
|
|
57
59
|
"""Ensure GCP credentials are available via standard env var.
|
|
58
60
|
|
|
59
61
|
If GOOGLE_APPLICATION_CREDENTIALS is not set but GCP_PROD_DB_ACCESS_CREDENTIALS is,
|
|
60
|
-
|
|
61
|
-
for internal employees who use
|
|
62
|
-
credential
|
|
62
|
+
write the JSON credentials to a temp file and set GOOGLE_APPLICATION_CREDENTIALS
|
|
63
|
+
to point to that file. This provides a fallback for internal employees who use
|
|
64
|
+
GCP_PROD_DB_ACCESS_CREDENTIALS as their standard credential source for prod
|
|
65
|
+
database access.
|
|
66
|
+
|
|
67
|
+
Note: GOOGLE_APPLICATION_CREDENTIALS must be a file path, not JSON content.
|
|
68
|
+
The GCP_PROD_DB_ACCESS_CREDENTIALS env var contains the JSON content directly,
|
|
69
|
+
so we write it to a temp file first.
|
|
63
70
|
|
|
64
71
|
This function is idempotent and safe to call multiple times.
|
|
65
72
|
"""
|
|
66
73
|
if ENV_GOOGLE_APPLICATION_CREDENTIALS not in os.environ:
|
|
67
74
|
gsm_creds = os.getenv(ENV_GCP_PROD_DB_ACCESS_CREDENTIALS)
|
|
68
75
|
if gsm_creds:
|
|
69
|
-
|
|
76
|
+
# Write credentials to a temp file since GOOGLE_APPLICATION_CREDENTIALS
|
|
77
|
+
# expects a file path, not JSON content
|
|
78
|
+
creds_file = Path(tempfile.gettempdir()) / "gcp_prod_db_creds.json"
|
|
79
|
+
creds_file.write_text(gsm_creds)
|
|
80
|
+
os.environ[ENV_GOOGLE_APPLICATION_CREDENTIALS] = str(creds_file)
|
|
70
81
|
logger.debug(
|
|
71
|
-
f"
|
|
82
|
+
f"Wrote {ENV_GCP_PROD_DB_ACCESS_CREDENTIALS} to {creds_file} and set "
|
|
72
83
|
f"{ENV_GOOGLE_APPLICATION_CREDENTIALS}"
|
|
73
84
|
)
|
|
74
85
|
|
|
@@ -19,9 +19,8 @@ from google.cloud import secretmanager
|
|
|
19
19
|
from google.cloud.sql.connector import Connector
|
|
20
20
|
from google.cloud.sql.connector.enums import IPTypes
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
CONNECTION_RETRIEVER_PG_CONNECTION_DETAILS_SECRET_ID
|
|
24
|
-
"projects/587336813068/secrets/CONNECTION_RETRIEVER_PG_CONNECTION_DETAILS"
|
|
22
|
+
from airbyte_ops_mcp.constants import (
|
|
23
|
+
CONNECTION_RETRIEVER_PG_CONNECTION_DETAILS_SECRET_ID,
|
|
25
24
|
)
|
|
26
25
|
|
|
27
26
|
PG_DRIVER = "pg8000"
|
|
File without changes
|
{airbyte_internal_ops-0.1.6.dist-info → airbyte_internal_ops-0.1.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|