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 Shopify: Fix FAILED scenario for BULK streams, fixed deleted events STATE collision #42973

Merged
merged 27 commits into from
Aug 5, 2024

Conversation

bazarnov
Copy link
Collaborator

@bazarnov bazarnov commented Aug 2, 2024

What

Resolving:

How

There are a couple of issues faced during the investigation of the OC:

  • BULK streams that don't support bulk checkpointing with FAILED Job status, could run into an infinity loop, with no further resolutions, in this case, we should raise an Exception and retry with the next sync attempt (INCOMPLETE status for the stream)
  • BULK Streams that support bulk checkpointing now can catch the partialDataUrl and proceed with the partial results collected correctly.
  • BULK stream metafields_product_images has changed the way we query the metafields due to the fact they suddenly changed the ownership of the Metafield resource we pull (metafield product images), now we query from media, instead of images. More information about this here. This is super annoying because Shopify changed the way they store the metafields for product images for future 2024-10 but applied the change to the 2024-04 (current shopify API version the source uses). Thus, the id assigned to the metafield has changed because the ownership has changed from prodcut_image to media_image.
    Failed CAT test, with 0 records returned for metafield_product_images
  • For REST streams, such as Orders and others that support Deleted Events fetch, the STATE overlap/collision was fixed; now, the STATE emitted from the main stream's part and the STATE from the deleted events are resolved correctly.
  • added unit test to cover the changes
  • remove pointless unit tests that no longer cover the behavior

User Impact

This is not a breaking change! No impact is expected.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Aug 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 3:14pm

@bazarnov bazarnov marked this pull request as ready for review August 2, 2024 16:43
@bazarnov
Copy link
Collaborator Author

bazarnov commented Aug 2, 2024

Regression Tests fail is expected in:

  • TestDataIntegrity
    • test_record_count_with_state:
      • due to the fact current 2.14.16 version doesn't pull the metafield_product_images records at all
    • test_record_schema_match_with_state and test_all_records_are_the_same_with_state:
      • due to the fact the cursor overlap for the deleted events is fixed; thus, the fail is expected. Previously it had updated_at field, for the deleted record, now it's not, and should not since the deleted record could not be updated on the Shopify side, moreover this field was synthetic, we don't need it now.

All the rest - it 1:1.

@bazarnov
Copy link
Collaborator Author

bazarnov commented Aug 2, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@bazarnov bazarnov requested a review from a team August 5, 2024 11:41
Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

Just a couple questions to make sure I understand properly

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

Thanks for the added context. I'm good with those changes!

@bazarnov
Copy link
Collaborator Author

bazarnov commented Aug 5, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@tolik0
Copy link
Contributor

tolik0 commented Aug 5, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@bazarnov bazarnov merged commit e6a98e1 into master Aug 5, 2024
37 checks passed
@bazarnov bazarnov deleted the baz/source/shopify/fix-faild-bulk-and-deleted-events branch August 5, 2024 16:46
@xavier-lai
Copy link

Thanks @bazarnov for those fix

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/shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants