airbyte-internal-ops 0.1.3__py3-none-any.whl → 0.1.5__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 (35) hide show
  1. {airbyte_internal_ops-0.1.3.dist-info → airbyte_internal_ops-0.1.5.dist-info}/METADATA +8 -5
  2. {airbyte_internal_ops-0.1.3.dist-info → airbyte_internal_ops-0.1.5.dist-info}/RECORD +35 -15
  3. airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/common.py +1 -1
  4. airbyte_ops_mcp/airbyte_repo/list_connectors.py +44 -4
  5. airbyte_ops_mcp/airbyte_repo/utils.py +5 -3
  6. airbyte_ops_mcp/cli/cloud.py +317 -47
  7. airbyte_ops_mcp/cli/repo.py +15 -0
  8. airbyte_ops_mcp/cloud_admin/connection_config.py +131 -0
  9. airbyte_ops_mcp/live_tests/__init__.py +16 -0
  10. airbyte_ops_mcp/live_tests/_connection_retriever/__init__.py +35 -0
  11. airbyte_ops_mcp/live_tests/_connection_retriever/audit_logging.py +88 -0
  12. airbyte_ops_mcp/live_tests/_connection_retriever/consts.py +33 -0
  13. airbyte_ops_mcp/live_tests/_connection_retriever/db_access.py +82 -0
  14. airbyte_ops_mcp/live_tests/_connection_retriever/retrieval.py +391 -0
  15. airbyte_ops_mcp/live_tests/_connection_retriever/secrets_resolution.py +130 -0
  16. airbyte_ops_mcp/live_tests/config.py +190 -0
  17. airbyte_ops_mcp/live_tests/connection_fetcher.py +159 -2
  18. airbyte_ops_mcp/live_tests/connection_secret_retriever.py +173 -0
  19. airbyte_ops_mcp/live_tests/evaluation_modes.py +45 -0
  20. airbyte_ops_mcp/live_tests/http_metrics.py +81 -0
  21. airbyte_ops_mcp/live_tests/message_cache/__init__.py +15 -0
  22. airbyte_ops_mcp/live_tests/message_cache/duckdb_cache.py +415 -0
  23. airbyte_ops_mcp/live_tests/obfuscation.py +126 -0
  24. airbyte_ops_mcp/live_tests/regression/__init__.py +29 -0
  25. airbyte_ops_mcp/live_tests/regression/comparators.py +466 -0
  26. airbyte_ops_mcp/live_tests/schema_generation.py +154 -0
  27. airbyte_ops_mcp/live_tests/validation/__init__.py +43 -0
  28. airbyte_ops_mcp/live_tests/validation/catalog_validators.py +389 -0
  29. airbyte_ops_mcp/live_tests/validation/record_validators.py +227 -0
  30. airbyte_ops_mcp/mcp/_mcp_utils.py +3 -0
  31. airbyte_ops_mcp/mcp/live_tests.py +515 -0
  32. airbyte_ops_mcp/mcp/server.py +3 -0
  33. airbyte_ops_mcp/mcp/server_info.py +2 -2
  34. {airbyte_internal_ops-0.1.3.dist-info → airbyte_internal_ops-0.1.5.dist-info}/WHEEL +0 -0
  35. {airbyte_internal_ops-0.1.3.dist-info → airbyte_internal_ops-0.1.5.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-internal-ops
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: MCP and API interfaces that let the agents do the admin work
5
5
  Author-email: Aaron Steers <aj@airbyte.io>
6
6
  Keywords: admin,airbyte,api,mcp
@@ -10,18 +10,20 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
- Requires-Python: >=3.11
15
- Requires-Dist: airbyte-cdk<7.0,>=6.0.0
13
+ Requires-Python: <3.13,>=3.11
14
+ Requires-Dist: airbyte-cdk<8.0,>=7.3.9
16
15
  Requires-Dist: airbyte-protocol-models-pdv2>=0.13.0
17
- Requires-Dist: airbyte>=0.1.0
16
+ Requires-Dist: airbyte>=0.34.0
18
17
  Requires-Dist: asyncer<1.0,>=0.0.4
19
18
  Requires-Dist: click<9.0,>=8.1.3
19
+ Requires-Dist: cloud-sql-python-connector[pg8000]<2.0,>=1.7.0
20
20
  Requires-Dist: cyclopts<5.0,>=4.0.0
21
21
  Requires-Dist: docker<7.0,>=6.0
22
22
  Requires-Dist: dpath<3.0,>=2.1.5
23
23
  Requires-Dist: fastmcp<3.0,>=2.12.1
24
24
  Requires-Dist: gitpython<4.0,>=3.1.29
25
+ Requires-Dist: google-cloud-logging<4.0,>=3.9.0
26
+ Requires-Dist: google-cloud-secret-manager<3.0,>=2.18.0
25
27
  Requires-Dist: jinja2<4.0,>=3.1.2
26
28
  Requires-Dist: pydantic>=2.0.0
27
29
  Requires-Dist: python-dotenv<2.0,>=1.0.0
@@ -30,6 +32,7 @@ Requires-Dist: requests<3.0,>=2.31.0
30
32
  Requires-Dist: rich<14.0,>=13.0.0
31
33
  Requires-Dist: semver<4.0,>=3.0.1
32
34
  Requires-Dist: slack-sdk<4.0,>=3.36.0
35
+ Requires-Dist: sqlalchemy<3.0,>=2.0.0
33
36
  Requires-Dist: toml<1.0,>=0.10.2
34
37
  Description-Content-Type: text/markdown
35
38
 
@@ -138,7 +138,7 @@ airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/tes
138
138
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/context.py,sha256=ounJj-ZjLBTtZx088t6u_UKy_aHJZmMmfXskSTbWjFM,9789
139
139
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/pipeline.py,sha256=QaxeepQxl5PX5xitTt7pbt2eIkQJTgAqmmxL2nFqvvI,3020
140
140
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
141
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/common.py,sha256=e4SWZVYIbUiTnTSbamMJLLIDlzrTbh78a1KcXwkpsv0,42952
141
+ airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/common.py,sha256=Gv9kFNgteTqGV92TgQxzlUefEi6NL0VNZy31V1l7DwM,42948
142
142
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/java_connectors.py,sha256=UOwoLiSpVdDSGFhrV__XTbJgF4eQj-MyS3tezej09qA,5774
143
143
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/manifest_only_connectors.py,sha256=aVD-FYW_5yDryZUXIjgm-H_jJetiAfmxRwiPQV4Fnlc,9529
144
144
  airbyte_ops_mcp/_legacy/airbyte_ci/connector_pipelines/airbyte_ci/connectors/test/steps/python_connectors.py,sha256=BJKZLovnfA1_vYNcEC2ko8xeD0FhSLorhccVCx7q7RY,15755
@@ -352,42 +352,62 @@ airbyte_ops_mcp/_legacy/airbyte_ci/metadata_service/templates/render.py,sha256=g
352
352
  airbyte_ops_mcp/_legacy/airbyte_ci/metadata_service/validators/metadata_validator.py,sha256=xh3Q7XgXcFaHS4Fa9A6anDecudaEXQX-SOetjgm5L4Q,14653
353
353
  airbyte_ops_mcp/airbyte_repo/__init__.py,sha256=3yEpCOop1h33UuCtU7-1UB3kun2QsxtgvsfVEpuqN6s,1572
354
354
  airbyte_ops_mcp/airbyte_repo/bump_version.py,sha256=rtXYv105BhElj7twQmy20VjNsj6vCb0Ulrzmc4Z-1cE,15384
355
- airbyte_ops_mcp/airbyte_repo/list_connectors.py,sha256=IyYLtcBDsRmxe0SGJd3VHsO_0iaiTjsNMV6BqBUtZPI,14634
356
- airbyte_ops_mcp/airbyte_repo/utils.py,sha256=IZ7bJJz3I0BBfSxRfINY193VylMeg2GEXe0A1ZCiR80,3030
355
+ airbyte_ops_mcp/airbyte_repo/list_connectors.py,sha256=rMiQFPGANSQzaBncVUh4oO8zdLafU4gxxqZB9o7_FAA,15714
356
+ airbyte_ops_mcp/airbyte_repo/utils.py,sha256=TXlOAfhiu_hVRNjCxB4PRPVDhTWCU5lYmgqz4QG_-EA,3201
357
357
  airbyte_ops_mcp/cli/__init__.py,sha256=XpL7FyVfgabfBF2JR7u7NwJ2krlYqjd_OwLcWf-Xc7s,114
358
358
  airbyte_ops_mcp/cli/_base.py,sha256=I8tWnyQf0ks4r3J8N8h-5GZxyn37T-55KsbuHnxYlcg,415
359
359
  airbyte_ops_mcp/cli/_shared.py,sha256=jg-xMyGzTCGPqKd8VTfE_3kGPIyO_3Kx5sQbG4rPc0Y,1311
360
360
  airbyte_ops_mcp/cli/app.py,sha256=SEdBpqFUG2O8zGV5ifwptxrLGFph_dLr66-MX9d69gQ,789
361
- airbyte_ops_mcp/cli/cloud.py,sha256=7lx5FE65hpBBxsNDNouoAkounCUqxy1xZE-xlDpom9Q,20735
361
+ airbyte_ops_mcp/cli/cloud.py,sha256=BMFYs5bTEgdOhxwzBrtSyYMKaHhXnMM_SGzK2hFDPBY,32076
362
362
  airbyte_ops_mcp/cli/gh.py,sha256=91b1AxFXvHQCFyXhrrym-756ZjnMCqvxFdmwCtma1zI,2046
363
363
  airbyte_ops_mcp/cli/registry.py,sha256=wHyfiysASuy-HGvLJIiU8TRguaiuqRaXQP9QJ-LC7bk,2940
364
- airbyte_ops_mcp/cli/repo.py,sha256=2LurE6AvRpdgYpiRZuvA33bI1-e7_e0QsFbEO7Bba_g,15780
364
+ airbyte_ops_mcp/cli/repo.py,sha256=G1hoQpH0XYhUH3FFOsia9xabGB0LP9o3XcwBuqvFVo0,16331
365
365
  airbyte_ops_mcp/cloud_admin/__init__.py,sha256=cqE96Q10Kp6elhH9DAi6TVsIwSUy3sooDLLrxTaktGk,816
366
366
  airbyte_ops_mcp/cloud_admin/api_client.py,sha256=4vZv1J4S2Q8ETl6gIB20X1X6KHTVV-bx__b2Ax8oqyc,17358
367
367
  airbyte_ops_mcp/cloud_admin/auth.py,sha256=j45pRR8fg6CLwVdn7Uu5KW_kTz_CjRP6ZJGUzqHj_Dk,2558
368
+ airbyte_ops_mcp/cloud_admin/connection_config.py,sha256=UtbIwuB7CA3WJr9oYRwlKDsjciqd_9ewWdml2f8DuXw,4887
368
369
  airbyte_ops_mcp/cloud_admin/models.py,sha256=YZ3FbEW-tZa50khKTTl4Bzvy_LsGyyQd6qcpXo62jls,2670
369
- airbyte_ops_mcp/live_tests/__init__.py,sha256=udSsiz8WNI69WSn6Ib9uGB1LEblL6ElVHaY8hWGMHLc,525
370
+ airbyte_ops_mcp/live_tests/__init__.py,sha256=qJac67dt6DQCqif39HqeiG3Tr9xrxfP-ala8HsLZKis,1020
370
371
  airbyte_ops_mcp/live_tests/ci_output.py,sha256=NQATOGid0OCbLEl2NOtGK4cHLL5OxXhjmtanBjIlCyE,11369
371
- airbyte_ops_mcp/live_tests/connection_fetcher.py,sha256=ffMD6bGWW4a1MA83Fs-tXLyOnT6aO9dvm1Kk9FT9ocA,6662
372
+ airbyte_ops_mcp/live_tests/config.py,sha256=dwWeY0tatdbwl9BqbhZ7EljoZDCtKmGO5fvOAIxeXmA,5873
373
+ airbyte_ops_mcp/live_tests/connection_fetcher.py,sha256=5wIiA0VvCFNEc-fr6Po18gZMX3E5fyPOGf2SuVOqv5U,12799
374
+ airbyte_ops_mcp/live_tests/connection_secret_retriever.py,sha256=XBuPfmA9GnNCHlJdDocwiB_UIx8F0D6OHBNNIDPrfk0,5869
372
375
  airbyte_ops_mcp/live_tests/connector_runner.py,sha256=fGE_TCii9zhC3pbyBupJ3JVkuxOWB59Q1DgigcF3q04,9707
373
- airbyte_ops_mcp/live_tests/http_metrics.py,sha256=ryZANWz4CXT24j7PxeE7r3gDuRbcEGR9ezLrav_E32U,9701
376
+ airbyte_ops_mcp/live_tests/evaluation_modes.py,sha256=lAL6pEDmy_XCC7_m4_NXjt_f6Z8CXeAhMkc0FU8bm_M,1364
377
+ airbyte_ops_mcp/live_tests/http_metrics.py,sha256=oTD7f2MnQOvx4plOxHop2bInQ0-whvuToSsrC7TIM-M,12469
374
378
  airbyte_ops_mcp/live_tests/models.py,sha256=brtAT9oO1TwjFcP91dFcu0XcUNqQb-jf7di1zkoVEuo,8782
379
+ airbyte_ops_mcp/live_tests/obfuscation.py,sha256=JanpCLj6M9-_Zto6PABzNaY3OA93Frq3YpJ1411QNtQ,4395
380
+ airbyte_ops_mcp/live_tests/schema_generation.py,sha256=VQfn2WbsMptfjO_ub709FYSwwwvjOuWy2Jut7o5ThIs,5308
381
+ airbyte_ops_mcp/live_tests/_connection_retriever/__init__.py,sha256=3Mm9Lauqf4TcdeXhujbXXitl_A7_3iUbc0iQqd6gfog,1125
382
+ airbyte_ops_mcp/live_tests/_connection_retriever/audit_logging.py,sha256=DbziKNbZppb9YBly9x3WGWtPhSTkg9MIreIr7mUBkl8,2823
383
+ airbyte_ops_mcp/live_tests/_connection_retriever/consts.py,sha256=k1FJk9Gyc9fWwuzh9TFUU-XpbohhbsrGC5EEJaIPy2c,1021
384
+ airbyte_ops_mcp/live_tests/_connection_retriever/db_access.py,sha256=riTQ7OjwJhZqPQqjwT3WLxbx3TenI2PfgpUpuwoVsd0,2686
385
+ airbyte_ops_mcp/live_tests/_connection_retriever/retrieval.py,sha256=wehmHbEoai_ab9lyobzq6ifMzacJEZv5mwJh53tOi60,12443
386
+ airbyte_ops_mcp/live_tests/_connection_retriever/secrets_resolution.py,sha256=TnqhzkpIaM3aHV34MMw65i1-jVdtRAk9Qqefz7DZJP8,4384
375
387
  airbyte_ops_mcp/live_tests/commons/__init__.py,sha256=lNew_sAL4c8dPy3gMFbGC5_FuUX1P6QzGULbqS2H4M0,104
388
+ airbyte_ops_mcp/live_tests/message_cache/__init__.py,sha256=h6G_c73k2_OR8otg1YYV42rfKgKG7eiMIRiNxfo5fzU,545
389
+ airbyte_ops_mcp/live_tests/message_cache/duckdb_cache.py,sha256=LVj8sCA1pgJimT8NFQJzbsW8dEzIX5hB280sFtkP3xA,15355
390
+ airbyte_ops_mcp/live_tests/regression/__init__.py,sha256=SsgBKULvowwYeeS5GmrtyyVzghS9-cfZwdxskWCcRBg,851
391
+ airbyte_ops_mcp/live_tests/regression/comparators.py,sha256=MJkLZEKHivgrG0-3Y8BzLtnXlOb16t9z-reC9lhyObQ,15967
392
+ airbyte_ops_mcp/live_tests/validation/__init__.py,sha256=To16AfC5k4xwtKI4Ep8FZrdl1DexesVKe002reWwmGA,1520
393
+ airbyte_ops_mcp/live_tests/validation/catalog_validators.py,sha256=jqqVAMOk0mtdPgwu4d0hA0ZEjtsNh5gapvGydRv3_qk,12553
394
+ airbyte_ops_mcp/live_tests/validation/record_validators.py,sha256=-7Ir2LWGCrtadK2JLuBgppSyk0RFJX6Nsy0lrabtwrs,7411
376
395
  airbyte_ops_mcp/mcp/__init__.py,sha256=QqkNkxzdXlg-W03urBAQ3zmtOKFPf35rXgO9ceUjpng,334
377
396
  airbyte_ops_mcp/mcp/_guidance.py,sha256=48tQSnDnxqXtyGJxxgjz0ZiI814o_7Fj7f6R8jpQ7so,2375
378
- airbyte_ops_mcp/mcp/_mcp_utils.py,sha256=LTekWdqvyzLd_2VFeUZ1Qd_ibIDJ91ZNPS0mEnXnqBo,9011
397
+ airbyte_ops_mcp/mcp/_mcp_utils.py,sha256=Im3J3yCtXPbW_Kp-oh5b11Z2187V3-Zsos5LBgdvQrc,9111
379
398
  airbyte_ops_mcp/mcp/cloud_connector_versions.py,sha256=G8mVzhvSCmrTEqDseV57-wwL0s3oWdydgyvgMr027tU,10443
380
399
  airbyte_ops_mcp/mcp/connector_analysis.py,sha256=OC4KrOSkMkKPkOisWnSv96BDDE5TQYHq-Jxa2vtjJpo,298
381
400
  airbyte_ops_mcp/mcp/connector_qa.py,sha256=aImpqdnqBPDrz10BS0owsV4kuIU2XdalzgbaGZsbOL0,258
382
401
  airbyte_ops_mcp/mcp/github.py,sha256=5ZPsSTy4-gummS96xGoG-n2RwCgyg3-UWAvmEmxd5x4,7686
383
402
  airbyte_ops_mcp/mcp/github_repo_ops.py,sha256=D7yDtqMISFqaUzqnyA0dLE_6j6G3wHrNz8Byo8ajR8E,4929
403
+ airbyte_ops_mcp/mcp/live_tests.py,sha256=KnxZLuUNmm_3Clt0DU8H9rJ01zOKefnL_wqdSCMDjkE,17992
384
404
  airbyte_ops_mcp/mcp/metadata.py,sha256=fwGW97WknR5lfKcQnFtK6dU87aA6TmLj1NkKyqDAV9g,270
385
405
  airbyte_ops_mcp/mcp/prerelease.py,sha256=2Mr0LdCLhEc9Q7CEtmganJXHGHCLCXODKlkSapLsSsY,9484
386
406
  airbyte_ops_mcp/mcp/prompts.py,sha256=6opN4ZweQxfSdtoK0gL6wTrlxkRvxTQvH1VTmAuhoBE,1645
387
407
  airbyte_ops_mcp/mcp/registry.py,sha256=PW-VYUj42qx2pQ_apUkVaoUFq7VgB9zEU7-aGrkSCCw,290
388
- airbyte_ops_mcp/mcp/server.py,sha256=RtyQfCsxiCvcVHpm6w7Ozt9-77j0KrUYROdryrmhCFo,2673
389
- airbyte_ops_mcp/mcp/server_info.py,sha256=VcNLn6CSy2UcgM2V1ep9-JGwV63p3cK1G14BFHXEn0U,2402
390
- airbyte_internal_ops-0.1.3.dist-info/METADATA,sha256=ZDywWwtt2Gj5UjG1mV7AaFcgGpDJIEa9I3UP2aj9sv0,2706
391
- airbyte_internal_ops-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
392
- airbyte_internal_ops-0.1.3.dist-info/entry_points.txt,sha256=eUgJ9xIy9PlR-CgRbqRMsh1NVp6jz08v9bul9vCYlU4,111
393
- airbyte_internal_ops-0.1.3.dist-info/RECORD,,
408
+ airbyte_ops_mcp/mcp/server.py,sha256=oJOrwZP7hAwx2pjChZUZYv-aA4NITWiCRiXFiKVOf8E,2843
409
+ airbyte_ops_mcp/mcp/server_info.py,sha256=4yNBA_N_vUyLwVJqp7abyFuzZkcnv6-ck_Beb2SXqTE,2426
410
+ airbyte_internal_ops-0.1.5.dist-info/METADATA,sha256=XmVAvFOU6d8fO_atjptKKYgjPPQeBYspi2pupKXHxiY,2866
411
+ airbyte_internal_ops-0.1.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
412
+ airbyte_internal_ops-0.1.5.dist-info/entry_points.txt,sha256=eUgJ9xIy9PlR-CgRbqRMsh1NVp6jz08v9bul9vCYlU4,111
413
+ airbyte_internal_ops-0.1.5.dist-info/RECORD,,
@@ -976,7 +976,7 @@ class LiveTests(Step):
976
976
  # Add GCP credentials from the environment and point google to their location (also required for connection-retriever)
977
977
  .with_new_file(
978
978
  "/tmp/credentials.json",
979
- contents=os.getenv("GCP_INTEGRATION_TESTER_CREDENTIALS", ""),
979
+ contents=os.getenv("GCP_PROD_DB_ACCESS_CREDENTIALS", ""),
980
980
  )
981
981
  .with_env_variable(
982
982
  "GOOGLE_APPLICATION_CREDENTIALS", "/tmp/credentials.json"
@@ -7,15 +7,22 @@ by comparing git diffs between branches.
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
+ import logging
10
11
  import re
11
12
  import subprocess
12
13
  from dataclasses import dataclass
13
14
  from enum import StrEnum
14
15
  from functools import lru_cache
15
16
  from pathlib import Path
17
+ from typing import Any
18
+
19
+ import yaml
16
20
 
17
21
  CONNECTOR_PATH_PREFIX = "airbyte-integrations/connectors"
18
22
  METADATA_FILE_NAME = "metadata.yaml"
23
+ GIT_DEFAULT_BRANCH = "origin/master"
24
+
25
+ logger = logging.getLogger(__name__)
19
26
 
20
27
 
21
28
  class ConnectorLanguage(StrEnum):
@@ -29,7 +36,7 @@ class ConnectorLanguage(StrEnum):
29
36
 
30
37
  def get_modified_connectors(
31
38
  repo_path: str | Path,
32
- base_ref: str = "origin/main",
39
+ base_ref: str = GIT_DEFAULT_BRANCH,
33
40
  head_ref: str = "HEAD",
34
41
  ) -> list[str]:
35
42
  """Get list of connector IDs that have been modified.
@@ -40,14 +47,14 @@ def get_modified_connectors(
40
47
 
41
48
  Args:
42
49
  repo_path: Path to the Airbyte monorepo
43
- base_ref: Base git reference to compare against (default: "origin/main")
50
+ base_ref: Base git reference to compare against (default: "origin/master")
44
51
  head_ref: Head git reference to compare (default: "HEAD")
45
52
 
46
53
  Returns:
47
54
  List of connector technical names (e.g., ["source-faker", "destination-postgres"])
48
55
 
49
56
  Example:
50
- >>> connectors = get_changed_connectors("/path/to/airbyte", "origin/main")
57
+ >>> connectors = get_changed_connectors("/path/to/airbyte", "origin/master")
51
58
  >>> print(connectors)
52
59
  ['source-faker', 'destination-postgres']
53
60
  """
@@ -158,6 +165,39 @@ def get_all_connectors(repo_path: str | Path) -> set[str]:
158
165
  return {p.name for p in connectors_dir.iterdir() if p.is_dir()}
159
166
 
160
167
 
168
+ def get_connector_metadata(
169
+ repo_path: str | Path,
170
+ connector_name: str,
171
+ ) -> dict[str, Any] | None:
172
+ """Get metadata for a specific connector.
173
+
174
+ Args:
175
+ repo_path: Path to the Airbyte monorepo
176
+ connector_name: Technical name of the connector (e.g., "source-faker")
177
+
178
+ Returns:
179
+ The connector's metadata dict (the 'data' section), or None if not found
180
+
181
+ Example:
182
+ >>> metadata = get_connector_metadata("/path/to/airbyte", "source-faker")
183
+ >>> metadata.get("supportLevel")
184
+ 'certified'
185
+ """
186
+ repo_path = Path(repo_path)
187
+ connector_dir = repo_path / CONNECTOR_PATH_PREFIX / connector_name
188
+ metadata_file = connector_dir / METADATA_FILE_NAME
189
+
190
+ if not metadata_file.exists():
191
+ return None
192
+
193
+ try:
194
+ with open(metadata_file) as f:
195
+ metadata = yaml.safe_load(f)
196
+ return metadata.get("data", {})
197
+ except Exception:
198
+ return None
199
+
200
+
161
201
  def get_connectors_by_language(
162
202
  repo_path: str | Path,
163
203
  language: ConnectorLanguage,
@@ -408,7 +448,7 @@ def list_connectors(
408
448
 
409
449
  # Apply modified filter
410
450
  if modified is not None:
411
- base = base_ref if base_ref is not None else "origin/main"
451
+ base = base_ref if base_ref is not None else GIT_DEFAULT_BRANCH
412
452
  head = head_ref if head_ref is not None else "HEAD"
413
453
  changed_set = set(get_modified_connectors(repo_path, base, head))
414
454
  if modified:
@@ -81,9 +81,11 @@ def resolve_diff_range(
81
81
 
82
82
  # Determine base_ref and head_ref based on PR detection
83
83
  if pr_number is not None:
84
- # PR detected - use origin/main vs HEAD (assumes CI checked out the PR)
85
- # TODO: In future, use GitHub API to get PR diff directly
86
- base_ref = "origin/main"
84
+ # PR detected - use origin/{base_branch} vs HEAD (assumes CI checked out the PR)
85
+ # Use GITHUB_BASE_REF if available (set by GitHub Actions for PRs)
86
+ # This handles repos with different default branches (main, master, etc.)
87
+ base_branch = os.getenv("GITHUB_BASE_REF", "master")
88
+ base_ref = f"origin/{base_branch}"
87
89
  head_ref = "HEAD"
88
90
  else:
89
91
  # No PR detected - fallback to HEAD~1 vs HEAD (post-merge use case)