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 Instagram: Improve, refactor STATE management #27908

Merged

Conversation

bazarnov
Copy link
Collaborator

@bazarnov bazarnov commented Jul 3, 2023

What

Resolving:

How

  • fixed the bug when the user_lifetime_insights stream could return the records with missing end_time or value keys
  • refactored the STATE management by migrating from the get_updated_state() method to IncrementalMixin inheritance
  • covered both cases with unit tests

🚨 User Impact 🚨

No impact is expected - no breaking changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan and you've followed all steps in the Breaking Changes Checklist
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • The connector tests are passing in CI
  • You've updated the connector's metadata.yaml file (new!)
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jul 3, 2023
@bazarnov bazarnov marked this pull request as ready for review July 3, 2023 08:33
@octavia-squidington-iii
Copy link
Collaborator

source-instagram test report (commit e111160afd) - ✅

⏲️ Total pipeline duration: 06mn24s

Step Result
Validate airbyte-integrations/connectors/source-instagram/metadata.yaml
Connector version semver check
Connector version increment check
QA checks
Code format checks
Connector package install
Build source-instagram docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-instagram test

@bazarnov bazarnov requested a review from lazebnyi July 5, 2023 14:46
@octavia-squidington-iii
Copy link
Collaborator

source-instagram test report (commit 4c0a428a14) - ✅

⏲️ Total pipeline duration: 07mn16s

Step Result
Validate airbyte-integrations/connectors/source-instagram/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-instagram docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-instagram test

@bazarnov bazarnov merged commit 903724d into master Jul 5, 2023
17 checks passed
@bazarnov bazarnov deleted the baz/source-instagram-fix-noo-end-time-users-insights branch July 5, 2023 14:57
octavia-approvington pushed a commit that referenced this pull request Jul 6, 2023
* Adds data as JsonNode to pass through, running into memory issues so add JVM args to attach VisualVM

* JsonNode

* Lowers the optimal batch size to see if this improvements movement

* Fixes NPE by checking if PartialAirbyteMessage contains a PartialAirbyteRecord

* Fixes config switch when config is not explicitly set (config migration needed)

* Adds logic to check if queue has elements before getting timeOfLastMessage

* Add PartialSerialisedMessage test. (#27452)

* Test deserialise.

* Add tests.

* Simplify and fix tests.

* Format.

* Adds tests for deserializeAirbyteMessage

* Adds tests for deserializeAirbyteMessage with bad data

* Cleans up deserializeAirbyteMessage and throws Exception when invalid message

* More code cleanup

---------

Co-authored-by: ryankfu <ryan.fu@airbyte.io>

* 🤖 Auto format destination-snowflake code [skip ci]

* Cleans up code w/o JVM args & rebase

* 🤖 Auto format destination-snowflake code [skip ci]

* Adds breadcrumb on the STATE message deviation and where the deserialize/serialize is done to unpack

* 🤖 Auto format destination-snowflake code [skip ci]

* Adds back line formatter removed and comment describing rational for lower batchSize

* Bumps Snowflake version and type checks

* Added note to remove PartialAirbyteRecordMessage with low resource testing

* Automated Commit - Format and Process Resources Changes

* Fix issue with multiple namespaces in snowflake not writing to the correct staging schema

* Fix issue with multiple namespaces in snowflake not writing to the correct staging schema

* remove stage name maniuplating method

* update readme

* Source Stripe: update credit_notes expected records (#27941)

* Source Zendesk Talk: update expected records (#27942)

* Source Xero: update expected records (#27943)

* Metadata: Persist Registry entries (#27766)

* DNC

* Update poetry

* Update dagster

* Apply partition

* Get metadata entry

* Use helpers

* Write registry entry to appropriate location

* Delete when registry removed

* Update to use new file (broken)

* Render registry from registry entries

* Run format

* Fix plural issue

* Update to all metadata file blobs

* Fix test

* Update to all blobs

* Add ignore validation error for version logic

* Rename to max_run_request

* Pedros review

* Ella suggestions

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Update airbyte-ci/connectors/metadata_service/orchestrator/orchestrator/assets/registry_entry.py

Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Update naming

* Add tests for connector type and deletion

* Test safe parse

* Format

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@sers.noreply.github.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>

* Fix Dagster Deploy Failure (#27955)

* Add pydantic

* Add pydantic to orchestration deploy pipeline

* 🐛 Source Jira: update expected records (#27951)

* Source Jira: update expected records

* Update issues expected records

* Source Zendesk Chat: update expected records (#27965)

* 🐛 Source Pipedrive: update expected records (#27967)

* 🐛 Source Pinterest: update expected records (#27964)

* ✨ Source Amazon-Ads: Add streams for portfolios and sponsored brands v3 (#27607)

* Add stream for sponsored brands v3
* Add new stream Portfolios

* Source Google Search Console: added discover and googleNews to searchType (#27952)

* added discover and googleNews to searchType

* updated changelog

* fixed types for streams

* 🎉 Source Instagram: Improve, refactor `STATE` management (#27908)

* add test for enabling

* update versions

* fix test

* update other snowflake loading method types

* remove standard

---------

Co-authored-by: ryankfu <ryan.fu@airbyte.io>
Co-authored-by: Davin Chia <davinchia@gmail.com>
Co-authored-by: octavia-squidington-iii <octavia-squidington-iii@users.noreply.github.com>
Co-authored-by: ryankfu <ryankfu@users.noreply.github.com>
Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: Arsen Losenko <20901439+arsenlosenko@users.noreply.github.com>
Co-authored-by: Ben Church <ben@airbyte.io>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@sers.noreply.github.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
Co-authored-by: Anatolii Yatsuk <35109939+tolik0@users.noreply.github.com>
Co-authored-by: Daryna Ishchenko <80129833+darynaishchenko@users.noreply.github.com>
Co-authored-by: Baz <oleksandr.bazarnov@globallogic.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 connectors/source/instagram team/connectors-python
Projects
No open projects
Status: No status
3 participants