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 Microsoft Teams: migrate to the CDK #8469

Merged

Conversation

vitaliizazmic
Copy link
Contributor

What

Refactoring Source Microsoft Teams to use the CDK

Closes #8315

How

This task is part of issue #6164. The Source significantly relies on dead CDK code. So import BaseClient and BaseSource from base_python were replaced by import from deprecated package of the CDK. Gradle file, setup.py, Dockerfile, requirements.txt were updated. main_dev.py was renamed to main.py, updated, and added to .dockerignore. Also SAT was enabled to Source and schemas were changed.

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

@vitaliizazmic vitaliizazmic self-assigned this Dec 2, 2021
@github-actions github-actions bot added the area/connectors Connector related issues label Dec 2, 2021
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Dec 2, 2021

/test connector=source-microsoft-teams

🕑 source-microsoft-teams https://github.com/airbytehq/airbyte/actions/runs/1531824966
✅ source-microsoft-teams https://github.com/airbytehq/airbyte/actions/runs/1531824966
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                        75      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       38     27    29%
	 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                 62     25    60%
	 source_acceptance_test/utils/connector_runner.py        82     49    40%
	 source_acceptance_test/utils/json_schema_helper.py     115     14    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                  896    440    51%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                 Stmts   Miss  Cover
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------/actions-runner/_work/airbyte/airbyte/airbyte-integrations/connectors/source-microsoft-teams/.venv/lib/python3.8/site-packages/coverage/control.py:768: CoverageWarning: No data was collected. (no-data-collected)
	 --------------------------------------------------------
	 source_microsoft_teams/__init__.py       2      2     0%
	 source_microsoft_teams/client.py       166    166     0%
	 source_microsoft_teams/source.py        33     33     0%
	 --------------------------------------------------------
	 TOTAL                                  201    201     0%

@jrhizor jrhizor temporarily deployed to more-secrets December 2, 2021 17:54 Inactive

ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh"
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.2
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we bump the version?

@@ -0,0 +1,39 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this file?

@@ -0,0 +1,112 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

if all stream are here we don't this file, SAT will take discovery output as configured_catalog

Copy link
Contributor

@keu keu left a comment

Choose a reason for hiding this comment

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

small comments, shouldn't we update docs as well?

@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 15:48 Inactive
@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 15:55 Inactive
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Dec 6, 2021
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Dec 6, 2021

/publish connector=connectors/source-microsoft-teams

🕑 connectors/source-microsoft-teams https://github.com/airbytehq/airbyte/actions/runs/1545447815
✅ connectors/source-microsoft-teams https://github.com/airbytehq/airbyte/actions/runs/1545447815

@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 16:02 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 6, 2021 16:04 Inactive
@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 16:14 Inactive
@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 16:26 Inactive
@vitaliizazmic vitaliizazmic temporarily deployed to more-secrets December 6, 2021 16:36 Inactive
@vitaliizazmic vitaliizazmic merged commit bae5b02 into master Dec 6, 2021
@vitaliizazmic vitaliizazmic deleted the vitalii/8315_microsoft_teams_refactor_to_use_the_cdk branch December 6, 2021 17:04
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Microsoft Teams: refactor to use the CDK
3 participants