Skip to content

Source Facebook Marketing: Fix number and integer fields in schemas - #7605

Merged
Vadym Hevlich (htrueman) merged 4 commits into
masterfrom
htrueman/fix-source-facebook-marketing-job-fail
Nov 5, 2021
Merged

Vadym Hevlich (htrueman) merged 4 commits into
masterfrom
htrueman/fix-source-facebook-marketing-job-fail

Conversation

@htrueman

Copy link
Copy Markdown
Contributor

What

Closes #7533

How

Update number and integer fields type.

Recommended reading order

  1. schemas files

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.

@CLAassistant

CLAassistant commented Nov 3, 2021 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the area/connectors Connector related issues label Nov 3, 2021
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 3, 2021 18:19 Inactive
@sherifnada

Copy link
Copy Markdown
Contributor

Vadym Hevlich (@htrueman) can you explain how this fixes the issue?

@Zirochkaa

oleh.zorenko (Zirochkaa) commented Nov 3, 2021 •

Copy link
Copy Markdown
Contributor

FBMarketingStream already has a transformer in it. It converts fields in records to appropriate types from schema files. So if field in the record has a string type, for example, "0.801221", then transformer will convert it to number type (float in python). So how adding string type to some fields will help in fixing this issue?
btw, transformer spams a lot of WARN logs.

@htrueman

Copy link
Copy Markdown
Contributor Author

Sherif A. Nada (@sherifnada) I see that the fields with $ref in schema is failing. Going to research it deeper

@htrueman
Vadym Hevlich (htrueman) temporarily deployed to more-secrets November 5, 2021 13:16 Inactive
@htrueman
Vadym Hevlich (htrueman) force-pushed the htrueman/fix-source-facebook-marketing-job-fail branch from 36272e6 to b346c9e Compare November 5, 2021 13:26
@htrueman
Vadym Hevlich (htrueman) temporarily deployed to more-secrets November 5, 2021 13:28 Inactive
@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 5, 2021 13:29 Inactive
@htrueman

Copy link
Copy Markdown
Contributor Author

UI issue with field types appeared. New issue added to fix that #7672

@htrueman

Vadym Hevlich (htrueman) commented Nov 5, 2021 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/1426008060
✅ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/1426008060
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
	 -----------------------------------------------------------
	 source_facebook_marketing/__init__.py       2      0   100%
	 source_facebook_marketing/api.py           75     17    77%
	 source_facebook_marketing/common.py        36     11    69%
	 source_facebook_marketing/source.py       112     65    42%
	 source_facebook_marketing/streams.py      261    101    61%
	 -----------------------------------------------------------
	 TOTAL                                     486    194    60%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                    Stmts   Miss  Cover
	 -----------------------------------------------------------
	 source_facebook_marketing/__init__.py       2      0   100%
	 source_facebook_marketing/api.py           75     18    76%
	 source_facebook_marketing/common.py        36      1    97%
	 source_facebook_marketing/source.py       112     72    36%
	 source_facebook_marketing/streams.py      261    101    61%
	 -----------------------------------------------------------
	 TOTAL                                     486    192    60%

@jrhizor
Jared Rhizor (jrhizor) temporarily deployed to more-secrets November 5, 2021 14:09 Inactive
@htrueman

Vadym Hevlich (htrueman) commented Nov 5, 2021 •

Copy link
Copy Markdown
Contributor Author

Sherif A. Nada (@sherifnada) added a retry job logics. This should help in cases where it's possible. But if now then we couldn't fix that, because the issue is on the facebook side.

Working on unit tests to cover this new job retry logics.

)
restart_job = self._create_insights_job(params)
self.running_jobs.append(restart_job)
self.times_job_restarted[time_range] += 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so the idea is to have a global max of 6 retries? Not blocking for this PR but we should make this per-job

@htrueman
Vadym Hevlich (htrueman) temporarily deployed to more-secrets November 5, 2021 18:38 Inactive
@htrueman
Vadym Hevlich (htrueman) merged commit 23f3d3e into master Nov 5, 2021
@htrueman
Vadym Hevlich (htrueman) deleted the htrueman/fix-source-facebook-marketing-job-fail branch November 5, 2021 18:40
@htrueman
Vadym Hevlich (htrueman) temporarily deployed to more-secrets November 5, 2021 18:40 Inactive
Vadym Hevlich (htrueman) added a commit that referenced this pull request Nov 5, 2021
@htrueman
Vadym Hevlich (htrueman) restored the htrueman/fix-source-facebook-marketing-job-fail branch November 5, 2021 18:43
@htrueman
Vadym Hevlich (htrueman) temporarily deployed to more-secrets November 5, 2021 18:45 Inactive
Konrad Schlatte (schlattk) pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…irbytehq#7605)

* Add job retry logics to AdsInsights stream.

* Add ad_creatives.thumbnail_url to ignored_fields in full_refresh SAT

* Update wait_for_job condition

This branch was previously deployed

1 inactive deployment
more-secrets — dacbc596 Deployed Nov 5, 2021 by htrueman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source Facebook Marketing 0.2.21: JobTimeout with 0 seconds and Job Failed message return

7 participants