airbyte-internal-ops 0.4.2__py3-none-any.whl → 0.5.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.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/METADATA +1 -1
- {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/RECORD +13 -52
- airbyte_ops_mcp/cli/cloud.py +27 -0
- airbyte_ops_mcp/cloud_admin/api_client.py +473 -0
- airbyte_ops_mcp/cloud_admin/models.py +56 -0
- airbyte_ops_mcp/mcp/cloud_connector_versions.py +460 -0
- airbyte_ops_mcp/mcp/prerelease.py +5 -44
- airbyte_ops_mcp/regression_tests/ci_output.py +8 -4
- airbyte_ops_mcp/regression_tests/http_metrics.py +21 -2
- airbyte_ops_mcp/regression_tests/models.py +6 -0
- airbyte_ops_mcp/telemetry.py +162 -0
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/.gitignore +0 -1
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/README.md +0 -420
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/__init__.py +0 -2
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/__init__.py +0 -1
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/__init__.py +0 -8
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/base_backend.py +0 -16
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/duckdb_backend.py +0 -87
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/file_backend.py +0 -165
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/connection_objects_retrieval.py +0 -377
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/connector_runner.py +0 -247
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/errors.py +0 -7
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/evaluation_modes.py +0 -25
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/hacks.py +0 -23
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/json_schema_helper.py +0 -384
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/mitm_addons.py +0 -37
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/models.py +0 -595
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/proxy.py +0 -207
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/secret_access.py +0 -47
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/segment_tracking.py +0 -45
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/utils.py +0 -214
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/conftest.py.disabled +0 -751
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/consts.py +0 -4
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/poetry.lock +0 -4480
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/pytest.ini +0 -9
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/__init__.py +0 -1
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_check.py +0 -61
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_discover.py +0 -117
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_read.py +0 -627
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_spec.py +0 -43
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/report.py +0 -542
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/stash_keys.py +0 -38
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/__init__.py +0 -0
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/private_details.html.j2 +0 -305
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/report.html.j2 +0 -515
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/utils.py +0 -187
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/__init__.py +0 -0
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_check.py +0 -61
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_discover.py +0 -217
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_read.py +0 -177
- airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_spec.py +0 -631
- {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/WHEEL +0 -0
- {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[pytest]
|
|
2
|
-
addopts = --capture=no
|
|
3
|
-
console_output_style = progress
|
|
4
|
-
log_cli = True
|
|
5
|
-
log_cli_level= INFO
|
|
6
|
-
markers =
|
|
7
|
-
allow_diagnostic_mode: mark a test as eligible for diagnostic mode.
|
|
8
|
-
with_state: mark test as running a read command with state.
|
|
9
|
-
without_state: mark test as running a read command without state.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
from collections.abc import Callable
|
|
5
|
-
|
|
6
|
-
import pytest
|
|
7
|
-
from live_tests.commons.models import ExecutionResult
|
|
8
|
-
from live_tests.consts import MAX_LINES_IN_REPORT
|
|
9
|
-
from live_tests.utils import (
|
|
10
|
-
fail_test_on_failing_execution_results,
|
|
11
|
-
is_successful_check,
|
|
12
|
-
tail_file,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
pytestmark = [
|
|
16
|
-
pytest.mark.anyio,
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
async def test_check_passes_on_both_versions(
|
|
21
|
-
record_property: Callable,
|
|
22
|
-
check_control_execution_result: ExecutionResult,
|
|
23
|
-
check_target_execution_result: ExecutionResult,
|
|
24
|
-
) -> None:
|
|
25
|
-
"""This test runs the check command on both the control and target connectors.
|
|
26
|
-
It makes sure that the check command succeeds on both connectors.
|
|
27
|
-
Success is determined by the presence of a connection status message with a status of SUCCEEDED.
|
|
28
|
-
"""
|
|
29
|
-
fail_test_on_failing_execution_results(
|
|
30
|
-
record_property,
|
|
31
|
-
[
|
|
32
|
-
check_control_execution_result,
|
|
33
|
-
check_target_execution_result,
|
|
34
|
-
],
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
successful_control_check: bool = is_successful_check(check_control_execution_result)
|
|
38
|
-
successful_target_check: bool = is_successful_check(check_target_execution_result)
|
|
39
|
-
error_messages = []
|
|
40
|
-
if not successful_control_check:
|
|
41
|
-
record_property(
|
|
42
|
-
f"Control CHECK standard output [Last {MAX_LINES_IN_REPORT} lines]",
|
|
43
|
-
tail_file(
|
|
44
|
-
check_control_execution_result.stdout_file_path, n=MAX_LINES_IN_REPORT
|
|
45
|
-
),
|
|
46
|
-
)
|
|
47
|
-
error_messages.append(
|
|
48
|
-
"The control check did not succeed, we cannot compare the results."
|
|
49
|
-
)
|
|
50
|
-
if not successful_target_check:
|
|
51
|
-
record_property(
|
|
52
|
-
f"Target CHECK standard output [Last {MAX_LINES_IN_REPORT} lines]",
|
|
53
|
-
tail_file(
|
|
54
|
-
check_target_execution_result.stdout_file_path, n=MAX_LINES_IN_REPORT
|
|
55
|
-
),
|
|
56
|
-
)
|
|
57
|
-
error_messages.append(
|
|
58
|
-
"The target check did not succeed. Check the test artifacts for more information."
|
|
59
|
-
)
|
|
60
|
-
if error_messages:
|
|
61
|
-
pytest.fail("\n".join(error_messages))
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import json
|
|
5
|
-
from collections.abc import Callable, Iterable
|
|
6
|
-
|
|
7
|
-
import pytest
|
|
8
|
-
from _pytest.fixtures import SubRequest
|
|
9
|
-
from airbyte_protocol.models import AirbyteStream # type: ignore
|
|
10
|
-
from live_tests.commons.models import ExecutionResult
|
|
11
|
-
from live_tests.utils import (
|
|
12
|
-
fail_test_on_failing_execution_results,
|
|
13
|
-
get_and_write_diff,
|
|
14
|
-
get_catalog,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
pytestmark = [
|
|
18
|
-
pytest.mark.anyio,
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
async def test_catalog_are_the_same(
|
|
23
|
-
record_property: Callable,
|
|
24
|
-
request: SubRequest,
|
|
25
|
-
discover_control_execution_result: ExecutionResult,
|
|
26
|
-
discover_target_execution_result: ExecutionResult,
|
|
27
|
-
) -> None:
|
|
28
|
-
"""This test runs the discover command on both the control and target connectors.
|
|
29
|
-
It makes sure that the discover command returns the same catalog for both connectors.
|
|
30
|
-
A catalog diff is generated and stored in the test artifacts if the catalogs are not the same.
|
|
31
|
-
"""
|
|
32
|
-
fail_test_on_failing_execution_results(
|
|
33
|
-
record_property,
|
|
34
|
-
[
|
|
35
|
-
discover_control_execution_result,
|
|
36
|
-
discover_target_execution_result,
|
|
37
|
-
],
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
control_catalog = get_catalog(discover_control_execution_result)
|
|
41
|
-
target_catalog = get_catalog(discover_target_execution_result)
|
|
42
|
-
|
|
43
|
-
if control_catalog is None:
|
|
44
|
-
pytest.skip(
|
|
45
|
-
"The control discover did not return a catalog, we cannot compare the results."
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
if target_catalog is None:
|
|
49
|
-
pytest.fail(
|
|
50
|
-
"The target discover did not return a catalog. Check the test artifacts for more information."
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
control_streams = {c.name: c for c in control_catalog.streams}
|
|
54
|
-
target_streams = {t.name: t for t in target_catalog.streams}
|
|
55
|
-
|
|
56
|
-
catalog_diff_path_prefix = "catalog_diff"
|
|
57
|
-
catalog_diff = get_and_write_diff(
|
|
58
|
-
request,
|
|
59
|
-
_get_filtered_sorted_streams(control_streams, target_streams.keys(), True),
|
|
60
|
-
_get_filtered_sorted_streams(target_streams, control_streams.keys(), True),
|
|
61
|
-
catalog_diff_path_prefix,
|
|
62
|
-
True,
|
|
63
|
-
None,
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
control_streams_diff_path_prefix = "control_streams_diff"
|
|
67
|
-
control_streams_diff = get_and_write_diff(
|
|
68
|
-
request,
|
|
69
|
-
_get_filtered_sorted_streams(control_streams, target_streams.keys(), False),
|
|
70
|
-
[],
|
|
71
|
-
control_streams_diff_path_prefix,
|
|
72
|
-
True,
|
|
73
|
-
None,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
target_streams_diff_path_prefix = "target_streams_diff"
|
|
77
|
-
target_streams_diff = get_and_write_diff(
|
|
78
|
-
request,
|
|
79
|
-
[],
|
|
80
|
-
_get_filtered_sorted_streams(target_streams, control_streams.keys(), False),
|
|
81
|
-
target_streams_diff_path_prefix,
|
|
82
|
-
True,
|
|
83
|
-
None,
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
has_diff = catalog_diff or control_streams_diff or target_streams_diff
|
|
87
|
-
|
|
88
|
-
if has_diff:
|
|
89
|
-
record_property("Catalog diff", catalog_diff)
|
|
90
|
-
record_property("Control streams diff", control_streams_diff)
|
|
91
|
-
record_property("Target streams diff", target_streams_diff)
|
|
92
|
-
|
|
93
|
-
if control_streams.keys() != target_streams.keys():
|
|
94
|
-
pytest.fail(
|
|
95
|
-
f"The set of streams in the control and target catalogs do not match. control_streams={', '.join(control_streams.keys())} target_streams={', '.join(target_streams.keys())}. Detailed diff is stored in Diff is stored at {catalog_diff}, {control_streams_diff}, and {target_streams_diff}."
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
else:
|
|
99
|
-
pytest.fail(
|
|
100
|
-
f"The control and target output are not the same. Diff is stored at {catalog_diff}, {control_streams_diff}, and {target_streams_diff}."
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def _get_filtered_sorted_streams(
|
|
105
|
-
streams: dict[str, AirbyteStream], stream_set: Iterable[str], include_target: bool
|
|
106
|
-
) -> list[dict]:
|
|
107
|
-
return sorted(
|
|
108
|
-
filter(
|
|
109
|
-
lambda x: (
|
|
110
|
-
x["name"] in stream_set
|
|
111
|
-
if include_target
|
|
112
|
-
else x["name"] not in stream_set
|
|
113
|
-
),
|
|
114
|
-
[json.loads(s.json(sort_keys=True)) for s in streams.values()],
|
|
115
|
-
),
|
|
116
|
-
key=lambda x: x["name"],
|
|
117
|
-
)
|