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

Deprecation Warning for products, inventory_items, and product metafields #196

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

sgandhi1311
Copy link
Member

@sgandhi1311 sgandhi1311 commented Jan 27, 2025

Description of change

(This PR won't be merged into the master branch, as the particular changes are for the older version of tap)
This PR introduces a mechanism to warn users about the deprecation of the products and variants streams in tap-shopify. Shopify is sunsetting the REST API endpoints for these streams, and they will no longer be supported after 31st January 2025. Users are required to upgrade to the latest version of tap-shopify, which uses GraphQL-based endpoints for these streams.

Changes Introduced:

Deprecation Warning:

If the products or variants streams are selected, a deprecation warning is raised before the cutoff date (31st January 2025).

  • The warning includes:
    - Stream name(s).
    - Cutoff date.
    - Remaining days until deprecation.
    - Instructions to upgrade to the latest version.

Custom Exception:

  • Introduced a ShopifyDeprecationError to provide clear, actionable error messages for deprecated streams.
  • The exception message varies based on whether the current date is before or after the cutoff date:

Before 31st January 2025: Displays a warning with the number of days left.
After 31st January 2025: Displays an error stating the streams are no longer supported.

Example Behavior:

  1. Before 31st January 2025:

If the user selects the products stream:

tap_shopify.exceptions.ShopifyDeprecationError: WARNING: The ['products'] are deprecated and will no longer be supported after 31st January 2025, (4 days left). Please upgrade to the latest version of tap-shopify, which supports GraphQL endpoints for these streams.
  1. After 31st January 2025:

If the user selects the products stream:

tap_shopify.exceptions.ShopifyDeprecationError: The ['products'] are no longer supported after 31st January 2025. Please upgrade to the latest version of tap-shopify, which supports GraphQL endpoints for these streams.

Rollback steps

  • revert this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants