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

feat(CDK): enable shortened class_names in custom components #44881

Closed

Conversation

ChristoGrab
Copy link
Contributor

@ChristoGrab ChristoGrab commented Aug 29, 2024

WIP

What

Updates the resolving of fully_qualified_class_names in the manifest, allowing for simpler custom component class_names. Currently, a developer adding a custom component to the manifest must list its class_name as:

source_pokeapi.components.CustomPokeRetriever

With this update, it can be simplified to

components.CustomPokeRetriever

Resolves #9534

How

  • Add a helper method _get_connector_module to parse the name of the connector's module by scanning the directory of the main execution script for the relevant directory name.
  • Before loading the class, prepend the connector module's name if it exists and is not already listed in the fully qualified class_name. Otherwise, return the module as before. This allows the CDK to handle both the existing and new format, as well as the integration_tests environment (where the helper method will return None).

Review guide

Loom will be linked here shortly

User Impact

No impact on users. Developer-oriented update

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Aug 29, 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 Aug 29, 2024 6:07pm

@ChristoGrab ChristoGrab changed the title feat: allow for shorter fully_qualified_classnames feat(CDK): enable shortened class_names in custom components Aug 29, 2024
@ChristoGrab ChristoGrab changed the base branch from christo/manifest-only-build-with-components to master August 29, 2024 19:39
@ChristoGrab ChristoGrab deleted the christo/low-code-cdk-update-components-module-path branch August 29, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants