Skip to content

🐛 Source Facebook Marketing: Fix since cannot be in the future in time_range error #14831

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

Conversation

lazebnyi
Copy link
Collaborator

What

https://github.com/airbytehq/oncall/issues/345 - Source Facebook Marketing: since cannot be in the future in time_range error

How

Added future date validation (if validation failed raised FutureDateException).

image (1)

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
  • 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

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Jul 19, 2022
@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 19, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2697697951
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2697697951
🐛 https://gradle.com/s/34ugxt6vyctla

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_ok
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_end_date_before_start_date
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_exception
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_streams
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_update_insights_streams
	 �[31m========================= �[31m�[1m5 failed�[0m, �[32m93 passed�[0m�[31m in 1.48s�[0m�[31m =========================�[0m

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2697697951
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2697697951
🐛 https://gradle.com/s/mdixj3ggvnyk4

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_ok
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_end_date_before_start_date
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_exception
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_streams
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_update_insights_streams
	 �[31m========================= �[31m�[1m5 failed�[0m, �[32m93 passed�[0m�[31m in 1.40s�[0m�[31m =========================�[0m

@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 19, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2699026262
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2699026262
🐛 https://gradle.com/s/wmpqbtoclve2i

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_ok
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_end_date_before_start_date
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_check_connection_exception
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_streams
	 FAILED unit_tests/test_source.py::TestSourceFacebookMarketing::test_update_insights_streams
	 �[31m========================= �[31m�[1m5 failed�[0m, �[32m93 passed�[0m�[31m in 1.33s�[0m�[31m =========================�[0m

@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 20, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2704592506
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2704592506
🐛 https://gradle.com/s/4s6jkhk5pplu4

Build Failed

Test summary info:

Could not find result summary

@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 20, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2704605884
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2704605884
🐛 https://gradle.com/s/emrtaboa6gvc4

Build Failed

Test summary info:

Could not find result summary

@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 20, 2022

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2706631995
✅ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/2706631995
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              298    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                                                  964    246    74%
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/spec.py                              50      2    96%
source_facebook_marketing/api.py                               96     12    88%
source_facebook_marketing/streams/base_streams.py             128     27    79%
source_facebook_marketing/streams/common.py                    40     13    68%
source_facebook_marketing/streams/streams.py                  113     44    61%
source_facebook_marketing/streams/base_insight_streams.py     132     54    59%
source_facebook_marketing/source.py                            39     16    59%
source_facebook_marketing/utils.py                             14      6    57%
source_facebook_marketing/streams/async_job.py                210    134    36%
source_facebook_marketing/streams/async_job_manager.py         78     60    23%
-------------------------------------------------------------------------------
TOTAL                                                         904    368    59%
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/streams/async_job.py                210      0   100%
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/__init__.py                           2      0   100%
source_facebook_marketing/streams/common.py                    40      1    98%
source_facebook_marketing/source.py                            39      1    97%
source_facebook_marketing/streams/async_job_manager.py         78      3    96%
source_facebook_marketing/spec.py                              50      2    96%
source_facebook_marketing/api.py                               96      9    91%
source_facebook_marketing/streams/base_insight_streams.py     132     13    90%
source_facebook_marketing/streams/streams.py                  113     26    77%
source_facebook_marketing/streams/base_streams.py             128     30    77%
source_facebook_marketing/utils.py                             14      6    57%
-------------------------------------------------------------------------------
TOTAL                                                         904     91    90%

Build Passed

Test summary info:

All Passed

@lazebnyi lazebnyi marked this pull request as ready for review July 22, 2022 11:20
@lazebnyi
Copy link
Collaborator Author

lazebnyi commented Jul 22, 2022

/publish connector=connectors/source-facebook-marketing

🕑 Publishing the following connectors:
connectors/source-facebook-marketing
https://github.com/airbytehq/airbyte/actions/runs/2718358740


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

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

@lazebnyi lazebnyi merged commit e8a7691 into master Jul 22, 2022
@lazebnyi lazebnyi deleted the lazebnyi/345-facebook-marketing-fix-since-cannot-be-in-the-future-in-time_range-error branch July 22, 2022 13:06
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/facebook-marketing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants