-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
🎉 Tiktok marketing - remove odd auth method #12545
🎉 Tiktok marketing - remove odd auth method #12545
Conversation
…tion' into midavadim/11029-fix-spec-description
/test connector=connectors/source-tiktok-marketing
|
…tok-remove-odd-auth-method # Conflicts: # airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
…d-auth-method' into midavadim/12499-tiktok-remove-odd-auth-method # Conflicts: # airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
/test connector=connectors/source-tiktok-marketing
|
@@ -5,43 +5,13 @@ | |||
"title": "TikTok Marketing Source Spec", | |||
"type": "object", | |||
"properties": { | |||
"credentials": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break existing configs, so we shouldn't rename it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OLD auth_types:
prod_access_token
sandbox_access_token
oauth2.0
1). If I just remove the odd auth method (oauth2.0) then old "OAuth2.0" related config fails validation.
So in order to support all possible old configs I renamed 'credentials' to 'credentials_all'.
It allows successful validation for all possible configs.
2). But if we know that all old "OAuth2.0" config can be updated to new format (and use prod_access_token instead) then 'credentials' can be left unchanged.
@sherifnada what do you think about 2) ? I don't know how we manage "OAuth2.0" in airbyte cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@midavadim my apologies I didn't see the application logic change below. I see now how this was maintaining backwards compatibility.
IMO the simpler thing to do here would be to remove the prod_access_token
-- my guess is most people are using oauth or sandbox. if it fails, they'll have to fix it, but renaming the whole object means that everyone using tiktok will have to re-set their configuration in the UI. I think until we have migrations that's a better outcome than having an old branch in the code that lives forever. So I would support removing prod_access_token
credentials: Union[OauthCredSpec, ProductionEnvSpec, SandboxEnvSpec] = Field( | ||
title="Authentication *", order=0, default={}, type="object" | ||
) | ||
credentials_all: Union[ProductionEnvSpec, SandboxEnvSpec] = Field(title="Authentication *", order=0, default={}, type="object") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename 'credentials' to 'credentials_all' is order to support new and old configs (with oauth2.0) otherwise old configs fails validation
@@ -5,43 +5,13 @@ | |||
"title": "TikTok Marketing Source Spec", | |||
"type": "object", | |||
"properties": { | |||
"credentials": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OLD auth_types:
prod_access_token
sandbox_access_token
oauth2.0
1). If I just remove the odd auth method (oauth2.0) then old "OAuth2.0" related config fails validation.
So in order to support all possible old configs I renamed 'credentials' to 'credentials_all'.
It allows successful validation for all possible configs.
2). But if we know that all old "OAuth2.0" config can be updated to new format (and use prod_access_token instead) then 'credentials' can be left unchanged.
@sherifnada what do you think about 2) ? I don't know how we manage "OAuth2.0" in airbyte cloud.
/test connector=connectors/source-tiktok-marketing
|
…tok-remove-odd-auth-method # Conflicts: # airbyte-integrations/connectors/source-tiktok-marketing/integration_tests/spec.json # airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
/publish connector=connectors/source-tiktok-marketing
|
…d-auth-method' into midavadim/12499-tiktok-remove-odd-auth-method
@midavadim shouldn't this be merged? :) |
@sherifnada it was merged 10 mins before your comment :) |
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com> Co-authored-by: ievgeniit <etsybaev@gmail.com>
What
Describe what the change is solving
It helps to add screenshots if it affects the frontend.
How
Describe the solution
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.