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

🎉 Source Notion: add OAuth authorization for source-notion connector #14706

Merged

Conversation

drrest
Copy link
Contributor

@drrest drrest commented Jul 14, 2022

What

add OAuth authorization method

#1

#2

#3

#4

Recommended reading order

  1. spec.json
  2. python.py

🚨 User Impact 🚨

depending on PR: #14461
spec.json -> OAuth field_name ->access_token
Token field_name -> access_token_

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

Important: In the case of PR: <>
           the field_name for access_token in stage of using Token authentication will have different name: 'access_token_'.

added: OAuth method of authorization

changed: config.json different structure:
      new format:
            {
              "start_date": "2021-01-01T00:00:00.000Z",
              "credentials": {
                "auth_type": "Token",
                "access_token_": "<access_token>"
              }
            }
       old format:
            {
              "start_date": "2021-01-01T00:00:00.000Z",
              "access_token": "<access_token>"
            }
@CLAassistant
Copy link

CLAassistant commented Jul 14, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the area/connectors Connector related issues label Jul 14, 2022
@drrest drrest requested a review from bazarnov July 14, 2022 08:48
@drrest drrest linked an issue Jul 14, 2022 that may be closed by this pull request
@bazarnov
Copy link
Collaborator

bazarnov commented Jul 14, 2022

/test connector=connectors/source-notion

🕑 connectors/source-notion https://github.com/airbytehq/airbyte/actions/runs/2670266495
✅ connectors/source-notion https://github.com/airbytehq/airbyte/actions/runs/2670266495
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        77      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/tests/test_incremental.py       121     25    79%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/tests/test_core.py              294    106    64%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
------------------------------------------------------------------------
TOTAL                                                  960    246    74%
Name                        Stmts   Miss  Cover
-----------------------------------------------
source_notion/__init__.py       2      0   100%
source_notion/streams.py      121      5    96%
source_notion/source.py        34      3    91%
source_notion/utils.py          9      4    56%
-----------------------------------------------
TOTAL                         166     12    93%

Build Passed

Test summary info:

All Passed

@bazarnov bazarnov temporarily deployed to more-secrets July 14, 2022 12:22 Inactive
@bazarnov bazarnov temporarily deployed to more-secrets July 14, 2022 12:34 Inactive
@bazarnov bazarnov requested a review from lazebnyi July 14, 2022 12:36
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jul 14, 2022
@drrest drrest temporarily deployed to more-secrets July 14, 2022 13:02 Inactive
@bazarnov bazarnov temporarily deployed to more-secrets July 14, 2022 13:47 Inactive
@drrest drrest temporarily deployed to more-secrets July 14, 2022 15:00 Inactive
@drrest drrest temporarily deployed to more-secrets July 14, 2022 15:09 Inactive
@bazarnov bazarnov temporarily deployed to more-secrets July 14, 2022 18:08 Inactive
@bazarnov bazarnov temporarily deployed to more-secrets July 14, 2022 18:24 Inactive
@drrest
Copy link
Contributor Author

drrest commented Jul 14, 2022

/publish connector=connectors/source-notion

🕑 Publishing the following connectors:
connectors/source-notion
https://github.com/airbytehq/airbyte/actions/runs/2672484889


Connector Did it publish? Were definitions generated?
connectors/source-notion

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets July 14, 2022 19:14 Inactive
@bazarnov bazarnov merged commit e9495ba into master Jul 14, 2022
@bazarnov bazarnov deleted the drrest/8223-oauth_authorization_for_source_notion_connector branch July 14, 2022 21:54
jsrcodes added a commit to jsrcodes/airbyte that referenced this pull request Jul 15, 2022
…rbytehq-master

* 'master' of https://github.com/airbytehq/airbyte: (1141 commits)
  pass USE_STREAM_CAPABLE_STATE env var to containers/deployments (airbytehq#14737)
  Bump mqtt connector (airbytehq#14648)
  Add error code to ManualOperationResult (airbytehq#14657)
  Bump elasticsearch version (airbytehq#14640)
  Ryan/sync oracle version number (airbytehq#14736)
  Fixed linter issue with add_fields.py comments (airbytehq#14742)
  🎉Redshift, Databricks, Snowflake, S3 Destinations: Make S3 output filename configurable (airbytehq#14494)
  🐛Source-mssql: aligned regular and cdc syncs and its datatype tests (airbytehq#14379)
  🎉 Source Amazon Seller Partner: Add new streams (airbytehq#13604)
  bump source-file-secure (airbytehq#14704)
  🎉 New source: Timely airbytehq#13292 (airbytehq#14335)
  🪟🔧 Refactor feature service (airbytehq#14559)
  [low code cdk] add a transformation for adding fields into an outgoing record (airbytehq#14638)
  Bump destination-postgres to 0.3.21 (airbytehq#14479)
  Remove `additionalProperties: false` from JDBC destination connectors (airbytehq#14618)
  🎉 Source Notion: add OAuth authorization for source-notion connector (airbytehq#14706)
  Use the configuration diff calculation in the update endpoint (airbytehq#14626)
  🪟 🐛 Fix input validation on blur and cleanup signup error handling (airbytehq#14724)
  lower sleep after wait for successful job (airbytehq#14725)
  Add configuration diff (airbytehq#14603)
  ...
@lazebnyi lazebnyi removed their request for review July 18, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/notion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Notion: support oauth
4 participants