Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connector acceptance tests: bug fixes #44529

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.9.1

Bug fixes for dagger execution caching and for failure trace message test case.

## 3.9.0

Add support for using `manifest.yaml` as a spec input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
ConfiguredAirbyteCatalog,
ConfiguredAirbyteStream,
ConnectorSpecification,
DestinationSyncMode,
Status,
SyncMode,
TraceType,
Expand Down Expand Up @@ -1151,11 +1152,21 @@ async def test_airbyte_trace_message_on_failure(self, connector_config, inputs:
ConfiguredAirbyteStream.construct(
stream=AirbyteStream(
name="__AIRBYTE__stream_that_does_not_exist",
namespace="__AIRBYTE__namespace_that_does_not_exist",
json_schema={"type": "object", "properties": {"f1": {"type": "string"}}},
supported_sync_modes=[SyncMode.full_refresh],
source_defined_primary_key=[],
source_defined_cursor=False,
default_cursor_field=[],
is_resumable=False,
),
sync_mode="INVALID",
destination_sync_mode="INVALID",
sync_mode=SyncMode.full_refresh,
destination_sync_mode=DestinationSyncMode.append,
primary_key=[],
cursor_field=[],
minimum_generation_id=1,
generation_id=1,
sync_id=1,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this fix, source connectors built with the bulk CDK will fail unexpectedly. The Bulk CDK performs schema validation on the connector CLI inputs, so if these fields are missing, its execution fails very early.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a comment with a link to the bulk CDK validation?

)
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import json
import os
import uuid
from glob import glob
from pathlib import Path
from typing import List
Expand Down Expand Up @@ -54,7 +55,7 @@ async def _run_with_config(container: dagger.Container, command: List[str], conf


async def _run(container: dagger.Container, command: List[str]) -> dagger.Container:
return await container.with_exec(command, skip_entrypoint=True)
return await (container.with_env_variable("CACHEBUSTER", str(uuid.uuid4())).with_exec(command, skip_entrypoint=True))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't add this cache-busting layer, the with_exec layer itself can be cached. This became apparent when the container setup auto-fixture didn't actually run like I thought it would (because the run was identical to another, earlier test case)



async def get_client_container(dagger_client: dagger.Client, connector_path: Path, dockerfile_path: Path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "connector-acceptance-test"
version = "3.9.0"
version = "3.9.1"
description = "Contains acceptance tests for connectors."
authors = ["Airbyte <contact@airbyte.io>"]
license = "MIT"
Expand Down
Loading