Skip to content

Conversation

@avida
Copy link
Contributor

@avida avida commented Oct 5, 2021

What

Resolves #6263

How

Describe the solution

Recommended reading order

  1. x.java
  2. y.python

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? 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
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

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
  • Connector version bumped like described here

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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Oct 5, 2021
@avida avida temporarily deployed to more-secrets October 5, 2021 09:24 Inactive
@avida avida force-pushed the drezchykov/github-oauth branch from e48ba0c to e687cc2 Compare October 5, 2021 09:24
@avida avida temporarily deployed to more-secrets October 5, 2021 09:26 Inactive
@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1307379327
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1307379327
🐛 https://gradle.com/s/abdixb2nrejlm

@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 10:18 Inactive
Copy link
Contributor

@htrueman htrueman left a comment

Choose a reason for hiding this comment

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

Please change the PR title.
Also I think the SAT update should be placed in separate PR.

:returns list of object property keys paths
"""
paths = []
if "$ref" in schema:
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, I'm not sure we should update SAT in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

otherwise it wouldnt work with github schemas

@avida avida changed the title Source github: add oauth spec file 🎉 Source github: add oauth spec file Oct 5, 2021
@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1307412962
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1307412962
🐛 https://gradle.com/s/3i66xieazjiww

@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 10:28 Inactive
@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/publish connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1307455658
✅ bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1307455658

@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 10:41 Inactive
@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/test connector=connectors/source-github

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

 ---------- coverage: platform linux, python 3.8.10-final-0 ----------- Name Stmts Miss Cover ------------------------------------------------------------------------ source_acceptance_test/__init__.py 2 0 100% source_acceptance_test/base.py 10 4 60% source_acceptance_test/config.py 74 8 89% source_acceptance_test/conftest.py 108 108 0% source_acceptance_test/plugin.py 47 47 0% source_acceptance_test/tests/__init__.py 4 0 100% source_acceptance_test/tests/test_core.py 200 94 53% source_acceptance_test/tests/test_full_refresh.py 18 11 39% source_acceptance_test/tests/test_incremental.py 69 38 45% source_acceptance_test/utils/__init__.py 6 0 100% source_acceptance_test/utils/asserts.py 37 2 95% source_acceptance_test/utils/common.py 41 24 41% source_acceptance_test/utils/compare.py 47 20 57% source_acceptance_test/utils/connector_runner.py 82 49 40% source_acceptance_test/utils/json_schema_helper.py 115 14 88% ------------------------------------------------------------------------ TOTAL 860 419 51% ---------- coverage: platform linux, python 3.8.10-final-0 ----------- Name Stmts Miss Cover ----------------------------------------------- source_github/__init__.py 2 0 100% source_github/source.py 72 48 33% source_github/streams.py 367 210 43% ----------------------------------------------- TOTAL 441 258 41% 
@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 10:48 Inactive
@avida avida requested a review from sherifnada October 5, 2021 10:52
@staticmethod
def _get_authenticator(token: str):
def _get_authenticator(config: Dict[str, Any]):
token = config.get("access_token")
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a comment mentioning this is for backwards compatibility?

Suggested change
token = config.get("access_token")
# Before we supported oauth, personal_access_token was called `access_token` and it lived at the
# config root. So we first check to make sure any backwards compatbility is handled.
token = config.get("access_token")
"airbyte_secret": true
"credentials": {
"title": "Authentication mechanism",
"description": "Choose either to provide the API key or the OAuth2.0 credentials",
Copy link
Contributor

Choose a reason for hiding this comment

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

not having a specific reference makes it less likely to go out of date ;)

Suggested change
"description": "Choose either to provide the API key or the OAuth2.0 credentials",
"description": "Choose how to authenticate to Github",
},
"access_token": {
"type": "string",
"title": "Access Tokens",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"title": "Access Tokens",
"title": "Access Token",
},
"branch": {
"type": "string",
"title": "Branch",
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for adding titles for other options as well! Users will be very thankful ;)

@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/publish connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1308924372
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1308924372

@avida avida temporarily deployed to more-secrets October 5, 2021 18:51 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 18:53 Inactive
@avida
Copy link
Contributor Author

avida commented Oct 5, 2021

/publish connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1309029525
✅ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/1309029525

@jrhizor jrhizor temporarily deployed to more-secrets October 5, 2021 19:23 Inactive
@avida avida merged commit 78fd9d3 into master Oct 5, 2021
@avida avida deleted the drezchykov/github-oauth branch October 5, 2021 19:28
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/github connectors/sources-api

6 participants