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

airbyte-ci: build manifest only with local CDK when flag is passed #48818

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Dec 5, 2024

Resolves https://github.com/airbytehq/airbyte-internal-issues/issues/10779
Resolves airbytehq/airbyte-python-cdk#64

Being tested here:

What

Closes airbytehq/airbyte-python-cdk#64

Our manifest only connectors were not built with the local CDK or CDK ref because their build step did not call the development override function.

Bonus: consider missing local cdk as a usage error, handle it in the build phase to have a clean report with a clear error message when the local cdk is not available in the path.

Copy link

vercel bot commented Dec 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Dec 6, 2024 1:07pm

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alafanechere alafanechere force-pushed the augustin/use-local-cdk-manifest-only branch from 74866b5 to f217461 Compare December 5, 2024 13:30
@alafanechere alafanechere changed the title build manifest only with local CDK when flag is passed airbyte-ci: build manifest only with local CDK when flag is passed Dec 5, 2024
@alafanechere alafanechere marked this pull request as ready for review December 5, 2024 13:31
@alafanechere alafanechere requested a review from a team as a code owner December 5, 2024 13:31
@@ -238,15 +239,16 @@ def with_python_connector_source(context: ConnectorContext) -> Container:
return with_python_package(context, testing_environment, connector_source_path)


async def apply_python_development_overrides(context: ConnectorContext, connector_container: Container) -> Container:
def apply_python_development_overrides(context: ConnectorContext, connector_container: Container) -> Container:
Copy link
Collaborator

@aaronsteers aaronsteers Dec 5, 2024

Choose a reason for hiding this comment

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

As discussed - this is no longer a coroutine but the return value (Container) is still awaitable. 👍

Comment on lines +248 to +251
raise UsageError(
f"Local CDK not found at '{path_to_cdk}'. Please clone the CDK repository in a sibling directory to the airbyte repository. Or use --use-cdk-ref to specify a CDK ref."
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -28,14 +28,6 @@ def connector_context(dagger_client):
return context


@pytest.mark.skip(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

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

I think this is ready to go once tests are passing! I tested successfully in the CDK repo - forcing manifest-only connector tests to fail by removing a key part of the initialization in the CDK. This is sufficient evidence to me that the --use-local-cdk option is working as expected for manifest-only connectors.

Example failure here: https://github.com/airbytehq/airbyte-python-cdk/actions/runs/12185161294/job/33990749733?pr=136

@alafanechere alafanechere force-pushed the augustin/use-local-cdk-manifest-only branch from 798af31 to 42ec312 Compare December 6, 2024 12:38
@alafanechere alafanechere force-pushed the augustin/use-local-cdk-manifest-only branch from 42ec312 to 786360c Compare December 6, 2024 13:07
@alafanechere alafanechere merged commit 9e52de6 into master Dec 6, 2024
32 checks passed
@alafanechere alafanechere deleted the augustin/use-local-cdk-manifest-only branch December 6, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to test manifest-only connectors directly from the CDK repo (via --use-local-cdk or similar)
2 participants