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

Cleaning up the Bridge, Pt II #885

Open
xristos3490 opened this issue Dec 29, 2022 · 3 comments
Open

Cleaning up the Bridge, Pt II #885

xristos3490 opened this issue Dec 29, 2022 · 3 comments

Comments

@xristos3490
Copy link
Member

xristos3490 commented Dec 29, 2022

Description

This epic aims to organize the work for cleaning up obsolete bits and pieces in the Bridge and help us better manage our features and tweaks into multiple site plans.

The workstream will span into three phases:

  1. Cleaning up the "store-on-wpcom" project
  2. Cleaning up the "ecommerce" project
  3. Implementing a plans-router controller for feature gating

Phase 1: Cleaning up the "store-on-wpcom" project

Given that this codebase is currently running live, it would be best to take a step back and carefully assess this cleanup in small parts.

Removals that are already taken care of elsewhere and were clearly obsolete

Here's the list of the cleanup RPs:

Relatively straightforward removals

Here's the list of the cleanup RPs:

Features to consider adding to all plans

Two features only run on Business sites, and adding them to all plans seems reasonable.

1. Cleaning up the MailChimp queues and abandoned carts in the DB

Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-mailchimp-deactivate-hook.php
This fix cleans up MailChimp queue tables after the plugin gets deactivated.

It is a defensive action to reduce DB bloat--It may make sense to keep it.
Thoughts?

2. Handling the DB auto-update feature

Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-enable-auto-update-db.php
We enable DB auto updates on Business sites. There is no similar filter for Ecommerce sites.
Should we keep this feature and allow it for all plans?

Removals that require attention

These five features seemed to be the only ones that looked interesting. Please note that all are currently running on Business sites with WooCommerce installed.

Here's the list of features for discussion:

1. Existing REST API routes

Ref code: https://github.com/Automattic/wc-calypso-bridge/tree/master/store-on-wpcom/api
We expose the following REST endpoints:

  • /wc/v3/data/counts
  • /wc/v3/mailchimp/(sync|api_key|store_info|campaign_defaults|newsletter_setting)
  • /wc/v3/products/calypso-reviews
  • /wc/v3/orders/<id>/send_invoice
  • /wc/v3/settings_email_groups

Is this removal safe? Is there a chance of using any of them elsewhere?

2. Fixing the REST API payment gateways' defaults

There are a few fixes for the default values of the payment gateways' settings. It seems like an obsolete feature related to the "store-on-wpcom" project. Thoughts? My best guess is that these aim to fix a pristine DB state to, e.g., return enabled=>'no' instead of enabled=>'', to help with JS application states. Note that there are no similar fixes in the Ecommerce plan currently. Should we remove it?
Ref code #1 for BACS, Ref code #2 for Cheques, Ref code #3 for Paypal

3. Handling the _created_via meta for products

Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-products.php
This feature adds the _created_via tracking meta in the product creation flow, but it only handles the calypso value ref when the URL contains the &_via_calypso param. Note that WC core only uses the _created_via meta on Orders.
Should we remove this?

4. Handling Jetpack sync in WC-related REST requests

Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-jetpack-hotfixes.php
Another feature that runs on Business sites. It disables jetpack sync during rest requests to avoid lengthly (> 5 seconds) response times during the shutdown action for things like product creation.

5. Handling Jetpack's publicize feature in products

Ref code: https://github.com/Automattic/wc-calypso-bridge/blob/master/store-on-wpcom/inc/wc-calypso-bridge-disable-publicize.php
This fix aims to disable the Publicize tool for products. What's the status of this tool? Is it deprecated/renamed? Should we consider handling the product exclusion here in all plans?
Note: Publicize is now called “auto-sharing” and is a feature of Jetpack Social.

Phase 2: Cleaning up the "ecommerce" project

TBA

Phase 3: Implementing a plans-router controller for feature gating

TBA

@manospsyx
Copy link

@xristos3490 did you mean to close this?

@warrendholmes
Copy link

@xristos3490 Is this work happening?

@xristos3490
Copy link
Member Author

@warrendholmes The "ecommerce" part is done. The cleaning of "store-on-wpcom" it's on hold due to the risk we identified during the process. I've written a comment here pdqkbG-2ft-p2#comment-1325

@manospsyx manospsyx changed the title Cleaning up the Bridge Cleaning up the Bridge, Pt II Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants