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-template] macro to use current year for new connectors #37397

Merged

Conversation

szemek
Copy link
Contributor

@szemek szemek commented Apr 18, 2024

What

Improvements for connector-templates introduce 2 changes:

  1. added currentYear helper. Instead of fixed Copyright (c) 2023 Airbyte, Inc., all rights reserved., currentYear will be used in template Copyright (c) {{currentYear}} Airbyte, Inc., all rights reserved.
  2. replaced deprecated TokenAuthenticator with newer version
-from airbyte_cdk.sources.streams.http.auth import TokenAuthenticator
+from airbyte_cdk.sources.streams.http.requests_native_auth import TokenAuthenticator

How

Review guide

  1. airbyte-integrations/connector-templates/generator/plopfile.js
  2. airbyte-integrations/connector-templates/source-python/source_{{snakeCase name}}/source.py.hbs

User Impact

Templates are used by developers creating their own connectors

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@szemek szemek requested a review from a team April 18, 2024 07:32
Copy link

ellipsis-dev bot commented Apr 18, 2024

Your free trial has expired. To continue using Ellipsis, sign up at https://app.ellipsis.dev for $20/developer/month. If you have any questions, reach us at [email protected]

Copy link

vercel bot commented Apr 18, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 7:32am

@marcosmarxm marcosmarxm changed the title Use current year and new TokenAuthenticator in connector-templates [connector-template] Use current year and new TokenAuthenticator Apr 18, 2024
@marcosmarxm marcosmarxm changed the title [connector-template] Use current year and new TokenAuthenticator [connector-template] macro to use current year for new connectors Apr 18, 2024
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Thank you, this is good work!

Do you want to go ahead and also remove the deprecated TokenAuthenticator from the CDK itself? This will be a bit more involved, you'd have to check that none of the remaining python connectors are using it.

@natikgadzhi
Copy link
Contributor

I'll try a generator out just to make sure and merge this tonight.

@natikgadzhi natikgadzhi self-assigned this Apr 18, 2024
@natikgadzhi
Copy link
Contributor

@szemek another idea if you felt like contributing more: python-destination template needs to switch from setup.py + requirements.txt to pyproject.toml and Poetry.

@natikgadzhi
Copy link
Contributor

#37420

@natikgadzhi natikgadzhi merged commit 66394a8 into airbytehq:master Apr 19, 2024
9 checks passed
@szemek szemek deleted the connector-templates-improvements branch April 19, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants