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

Remove support for metafield_namespaces for webhooks #3632

Merged

Conversation

MitchDickinson
Copy link
Contributor

@MitchDickinson MitchDickinson commented Apr 1, 2024

WHY are these changes introduced?

We don't want to support metafield_namespaces for declarative webhooks (DWH). So we are removing support from the CLI. Nobody outside Shopify is using this right now, so should be a safe change.

Here's the associated PR from core to remove support there

WHAT is this pull request doing?

Remove all code that touches metafield_namespaces for DWH.

How to test your changes?

I ran the local branch copy of the CLI using instructions from the contributor docs:

In CLI project:

cli git:(mitch/remove-metafield-namespaces-from-webhoosk) pnpm shopify app deploy --path=/Users/mitch/test-apps/mitch-webhooks2

My app still has metafield_namespaces in the TOML:

[[webhooks.subscriptions]]
topics = [ "products/create", "products/update" ]
uri = "https://webhook.site/0624e061-492d-4dd0-915f-47805eb28915/declarative_product_change2"
metafield_namespaces = ["something", "else", "here"]
include_fields = ["title"]

The deploy works. Curiously, I'm still seeing metafield_namespaces saving on the DB. I did not expect this, I would have expected it to get filtered out on the CLI. I'm Looking for someone to confirm this expectation.

Post-release steps

  • N/A

Measuring impact

How do we know this change was effective? Please choose one:

  • Existing analytics will cater for this addition

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Copy link
Contributor

github-actions bot commented Apr 1, 2024

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

Copy link
Contributor

github-actions bot commented Apr 1, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 72% 6747/9371
🟡 Branches
69.21% (-0.01% 🔻)
3291/4755
🟡 Functions 70.68% 1798/2544
🟡 Lines 73.15% 6362/8697
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app_config_webhook.ts
93.75%
84.62% (-1.1% 🔻)
100% 93.33%

Test suite run success

1615 tests passing in 754 suites.

Report generated by 🧪jest coverage report action from 9ccf368

@MitchDickinson MitchDickinson marked this pull request as ready for review April 1, 2024 19:37
Copy link
Contributor

github-actions bot commented Apr 1, 2024

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

Copy link
Contributor

@alexanderMontague alexanderMontague left a comment

Choose a reason for hiding this comment

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

Looks good to me

Curiously, I'm still seeing metafield_namespaces saving on the DB. I did not expect this, I would have expected it to get filtered out on the CLI

I can't seem to reproduce, they are filtered out in the newest app version config for me

image

@MitchDickinson
Copy link
Contributor Author

I can't seem to reproduce, they are filtered out in the newest app version config for me

I really appreciate you testing this out @alexanderMontague. I did observe this happen to my expectation once, but then on a subsequent deploy I vaguely remember them coming came back. But it's a fuzzy memory now, from last week. Anyway, thank you for confirming it works 🙏

@MitchDickinson MitchDickinson added this pull request to the merge queue Apr 4, 2024
Merged via the queue into main with commit bf3af0e Apr 4, 2024
@MitchDickinson MitchDickinson deleted the mitch/remove-metafield-namespaces-from-webhoosk branch April 4, 2024 11:03
@RyanofWoods
Copy link

Not sure why it's been closed either.

It looks like there's an open PR to add it and it's requiring the current unstable + version 2025-04
#5167

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.

3 participants