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 TikTok Marketing: fix incremental bug + new reports' streams #8292

Merged
merged 29 commits into from
Dec 9, 2021

Conversation

antixar
Copy link
Contributor

@antixar antixar commented Nov 29, 2021

What

correction for #8196

Pre-merge Checklist

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
  • 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
  • After the new connector version is published, connector version bumped in the seed directory as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here

@github-actions github-actions bot added the area/connectors Connector related issues label Nov 29, 2021
@antixar antixar temporarily deployed to more-secrets November 29, 2021 09:48 Inactive
@antixar antixar linked an issue Nov 29, 2021 that may be closed by this pull request
@t0hai t0hai mentioned this pull request Dec 2, 2021
16 tasks
@antixar antixar temporarily deployed to more-secrets December 2, 2021 14:40 Inactive
@antixar antixar self-assigned this Dec 2, 2021
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Dec 2, 2021
@antixar antixar temporarily deployed to more-secrets December 2, 2021 15:00 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 2, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1531158406
✅ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1531158406
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                        76      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              235     95    60%
	 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                  54     24    56%
	 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                                                  945    441    53%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                  Stmts   Miss  Cover
	 ---------------------------------------------------------
	 source_tiktok_marketing/__init__.py       2      0   100%
	 source_tiktok_marketing/source.py        33     10    70%
	 source_tiktok_marketing/spec.py          46     15    67%
	 source_tiktok_marketing/streams.py      279     76    73%
	 ---------------------------------------------------------
	 TOTAL                                   360    101    72%

@antixar antixar linked an issue Dec 2, 2021 that may be closed by this pull request
@jrhizor jrhizor temporarily deployed to more-secrets December 2, 2021 15:06 Inactive
@antixar antixar changed the title Antixar/8196 tiktok reporting 🐛 Source TikTok Marketing: fix incremental bug + new reports' streams Dec 2, 2021
@antixar antixar marked this pull request as ready for review December 2, 2021 15:09
@antixar antixar temporarily deployed to more-secrets December 3, 2021 11:53 Inactive
@antixar antixar temporarily deployed to more-secrets December 3, 2021 12:04 Inactive
@antixar antixar temporarily deployed to more-secrets December 3, 2021 12:30 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 9, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1558791889
❌ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1558791889
🐛 https://gradle.com/s/dlera4e5au3i6

@antixar antixar temporarily deployed to more-secrets December 9, 2021 12:54 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 12:54 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 9, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1558903495
❌ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1558903495
🐛 https://gradle.com/s/h4zjqjmmqysew

@antixar antixar temporarily deployed to more-secrets December 9, 2021 13:23 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 13:24 Inactive
@grubberr
Copy link
Contributor

grubberr commented Dec 9, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559057081
❌ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559057081
🐛 https://gradle.com/s/hhqi5ya5n2l7m

@grubberr grubberr temporarily deployed to more-secrets December 9, 2021 14:03 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 14:05 Inactive
@antixar antixar force-pushed the antixar/8196-tiktok-reporting branch from 995f46f to 9057a90 Compare December 9, 2021 14:46
@antixar antixar temporarily deployed to more-secrets December 9, 2021 14:48 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 9, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559251218
❌ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559251218
🐛 https://gradle.com/s/yuzubrtarohqg

@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 14:50 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 9, 2021

/test connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559593318
✅ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559593318
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                        76      8    89%
	 source_acceptance_test/conftest.py                     109    109     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              235     95    60%
	 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                  54     24    56%
	 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                                                  946    442    53%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                  Stmts   Miss  Cover
	 ---------------------------------------------------------
	 source_tiktok_marketing/__init__.py       2      0   100%
	 source_tiktok_marketing/source.py        35     12    66%
	 source_tiktok_marketing/spec.py          45     15    67%
	 source_tiktok_marketing/streams.py      294     88    70%
	 ---------------------------------------------------------
	 TOTAL                                   376    115    69%

@antixar antixar temporarily deployed to more-secrets December 9, 2021 16:10 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 16:11 Inactive
@antixar
Copy link
Contributor Author

antixar commented Dec 9, 2021

/publish connector=connectors/source-tiktok-marketing

🕑 connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559665837
✅ connectors/source-tiktok-marketing https://github.com/airbytehq/airbyte/actions/runs/1559665837

@jrhizor jrhizor temporarily deployed to more-secrets December 9, 2021 16:29 Inactive
@antixar antixar merged commit e95718b into master Dec 9, 2021
@antixar antixar deleted the antixar/8196-tiktok-reporting branch December 9, 2021 16:44
@antixar antixar temporarily deployed to more-secrets December 9, 2021 16:44 Inactive
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…airbytehq#8292)

* Add BasicReport stream to Tiktok source

* Rename config parameter to `start_date` to match specs

* Fix TypeError on state comparison with last record's cursor field

* Fix date chunks for all granularities

* also use enums for reporting level and granularity

* Adapt requested metrics based on report level and granularity

* also add report level and granularity selector to spec.py

* Add schema file for BasicReport stream

* update spec file

* format

* bump version

* round reports states

* round reports states

* fix selection of JsonUpdatedState object

* save updated value

* fix reports schema

* fix data field

* test JSON error

* update report schema

* update report schema

* fix tests

* update test config

* remove test file

* test ci failures

* debug tests

* update test config

* update CDK version

* fix flake8 comments

* update spec file

Co-authored-by: n0rritt <dev.n0rritt@gmail.com>
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 Tiktok: fails to compare stream state Source Tiktok: Add Basic Report Stream
5 participants