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.
Files changed (53) hide show
  1. {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/METADATA +1 -1
  2. {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/RECORD +13 -52
  3. airbyte_ops_mcp/cli/cloud.py +27 -0
  4. airbyte_ops_mcp/cloud_admin/api_client.py +473 -0
  5. airbyte_ops_mcp/cloud_admin/models.py +56 -0
  6. airbyte_ops_mcp/mcp/cloud_connector_versions.py +460 -0
  7. airbyte_ops_mcp/mcp/prerelease.py +5 -44
  8. airbyte_ops_mcp/regression_tests/ci_output.py +8 -4
  9. airbyte_ops_mcp/regression_tests/http_metrics.py +21 -2
  10. airbyte_ops_mcp/regression_tests/models.py +6 -0
  11. airbyte_ops_mcp/telemetry.py +162 -0
  12. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/.gitignore +0 -1
  13. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/README.md +0 -420
  14. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/__init__.py +0 -2
  15. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/__init__.py +0 -1
  16. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/__init__.py +0 -8
  17. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/base_backend.py +0 -16
  18. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/duckdb_backend.py +0 -87
  19. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/backends/file_backend.py +0 -165
  20. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/connection_objects_retrieval.py +0 -377
  21. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/connector_runner.py +0 -247
  22. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/errors.py +0 -7
  23. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/evaluation_modes.py +0 -25
  24. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/hacks.py +0 -23
  25. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/json_schema_helper.py +0 -384
  26. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/mitm_addons.py +0 -37
  27. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/models.py +0 -595
  28. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/proxy.py +0 -207
  29. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/secret_access.py +0 -47
  30. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/segment_tracking.py +0 -45
  31. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/commons/utils.py +0 -214
  32. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/conftest.py.disabled +0 -751
  33. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/consts.py +0 -4
  34. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/poetry.lock +0 -4480
  35. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/pytest.ini +0 -9
  36. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/__init__.py +0 -1
  37. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_check.py +0 -61
  38. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_discover.py +0 -117
  39. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_read.py +0 -627
  40. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/regression_tests/test_spec.py +0 -43
  41. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/report.py +0 -542
  42. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/stash_keys.py +0 -38
  43. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/__init__.py +0 -0
  44. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/private_details.html.j2 +0 -305
  45. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/templates/report.html.j2 +0 -515
  46. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/utils.py +0 -187
  47. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/__init__.py +0 -0
  48. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_check.py +0 -61
  49. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_discover.py +0 -217
  50. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_read.py +0 -177
  51. airbyte_ops_mcp/_legacy/airbyte_ci/connector_live_tests/validation_tests/test_spec.py +0 -631
  52. {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/WHEEL +0 -0
  53. {airbyte_internal_ops-0.4.2.dist-info → airbyte_internal_ops-0.5.0.dist-info}/entry_points.txt +0 -0
@@ -47,11 +47,21 @@ class HttpMetrics:
47
47
  flow_count: int
48
48
  duplicate_flow_count: int
49
49
  unique_urls: list[str]
50
+ cache_hits_count: int = 0
51
+
52
+ @property
53
+ def cache_hit_ratio(self) -> str:
54
+ """Calculate cache hit ratio as a percentage string."""
55
+ if self.flow_count == 0:
56
+ return "N/A"
57
+ return f"{(self.cache_hits_count / self.flow_count) * 100:.2f}%"
50
58
 
51
59
  @classmethod
52
60
  def empty(cls) -> HttpMetrics:
53
61
  """Create empty metrics when HTTP capture is unavailable."""
54
- return cls(flow_count=0, duplicate_flow_count=0, unique_urls=[])
62
+ return cls(
63
+ flow_count=0, duplicate_flow_count=0, unique_urls=[], cache_hits_count=0
64
+ )
55
65
 
56
66
 
57
67
  @dataclass
@@ -285,17 +295,22 @@ def parse_http_dump(dump_file_path: Path) -> HttpMetrics:
285
295
  unique_urls = list(set(all_urls))
286
296
  duplicate_count = len(all_urls) - len(unique_urls)
287
297
 
298
+ # Cache hits are interpreted as duplicate requests to the same URL
299
+ # (requests that could potentially be served from cache)
300
+ cache_hits = duplicate_count
301
+
288
302
  return HttpMetrics(
289
303
  flow_count=len(flows),
290
304
  duplicate_flow_count=duplicate_count,
291
305
  unique_urls=sorted(unique_urls),
306
+ cache_hits_count=cache_hits,
292
307
  )
293
308
 
294
309
 
295
310
  def compute_http_metrics_comparison(
296
311
  control_metrics: HttpMetrics,
297
312
  target_metrics: HttpMetrics,
298
- ) -> dict[str, dict[str, int | str] | int]:
313
+ ) -> dict[str, dict[str, int | str] | int | str]:
299
314
  """Compute HTTP metrics comparison between control and target.
300
315
 
301
316
  This produces output in the same format as the legacy
@@ -312,10 +327,14 @@ def compute_http_metrics_comparison(
312
327
  "control": {
313
328
  "flow_count": control_metrics.flow_count,
314
329
  "duplicate_flow_count": control_metrics.duplicate_flow_count,
330
+ "cache_hits_count": control_metrics.cache_hits_count,
331
+ "cache_hit_ratio": control_metrics.cache_hit_ratio,
315
332
  },
316
333
  "target": {
317
334
  "flow_count": target_metrics.flow_count,
318
335
  "duplicate_flow_count": target_metrics.duplicate_flow_count,
336
+ "cache_hits_count": target_metrics.cache_hits_count,
337
+ "cache_hit_ratio": target_metrics.cache_hit_ratio,
319
338
  },
320
339
  "difference": target_metrics.flow_count - control_metrics.flow_count,
321
340
  }
@@ -256,4 +256,10 @@ class ExecutionResult:
256
256
  file_path = airbyte_messages_dir / f"{type_name}.jsonl"
257
257
  file_path.write_text("\n".join(messages))
258
258
 
259
+ # Save configured catalog (input) if available
260
+ if self.configured_catalog is not None:
261
+ catalog_path = output_dir / "configured_catalog.json"
262
+ catalog_path.write_text(self.configured_catalog.json(indent=2))
263
+ self.logger.info(f"Saved configured catalog to {catalog_path}")
264
+
259
265
  self.logger.info(f"Artifacts saved to {output_dir}")
@@ -0,0 +1,162 @@
1
+ # Copyright (c) 2025 Airbyte, Inc., all rights reserved.
2
+ """Telemetry module for tracking usage analytics.
3
+
4
+ This module provides utilities for tracking usage of various Airbyte operations
5
+ using Segment analytics. The tracking is optional and can be disabled via
6
+ environment variables.
7
+
8
+ Based on the legacy connector_live_tests/commons/segment_tracking.py implementation.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import logging
14
+ import os
15
+ from typing import Any
16
+
17
+ try:
18
+ from segment import analytics # type: ignore[import-untyped]
19
+
20
+ SEGMENT_AVAILABLE = True
21
+ except ImportError:
22
+ analytics = None # type: ignore[assignment]
23
+ SEGMENT_AVAILABLE = False
24
+
25
+ logger = logging.getLogger(__name__)
26
+
27
+ # Environment variable to disable tracking
28
+ DISABLE_TRACKING_ENV_VAR = "AIRBYTE_DISABLE_TELEMETRY"
29
+ # Legacy env var for backward compatibility
30
+ LEGACY_DISABLE_TRACKING_ENV_VAR = "REGRESSION_TEST_DISABLE_TRACKING"
31
+ # Environment variable to enable debug mode
32
+ DEBUG_SEGMENT_ENV_VAR = "DEBUG_SEGMENT"
33
+
34
+ # Segment write key environment variable name
35
+ # The write key can be provided via environment variable or uses the default
36
+ # public key for the Airbyte analytics project. Segment write keys are designed
37
+ # to be embedded in client-side code for analytics tracking.
38
+ SEGMENT_WRITE_KEY_ENV_VAR = "SEGMENT_WRITE_KEY"
39
+ _DEFAULT_SEGMENT_WRITE_KEY = "hnWfMdEtXNKBjvmJ258F72wShsLmcsZ8"
40
+
41
+
42
+ def _is_tracking_enabled() -> bool:
43
+ """Check if tracking is enabled based on environment variables."""
44
+ if os.getenv(DISABLE_TRACKING_ENV_VAR) is not None:
45
+ return False
46
+ return os.getenv(LEGACY_DISABLE_TRACKING_ENV_VAR) is None
47
+
48
+
49
+ def _on_error(error: Exception, items: Any) -> None:
50
+ """Handle Segment tracking errors."""
51
+ logger.warning("An error occurred in Segment Tracking", exc_info=error)
52
+
53
+
54
+ def _initialize_analytics() -> bool:
55
+ """Initialize Segment analytics if available and enabled.
56
+
57
+ Returns:
58
+ True if analytics was initialized successfully, False otherwise.
59
+ """
60
+ if not SEGMENT_AVAILABLE:
61
+ logger.debug("Segment analytics not available (package not installed)")
62
+ return False
63
+
64
+ if not _is_tracking_enabled():
65
+ logger.debug("Telemetry tracking is disabled via environment variable")
66
+ return False
67
+
68
+ # Use environment variable if set, otherwise use default public key
69
+ write_key = os.getenv(SEGMENT_WRITE_KEY_ENV_VAR, _DEFAULT_SEGMENT_WRITE_KEY)
70
+ analytics.write_key = write_key
71
+ analytics.send = True
72
+ analytics.debug = os.getenv(DEBUG_SEGMENT_ENV_VAR) is not None
73
+ analytics.on_error = _on_error
74
+ return True
75
+
76
+
77
+ def track_regression_test(
78
+ user_id: str | None,
79
+ connector_image: str,
80
+ command: str,
81
+ target_version: str,
82
+ control_version: str | None = None,
83
+ additional_properties: dict[str, Any] | None = None,
84
+ ) -> None:
85
+ """Track a regression test execution.
86
+
87
+ Args:
88
+ user_id: The user ID to associate with the event. If None, uses "airbyte-ci".
89
+ connector_image: The connector image being tested.
90
+ command: The Airbyte command being run (spec, check, discover, read).
91
+ target_version: The target connector version being tested.
92
+ control_version: The control connector version (for comparison mode).
93
+ additional_properties: Additional properties to include in the event.
94
+ """
95
+ if not _initialize_analytics():
96
+ return
97
+
98
+ if not user_id:
99
+ user_id = "airbyte-ci"
100
+
101
+ analytics.identify(user_id)
102
+
103
+ properties: dict[str, Any] = {
104
+ "connector_image": connector_image,
105
+ "command": command,
106
+ "target_version": target_version,
107
+ }
108
+
109
+ if control_version:
110
+ properties["control_version"] = control_version
111
+ properties["test_mode"] = "comparison"
112
+ else:
113
+ properties["test_mode"] = "single_version"
114
+
115
+ if additional_properties:
116
+ properties.update(additional_properties)
117
+
118
+ try:
119
+ from importlib.metadata import version
120
+
121
+ properties["package_version"] = version("airbyte-ops-mcp")
122
+ except Exception:
123
+ properties["package_version"] = "unknown"
124
+
125
+ analytics.track(user_id, "regression_test_start", properties)
126
+ logger.debug(f"Tracked regression_test_start event for user {user_id}")
127
+
128
+
129
+ def track_event(
130
+ user_id: str | None,
131
+ event_name: str,
132
+ properties: dict[str, Any] | None = None,
133
+ ) -> None:
134
+ """Track a generic event.
135
+
136
+ This is a general-purpose tracking function for events that don't fit
137
+ into the more specific tracking functions.
138
+
139
+ Args:
140
+ user_id: The user ID to associate with the event. If None, uses "airbyte-ci".
141
+ event_name: The name of the event to track.
142
+ properties: Properties to include in the event.
143
+ """
144
+ if not _initialize_analytics():
145
+ return
146
+
147
+ if not user_id:
148
+ user_id = "airbyte-ci"
149
+
150
+ analytics.identify(user_id)
151
+
152
+ event_properties = properties or {}
153
+
154
+ try:
155
+ from importlib.metadata import version
156
+
157
+ event_properties["package_version"] = version("airbyte-ops-mcp")
158
+ except Exception:
159
+ event_properties["package_version"] = "unknown"
160
+
161
+ analytics.track(user_id, event_name, event_properties)
162
+ logger.debug(f"Tracked {event_name} event for user {user_id}")
@@ -1 +0,0 @@
1
- regression_tests_artifacts
@@ -1,420 +0,0 @@
1
- # Connector Live Testing
2
-
3
- This project contains utilities for running connector tests against live data.
4
-
5
- ## Requirements
6
-
7
- - `docker`
8
- - `Python ^3.11`
9
- - `pipx`
10
- - `poetry`
11
-
12
- ## Install
13
-
14
- ```bash
15
- # From airbyte-ci/connectors/live-tests
16
- poetry install
17
- ```
18
-
19
- Note that `poetry lock` + `poetry install` didn't seem to have impact on the version of connection_retriever. In order to update this dependency to the latest, I had to `poetry add git+https://github.com/airbytehq/airbyte-platform-internal.git@master#subdirectory=tools/connection-retriever`.
20
-
21
- ## Regression tests
22
-
23
- We created a regression test suite to run tests to compare the outputs of connector commands on different versions of the same connector.
24
-
25
- ## Validation tests
26
-
27
- The validation test suite makes assertions about the output of airbyte commands for the target version of the connector only.
28
-
29
- ## Tutorial(s)
30
-
31
- - [Loom Walkthrough (Airbyte Only)](https://www.loom.com/share/97c49d7818664b119cff6911a8a211a2?sid=4570a5b6-9c81-4db3-ba33-c74dc5845c3c)
32
- - [Internal Docs (Airbyte Only)](https://docs.google.com/document/d/1pzTxJTsooc9iQDlALjvOWtnq6yRTvzVtbkJxY4R36_I/edit)
33
-
34
- ### How to Use
35
-
36
- > ⚠️ **Note:** While you can use this tool without building a dev image, to achieve your goals you will likely need to have installed [airbyte-ci](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) and know how to build a dev image.
37
-
38
- You can run the existing test suites with the following command:
39
-
40
- #### With local connection objects (`config.json`, `catalog.json`, `state.json`)
41
-
42
- ```bash
43
- poetry run pytest src/live_tests \
44
- --connector-image=airbyte/source-faker \
45
- --config-path=<path-to-config-path> \
46
- --catalog-path=<path-to-catalog-path> \
47
- --target-version=dev \
48
- --pr-url=<PR-URL> # The URL of the PR you are testing
49
- ```
50
-
51
- #### Using a live connection
52
-
53
- The live connection objects will be fetched.
54
-
55
- ```bash
56
- poetry run pytest src/live_tests \
57
- --connector-image=airbyte/source-faker \
58
- --target-version=dev \
59
- --pr-url=<PR-URL> # The URL of the PR you are testing
60
- ```
61
-
62
- You can also pass local connection objects path to override the live connection objects with `--config-path`, `--state-path` or `--catalog-path`.
63
-
64
- #### Test artifacts
65
-
66
- The test suite run will produce test artifacts in the `/tmp/regression_tests_artifacts/` folder.
67
- **They will get cleared after each test run on prompt exit. Please do not copy them elsewhere in your filesystem as they contain sensitive data that are not meant to be stored outside of your debugging session!**
68
-
69
- ##### Artifacts types
70
-
71
- - `report.html`: A report of the test run.
72
- - `stdout.log`: The collected standard output following the command execution
73
- - `stderr.log`: The collected standard error following the command execution
74
- - `http_dump.mitm`: An `mitmproxy` http stream log. Can be consumed with `mitmweb` (version `>=10`) for debugging.
75
- - `http_dump.har`: An `mitmproxy` http stream log in HAR format (a JSON encoded version of the mitm dump).
76
- - `airbyte_messages`: A directory containing `.jsonl` files for each message type (logs, records, traces, controls, states etc.) produced by the connector.
77
- - `duck.db`: A DuckDB database containing the messages produced by the connector.
78
- - `dagger.log`: The log of the Dagger session, useful for debugging errors unrelated to the tests.
79
-
80
- **Tests can also write specific artifacts like diffs under a directory named after the test function.**
81
-
82
- ```
83
- /tmp/regression_tests_artifacts
84
- └── session_1710754231
85
- ├── duck.db
86
- |── report.html
87
- ├── command_execution_artifacts
88
- │   └── source-orb
89
- │   ├── check
90
- │   │   ├── dev
91
- │   │   │   ├── airbyte_messages
92
- │   │   │   │   ├── connection_status.jsonl
93
- │   │   │   │   └── logs.jsonl
94
- │   │   │   ├── http_dump.har
95
- │   │   │   ├── http_dump.mitm
96
- │   │   │   ├── stderr.log
97
- │   │   │   └── stdout.log
98
- │   │   └── latest
99
- │   │   ├── airbyte_messages
100
- │   │   │   ├── connection_status.jsonl
101
- │   │   │   └── logs.jsonl
102
- │   │   ├── http_dump.har
103
- │   │   ├── http_dump.mitm
104
- │   │   ├── stderr.log
105
- │   │   └── stdout.log
106
- │   ├── discover
107
- │   │   ├── dev
108
- │   │   │   ├── airbyte_messages
109
- │   │   │   │   └── catalog.jsonl
110
- │   │   │   ├── http_dump.har
111
- │   │   │   ├── http_dump.mitm
112
- │   │   │   ├── stderr.log
113
- │   │   │   └── stdout.log
114
- │   │   └── latest
115
- │   │   ├── airbyte_messages
116
- │   │   │   └── catalog.jsonl
117
- │   │   ├── http_dump.har
118
- │   │   ├── http_dump.mitm
119
- │   │   ├── stderr.log
120
- │   │   └── stdout.log
121
- │   ├── read-with-state
122
- │   │   ├── dev
123
- │   │   │   ├── airbyte_messages
124
- │   │   │   │   ├── logs.jsonl
125
- │   │   │   │   ├── records.jsonl
126
- │   │   │   │   ├── states.jsonl
127
- │   │   │   │   └── traces.jsonl
128
- │   │   │   ├── http_dump.har
129
- │   │   │   ├── http_dump.mitm
130
- │   │   │   ├── stderr.log
131
- │   │   │   └── stdout.log
132
- │   │   └── latest
133
- │   │   ├── airbyte_messages
134
- │   │   │   ├── logs.jsonl
135
- │   │   │   ├── records.jsonl
136
- │   │   │   ├── states.jsonl
137
- │   │   │   └── traces.jsonl
138
- │   │   ├── http_dump.har
139
- │   │   ├── http_dump.mitm
140
- │   │   ├── stderr.log
141
- │   │   └── stdout.log
142
- │   └── spec
143
- │   ├── dev
144
- │   │   ├── airbyte_messages
145
- │   │   │   └── spec.jsonl
146
- │   │   ├── stderr.log
147
- │   │   └── stdout.log
148
- │   └── latest
149
- │   ├── airbyte_messages
150
- │   │   └── spec.jsonl
151
- │   ├── stderr.log
152
- │   └── stdout.log
153
- └── dagger.log
154
- ```
155
-
156
- #### HTTP Proxy and caching
157
-
158
- We use a containerized `mitmproxy` to capture the HTTP traffic between the connector and the source. Connector command runs produce `http_dump.mitm` (can be consumed with `mitmproxy` (version `>=10`) for debugging) and `http_dump.har` (a JSON encoded version of the mitm dump) artifacts.
159
- The traffic recorded on the control connector is passed to the target connector proxy to cache the responses for requests with the same URL. This is useful to avoid hitting the source API multiple times when running the same command on different versions of the connector.
160
-
161
- ### Custom CLI Arguments
162
-
163
- | Argument | Description | Required/Optional |
164
- |----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| ----------------- |
165
- | `--connector-image` | Docker image name of the connector to debug (e.g., `airbyte/source-faker`, `airbyte/source-faker`). | Required |
166
- | `--control-version` | Version of the control connector for regression testing. Must be an unambiguous connector version (e.g. 1.2.3 rather than `latest`) | Required |
167
- | `--target-version` | Version of the connector being tested. (Defaults to dev) | Optional |
168
- | `--pr-url` | URL of the pull request being tested. | Required |
169
- | `--connection-id` | ID of the connection for live testing. If not provided, a prompt will appear to choose. | Optional |
170
- | `--config-path` | Path to the custom source configuration file. | Optional |
171
- | `--catalog-path` | Path to the custom configured catalog file. | Optional |
172
- | `--state-path` | Path to the custom state file. | Optional |
173
- | `--http-cache` | Use the HTTP cache for the connector. | Optional |
174
- | `--run-id` | Unique identifier for the test run. If not provided, a timestamp will be used. | Optional |
175
- | `--auto-select-connection` | Automatically select a connection for testing. | Optional |
176
- | `--stream` | Name of the stream to test. Can be specified multiple times to test multiple streams. | Optional |
177
- | `--should-read-with-state` | Specify whether to read with state. If not provided, a prompt will appear to choose. | Optional |
178
- | `--disable-proxy` | Specify whether to disable proxy. If not provided, a proxy will be enabled. | Optional |
179
- | `--test-evaluation-mode` | Whether to run tests in "diagnostic" mode or "strict" mode. In diagnostic mode, eligible tests will always pass unless there's an exception. | Optional |
180
- | `--connection-subset` | The subset of connections to select from. Possible values are "sandboxes" or "all" (defaults to sandboxes). | Optional |
181
-
182
- ## Changelog
183
-
184
-
185
- ### 0.21.4
186
- Update connection id to use first 8 chars in the report
187
-
188
- ### 0.21.3
189
- Update dependencies to avoid genson issue
190
-
191
- ### 0.21.2
192
- Fix selected streams filter in regression tests
193
-
194
- ### 0.21.1
195
- Update Python version requirement from 3.10 to 3.11.
196
-
197
- ### 0.21.0
198
- Add `disable_proxy` flag
199
-
200
-
201
- ### 0.20.0
202
- Support multiple connection objects in the regression tests suite.
203
-
204
-
205
- ### 0.19.10
206
- Pin the connection retriever until we make required changes to support the new version.
207
-
208
-
209
- ### 0.19.8
210
-
211
- Give ownership of copied connection object files to the image user to make sure it has permission to write them (config migration).
212
-
213
- ### 0.19.7
214
-
215
- Mount connection objects to readable paths in the container for rootless images.
216
-
217
- ### 0.19.6
218
-
219
- Write connector output to a different in container path to avoid permission issues now that connector images are rootless.
220
-
221
- ### 0.19.5
222
-
223
- Fix `ZeroDivisionError` in Regression test tool
224
-
225
- ### 0.19.4
226
-
227
- Update `connection_retriever` to 0.7.4
228
-
229
- ### 0.19.3
230
-
231
- Update `get_container_from_id` with the correct new Dagger API.
232
-
233
- ### 0.19.2
234
-
235
- Update Dagger to 0.13.3
236
-
237
- ### 0.19.1
238
-
239
- Fixed the `UserDict` type annotation not found bug.
240
-
241
- ### 0.19.0
242
-
243
- Delete the `debug`command.
244
-
245
- ### 0.18.8
246
-
247
- Improve error message when failing to retrieve connection.
248
- Ask to double-check that a sync ran with the control version on the selected connection.
249
-
250
- ### 0.18.7
251
-
252
- Improve error message when failing to retrieve connection.
253
-
254
- ### 0.18.6
255
-
256
- Disable the `SortQueryParams` MITM proxy addon to avoid double URL encoding.
257
-
258
- ### 0.18.5
259
-
260
- Relax test_oneof_usage criteria for constant value definitions in connector SPEC output.
261
-
262
- ### 0.18.4
263
-
264
- Bugfix: Use connection-retriever 0.7.2
265
-
266
- ### 0.18.3
267
-
268
- Updated dependencies.
269
-
270
- ### 0.18.2
271
-
272
- Allow live tests with or without state in CI.
273
-
274
- ### 0.18.1
275
-
276
- Fix extra argument.
277
-
278
- ### 0.18.0
279
-
280
- Add support for selecting from a subset of connections.
281
-
282
- ### 0.17.8
283
-
284
- Fix the self-signed certificate path we bind to Python connectors.
285
-
286
- ### 0.17.7
287
-
288
- Explicitly pass the control version to the connection retriever. Defaults to the latest released version of the connector under test.
289
-
290
- ### 0.17.6
291
-
292
- Display diagnostic test with warning.
293
-
294
- ### 0.17.5
295
-
296
- Performance improvements using caching.
297
-
298
- ### 0.17.4
299
-
300
- Fix control image when running tests in CI.
301
-
302
- ### 0.17.3
303
-
304
- Pin requests dependency.
305
-
306
- ### 0.17.2
307
-
308
- Fix duckdb dependency.
309
-
310
- ### 0.17.1
311
-
312
- Bump the connection-retriever version to fix deprecated query.
313
-
314
- ### 0.17.0
315
-
316
- Enable running in GitHub actions.
317
-
318
- ### 0.16.0
319
-
320
- Enable running with airbyte-ci.
321
-
322
- ### 0.15.0
323
-
324
- Automatic retrieval of connection objects for regression tests. The connection id is not required anymore.
325
-
326
- ### 0.14.2
327
-
328
- Fix KeyError when target & control streams differ.
329
-
330
- ### 0.14.1
331
-
332
- Improve performance when reading records per stream.
333
-
334
- ### 0.14.0
335
-
336
- Track usage via Segment.
337
-
338
- ### 0.13.0
339
-
340
- Show test docstring in the test report.
341
-
342
- ### 0.12.0
343
-
344
- Implement a test to compare schema inferred on both control and target version.
345
-
346
- ### 0.11.0
347
-
348
- Create a global duckdb instance to store messages produced by the connector in target and control version.
349
-
350
- ### 0.10.0
351
-
352
- Show record count per stream in report and list untested streams.
353
-
354
- ### 0.9.0
355
-
356
- Make the regressions tests suite better at handling large connector outputs.
357
-
358
- ### 0.8.1
359
-
360
- Improve diff output.
361
-
362
- ### 0.8.0
363
-
364
- Regression tests: add an HTML report.
365
-
366
- ### 0.7.0
367
-
368
- Improve the proxy workflow and caching logic + generate HAR files.
369
-
370
- ### 0.6.6
371
-
372
- Exit pytest if connection can't be retrieved.
373
-
374
- ### 0.6.6
375
-
376
- Cleanup debug files when prompt is closed.
377
-
378
- ### 0.6.5
379
-
380
- Improve ConnectorRunner logging.
381
-
382
- ### 0.6.4
383
-
384
- Add more data integrity checks to the regression tests suite.
385
-
386
- ### 0.6.3
387
-
388
- Make catalog diffs more readable.
389
-
390
- ### 0.6.2
391
-
392
- Clean up regression test artifacts on any exception.
393
-
394
- ### 0.6.1
395
-
396
- Modify diff output for `discover` and `read` tests.
397
-
398
- ### 0.5.1
399
-
400
- Handle connector command execution errors.
401
-
402
- ### 0.5.0
403
-
404
- Add new tests and confirmation prompts.
405
-
406
- ### 0.4.0
407
-
408
- Introduce DuckDB to store the messages produced by the connector.
409
-
410
- ### 0.3.0
411
-
412
- Pass connection id to the regression tests suite.
413
-
414
- ### 0.2.0
415
-
416
- Declare the regression tests suite.
417
-
418
- ### 0.1.0
419
-
420
- Implement initial primitives and a `debug` command to run connector commands and persist the outputs to local storage.
@@ -1,2 +0,0 @@
1
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2
-
@@ -1 +0,0 @@
1
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
@@ -1,8 +0,0 @@
1
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2
- from __future__ import annotations
3
-
4
- from .base_backend import BaseBackend
5
- from .duckdb_backend import DuckDbBackend
6
- from .file_backend import FileBackend
7
-
8
- __all__ = ["BaseBackend", "DuckDbBackend", "FileBackend"]
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
2
- from __future__ import annotations
3
-
4
- from abc import ABC, abstractmethod
5
- from collections.abc import Iterable
6
-
7
- from airbyte_protocol.models import AirbyteMessage # type: ignore
8
-
9
-
10
- class BaseBackend(ABC):
11
- """
12
- Interface to be shared between the file backend and the database backend(s)
13
- """
14
-
15
- @abstractmethod
16
- def write(self, airbyte_messages: Iterable[AirbyteMessage]) -> None: ...